# Interface CapacityCommitmentOrBuilder (2.92.0)

2.92.0 (latest) 2.89.0 2.88.0 2.86.0 2.84.0 2.83.0 2.82.0 2.81.0 2.79.0 2.77.0 2.76.0 2.75.0 2.74.0 2.73.0 2.71.0 2.69.0 2.68.0 2.65.0 2.64.0 2.63.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.0 2.55.0 2.54.0 2.53.0 2.52.0 2.50.0 2.49.0 2.48.0 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.6 2.3.1 2.2.7 2.1.4

    public interface CapacityCommitmentOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCommitmentEndTime()

    public abstract Timestamp getCommitmentEndTime()

Output only. The end of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after renewal,
commitment_end_time is the time the renewed commitment expires. So itwould
be at a time after commitment_start_time + committed period, because we
don't change commitment_start_time ,

`
.google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The commitmentEndTime. |

### getCommitmentEndTimeOrBuilder()

    public abstract TimestampOrBuilder getCommitmentEndTimeOrBuilder()

Output only. The end of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after renewal,
commitment_end_time is the time the renewed commitment expires. So itwould
be at a time after commitment_start_time + committed period, because we
don't change commitment_start_time ,

`
.google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getCommitmentStartTime()

    public abstract Timestamp getCommitmentStartTime()

Output only. The start of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after the commitment is renewed,
commitment_start_time won't be changed. It refers to the start time of the
original commitment.

`
.google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The commitmentStartTime. |

### getCommitmentStartTimeOrBuilder()

    public abstract TimestampOrBuilder getCommitmentStartTimeOrBuilder()

Output only. The start of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after the commitment is renewed,
commitment_start_time won't be changed. It refers to the start time of the
original commitment.

`
.google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getEdition()

    public abstract Edition getEdition()

Optional. Edition of the capacity commitment.

`
.google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigqueryreservation/latest/com.google.cloud.bigquery.reservation.v1.Edition` | The edition. |

### getEditionValue()

    public abstract int getEditionValue()

Optional. Edition of the capacity commitment.

`
.google.cloud.bigquery.reservation.v1.Edition edition = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for edition. |

### getFailureStatus()

    public abstract Status getFailureStatus()

Output only. For FAILED commitment plan, provides the reason of failure.

`.google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.rpc.Status` | The failureStatus. |

### getFailureStatusOrBuilder()

    public abstract StatusOrBuilder getFailureStatusOrBuilder()

Output only. For FAILED commitment plan, provides the reason of failure.

`.google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.rpc.StatusOrBuilder` |   |

### getIsFlatRate()

    public abstract boolean getIsFlatRate()

Output only. If true, the commitment is a flat-rate commitment, otherwise,
it's an edition commitment.

`bool is_flat_rate = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The isFlatRate. |

### getMultiRegionAuxiliary() (deprecated)

    public abstract boolean getMultiRegionAuxiliary()

**Deprecated.** *google.cloud.bigquery.reservation.v1.CapacityCommitment.multi_region_auxiliary is
deprecated. See google/cloud/bigquery/reservation/v1/reservation.proto;l=971*

Applicable only for commitments located within one of the BigQuery
multi-regions (US or EU).

If set to true, this commitment is placed in the organization's
secondary region which is designated for disaster recovery purposes.
If false, this commitment is placed in the organization's default region.

NOTE: this is a preview feature. Project must be allow-listed in order to
set this field.

`bool multi_region_auxiliary = 10 [deprecated = true];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The multiRegionAuxiliary. |

### getName()

    public abstract String getName()

Output only. The resource name of the capacity commitment, e.g.,
`projects/myproject/locations/US/capacityCommitments/123`
The commitment_id must only contain lower case alphanumeric characters or
dashes. It must start with a letter and must not end
with a dash. Its maximum length is 64 characters.

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Output only. The resource name of the capacity commitment, e.g.,
`projects/myproject/locations/US/capacityCommitments/123`
The commitment_id must only contain lower case alphanumeric characters or
dashes. It must start with a letter and must not end
with a dash. Its maximum length is 64 characters.

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getPlan()

    public abstract CapacityCommitment.CommitmentPlan getPlan()

Optional. Capacity commitment commitment plan.

`
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigqueryreservation/latest/com.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan` | The plan. |

### getPlanValue()

    public abstract int getPlanValue()

Optional. Capacity commitment commitment plan.

`
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for plan. |

### getRenewalPlan()

    public abstract CapacityCommitment.CommitmentPlan getRenewalPlan()

Optional. The plan this capacity commitment is converted to after
commitment_end_time passes. Once the plan is changed, committed period is
extended according to commitment plan. Only applicable for ANNUAL and TRIAL
commitments.

`
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigqueryreservation/latest/com.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan` | The renewalPlan. |

### getRenewalPlanValue()

    public abstract int getRenewalPlanValue()

Optional. The plan this capacity commitment is converted to after
commitment_end_time passes. Once the plan is changed, committed period is
extended according to commitment plan. Only applicable for ANNUAL and TRIAL
commitments.

`
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan renewal_plan = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for renewalPlan. |

### getSlotCount()

    public abstract long getSlotCount()

Optional. Number of slots in this commitment.

`int64 slot_count = 2 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The slotCount. |

### getState()

    public abstract CapacityCommitment.State getState()

Output only. State of the commitment.

`
.google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigqueryreservation/latest/com.google.cloud.bigquery.reservation.v1.CapacityCommitment.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

Output only. State of the commitment.

`
.google.cloud.bigquery.reservation.v1.CapacityCommitment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### hasCommitmentEndTime()

    public abstract boolean hasCommitmentEndTime()

Output only. The end of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after renewal,
commitment_end_time is the time the renewed commitment expires. So itwould
be at a time after commitment_start_time + committed period, because we
don't change commitment_start_time ,

`
.google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the commitmentEndTime field is set. |

### hasCommitmentStartTime()

    public abstract boolean hasCommitmentStartTime()

Output only. The start of the current commitment period. It is applicable
only for ACTIVE capacity commitments. Note after the commitment is renewed,
commitment_start_time won't be changed. It refers to the start time of the
original commitment.

`
.google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the commitmentStartTime field is set. |

### hasFailureStatus()

    public abstract boolean hasFailureStatus()

Output only. For FAILED commitment plan, provides the reason of failure.

`.google.rpc.Status failure_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the failureStatus field is set. |