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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
COMMITMENT_END_TIME_FIELD_NUMBER
public static final int COMMITMENT_END_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
COMMITMENT_START_TIME_FIELD_NUMBER
public static final int COMMITMENT_START_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
EDITION_FIELD_NUMBER
public static final int EDITION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
FAILURE_STATUS_FIELD_NUMBER
public static final int FAILURE_STATUS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IS_FLAT_RATE_FIELD_NUMBER
public static final int IS_FLAT_RATE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MULTI_REGION_AUXILIARY_FIELD_NUMBER
public static final int MULTI_REGION_AUXILIARY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PLAN_FIELD_NUMBER
public static final int PLAN_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
RENEWAL_PLAN_FIELD_NUMBER
public static final int RENEWAL_PLAN_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SLOT_COUNT_FIELD_NUMBER
public static final int SLOT_COUNT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static CapacityCommitment getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static CapacityCommitment.Builder newBuilder()
newBuilder(CapacityCommitment prototype)
public static CapacityCommitment.Builder newBuilder(CapacityCommitment prototype)
public static CapacityCommitment parseDelimitedFrom(InputStream input)
public static CapacityCommitment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static CapacityCommitment parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static CapacityCommitment parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(CodedInputStream input)
public static CapacityCommitment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(InputStream input)
public static CapacityCommitment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static CapacityCommitment parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CapacityCommitment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<CapacityCommitment> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getCommitmentEndTime()
public 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 it would
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 |
Timestamp |
The commitmentEndTime.
|
getCommitmentEndTimeOrBuilder()
public 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 it would
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];
getCommitmentStartTime()
public 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 |
Timestamp |
The commitmentStartTime.
|
getCommitmentStartTimeOrBuilder()
public 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];
getDefaultInstanceForType()
public CapacityCommitment getDefaultInstanceForType()
getEdition()
public Edition getEdition()
Edition of the capacity commitment.
.google.cloud.bigquery.reservation.v1.Edition edition = 12;
Returns |
Type |
Description |
Edition |
The edition.
|
getEditionValue()
public int getEditionValue()
Edition of the capacity commitment.
.google.cloud.bigquery.reservation.v1.Edition edition = 12;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for edition.
|
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 |
|
getIsFlatRate()
public 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 |
boolean |
The isFlatRate.
|
getMultiRegionAuxiliary()
public boolean getMultiRegionAuxiliary()
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;
Returns |
Type |
Description |
boolean |
The multiRegionAuxiliary.
|
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 |
String |
The name.
|
getNameBytes()
public 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 |
ByteString |
The bytes for name.
|
getParserForType()
public Parser<CapacityCommitment> getParserForType()
Overrides
getPlan()
public CapacityCommitment.CommitmentPlan getPlan()
Capacity commitment commitment plan.
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;
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;
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 |
Type |
Description |
int |
|
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];
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.
|
hasCommitmentEndTime()
public 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 it would
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 |
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. 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 |
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 |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public CapacityCommitment.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CapacityCommitment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public CapacityCommitment.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides