public final class CapacityCommitment extends GeneratedMessageV3 implements CapacityCommitmentOrBuilder
Capacity commitment is a way to purchase compute capacity for BigQuery jobs
(in the form of slots) with some committed period of usage. Annual
commitments renew by default. Commitments can be removed after their
commitment end time passes.
In order to remove annual commitment, its plan needs to be changed
to monthly or flex first.
A capacity commitment resource exists as a child resource of the admin
project.
Protobuf type google.cloud.bigquery.reservation.v1.CapacityCommitment
Fields
COMMITMENT_END_TIME_FIELD_NUMBER
public static final int COMMITMENT_END_TIME_FIELD_NUMBER
Field Value
COMMITMENT_START_TIME_FIELD_NUMBER
public static final int COMMITMENT_START_TIME_FIELD_NUMBER
Field Value
FAILURE_STATUS_FIELD_NUMBER
public static final int FAILURE_STATUS_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
PLAN_FIELD_NUMBER
public static final int PLAN_FIELD_NUMBER
Field Value
RENEWAL_PLAN_FIELD_NUMBER
public static final int RENEWAL_PLAN_FIELD_NUMBER
Field Value
SLOT_COUNT_FIELD_NUMBER
public static final int SLOT_COUNT_FIELD_NUMBER
Field Value
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
Field Value
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCommitmentEndTime()
public Timestamp getCommitmentEndTime()
Output only. The end of the current commitment period. It is applicable only for ACTIVE
capacity commitments.
.google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
Timestamp | The commitmentEndTime.
|
getCommitmentEndTimeOrBuilder()
public TimestampOrBuilder getCommitmentEndTimeOrBuilder()
Output only. The end of the current commitment period. It is applicable only for ACTIVE
capacity commitments.
.google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getCommitmentStartTime()
public Timestamp getCommitmentStartTime()
Output only. The start of the current commitment period. It is applicable only for
ACTIVE capacity commitments.
.google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
Timestamp | The commitmentStartTime.
|
getCommitmentStartTimeOrBuilder()
public TimestampOrBuilder getCommitmentStartTimeOrBuilder()
Output only. The start of the current commitment period. It is applicable only for
ACTIVE capacity commitments.
.google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getDefaultInstance()
public static CapacityCommitment getDefaultInstance()
Returns
getDefaultInstanceForType()
public CapacityCommitment getDefaultInstanceForType()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
getFailureStatus()
public 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 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 | |
getName()
Output only. The resource name of the capacity commitment, e.g.,
projects/myproject/locations/US/capacityCommitments/123
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Output only. The resource name of the capacity commitment, e.g.,
projects/myproject/locations/US/capacityCommitments/123
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getParserForType()
public Parser<CapacityCommitment> getParserForType()
Returns
Overrides
getPlan()
public CapacityCommitment.CommitmentPlan getPlan()
Capacity commitment commitment plan.
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;
Returns
getPlanValue()
public int getPlanValue()
Capacity commitment commitment plan.
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;
Returns
Type | Description |
int | The enum numeric value on the wire for plan.
|
getRenewalPlan()
public CapacityCommitment.CommitmentPlan getRenewalPlan()
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;
Returns
getRenewalPlanValue()
public int getRenewalPlanValue()
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;
Returns
Type | Description |
int | The enum numeric value on the wire for renewalPlan.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSlotCount()
public long getSlotCount()
Number of slots in this commitment.
int64 slot_count = 2;
Returns
Type | Description |
long | The slotCount.
|
getState()
public 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
getStateValue()
public 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 |
int | The enum numeric value on the wire for state.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasCommitmentEndTime()
public boolean hasCommitmentEndTime()
Output only. The end of the current commitment period. It is applicable only for ACTIVE
capacity commitments.
.google.protobuf.Timestamp commitment_end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
boolean | Whether the commitmentEndTime field is set.
|
hasCommitmentStartTime()
public boolean hasCommitmentStartTime()
Output only. The start of the current commitment period. It is applicable only for
ACTIVE capacity commitments.
.google.protobuf.Timestamp commitment_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type | Description |
boolean | Whether the commitmentStartTime field is set.
|
hasFailureStatus()
public 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 |
boolean | Whether the failureStatus field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilder()
public static CapacityCommitment.Builder newBuilder()
Returns
newBuilder(CapacityCommitment prototype)
public static CapacityCommitment.Builder newBuilder(CapacityCommitment prototype)
Parameter
Returns
newBuilderForType()
public CapacityCommitment.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CapacityCommitment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public static CapacityCommitment parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static CapacityCommitment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static CapacityCommitment parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static CapacityCommitment parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CapacityCommitment parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static CapacityCommitment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CapacityCommitment parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static CapacityCommitment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static CapacityCommitment parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<CapacityCommitment> parser()
Returns
toBuilder()
public CapacityCommitment.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions