Class CapacityCommitment
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.bigquery.reservation.v1.CapacityCommitment
-
- All Implemented Interfaces:
CapacityCommitmentOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class CapacityCommitment extends com.google.protobuf.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 typegoogle.cloud.bigquery.reservation.v1.CapacityCommitment
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CapacityCommitment.Builder
Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage.static class
CapacityCommitment.CommitmentPlan
Commitment plan defines the current committed period.static class
CapacityCommitment.State
Capacity commitment can either become ACTIVE right away or transition from PENDING to ACTIVE or FAILED.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
COMMITMENT_END_TIME_FIELD_NUMBER
static int
COMMITMENT_START_TIME_FIELD_NUMBER
static int
EDITION_FIELD_NUMBER
static int
FAILURE_STATUS_FIELD_NUMBER
static int
MULTI_REGION_AUXILIARY_FIELD_NUMBER
static int
NAME_FIELD_NUMBER
static int
PLAN_FIELD_NUMBER
static int
RENEWAL_PLAN_FIELD_NUMBER
static int
SLOT_COUNT_FIELD_NUMBER
static int
STATE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
com.google.protobuf.Timestamp
getCommitmentEndTime()
Output only.com.google.protobuf.TimestampOrBuilder
getCommitmentEndTimeOrBuilder()
Output only.com.google.protobuf.Timestamp
getCommitmentStartTime()
Output only.com.google.protobuf.TimestampOrBuilder
getCommitmentStartTimeOrBuilder()
Output only.static CapacityCommitment
getDefaultInstance()
CapacityCommitment
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
Edition
getEdition()
Edition of the capacity commitment.int
getEditionValue()
Edition of the capacity commitment.com.google.rpc.Status
getFailureStatus()
Output only.com.google.rpc.StatusOrBuilder
getFailureStatusOrBuilder()
Output only.boolean
getMultiRegionAuxiliary()
Applicable only for commitments located within one of the BigQuery multi-regions (US or EU).String
getName()
Output only.com.google.protobuf.ByteString
getNameBytes()
Output only.com.google.protobuf.Parser<CapacityCommitment>
getParserForType()
CapacityCommitment.CommitmentPlan
getPlan()
Capacity commitment commitment plan.int
getPlanValue()
Capacity commitment commitment plan.CapacityCommitment.CommitmentPlan
getRenewalPlan()
The plan this capacity commitment is converted to after commitment_end_time passes.int
getRenewalPlanValue()
The plan this capacity commitment is converted to after commitment_end_time passes.int
getSerializedSize()
long
getSlotCount()
Number of slots in this commitment.CapacityCommitment.State
getState()
Output only.int
getStateValue()
Output only.boolean
hasCommitmentEndTime()
Output only.boolean
hasCommitmentStartTime()
Output only.boolean
hasFailureStatus()
Output only.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static CapacityCommitment.Builder
newBuilder()
static CapacityCommitment.Builder
newBuilder(CapacityCommitment prototype)
CapacityCommitment.Builder
newBuilderForType()
protected CapacityCommitment.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static CapacityCommitment
parseDelimitedFrom(InputStream input)
static CapacityCommitment
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CapacityCommitment
parseFrom(byte[] data)
static CapacityCommitment
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CapacityCommitment
parseFrom(com.google.protobuf.ByteString data)
static CapacityCommitment
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CapacityCommitment
parseFrom(com.google.protobuf.CodedInputStream input)
static CapacityCommitment
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CapacityCommitment
parseFrom(InputStream input)
static CapacityCommitment
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CapacityCommitment
parseFrom(ByteBuffer data)
static CapacityCommitment
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<CapacityCommitment>
parser()
CapacityCommitment.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SLOT_COUNT_FIELD_NUMBER
public static final int SLOT_COUNT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PLAN_FIELD_NUMBER
public static final int PLAN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COMMITMENT_START_TIME_FIELD_NUMBER
public static final int COMMITMENT_START_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COMMITMENT_END_TIME_FIELD_NUMBER
public static final int COMMITMENT_END_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FAILURE_STATUS_FIELD_NUMBER
public static final int FAILURE_STATUS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RENEWAL_PLAN_FIELD_NUMBER
public static final int RENEWAL_PLAN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MULTI_REGION_AUXILIARY_FIELD_NUMBER
public static final int MULTI_REGION_AUXILIARY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EDITION_FIELD_NUMBER
public static final int EDITION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getName
public 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];
- Specified by:
getName
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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];
- Specified by:
getNameBytes
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The bytes for name.
-
getSlotCount
public long getSlotCount()
Number of slots in this commitment.
int64 slot_count = 2;
- Specified by:
getSlotCount
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The slotCount.
-
getPlanValue
public int getPlanValue()
Capacity commitment commitment plan.
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;
- Specified by:
getPlanValue
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The enum numeric value on the wire for plan.
-
getPlan
public CapacityCommitment.CommitmentPlan getPlan()
Capacity commitment commitment plan.
.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;
- Specified by:
getPlan
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The plan.
-
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];
- Specified by:
getStateValue
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The enum numeric value on the wire for state.
-
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];
- Specified by:
getState
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The state.
-
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];
- Specified by:
hasCommitmentStartTime
in interfaceCapacityCommitmentOrBuilder
- Returns:
- Whether the commitmentStartTime field is set.
-
getCommitmentStartTime
public com.google.protobuf.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];
- Specified by:
getCommitmentStartTime
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The commitmentStartTime.
-
getCommitmentStartTimeOrBuilder
public com.google.protobuf.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];
- Specified by:
getCommitmentStartTimeOrBuilder
in interfaceCapacityCommitmentOrBuilder
-
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];
- Specified by:
hasCommitmentEndTime
in interfaceCapacityCommitmentOrBuilder
- Returns:
- Whether the commitmentEndTime field is set.
-
getCommitmentEndTime
public com.google.protobuf.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];
- Specified by:
getCommitmentEndTime
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The commitmentEndTime.
-
getCommitmentEndTimeOrBuilder
public com.google.protobuf.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];
- Specified by:
getCommitmentEndTimeOrBuilder
in interfaceCapacityCommitmentOrBuilder
-
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];
- Specified by:
hasFailureStatus
in interfaceCapacityCommitmentOrBuilder
- Returns:
- Whether the failureStatus field is set.
-
getFailureStatus
public com.google.rpc.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];
- Specified by:
getFailureStatus
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The failureStatus.
-
getFailureStatusOrBuilder
public com.google.rpc.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];
- Specified by:
getFailureStatusOrBuilder
in interfaceCapacityCommitmentOrBuilder
-
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;
- Specified by:
getRenewalPlanValue
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The enum numeric value on the wire for renewalPlan.
-
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;
- Specified by:
getRenewalPlan
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The renewalPlan.
-
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;
- Specified by:
getMultiRegionAuxiliary
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The multiRegionAuxiliary.
-
getEditionValue
public int getEditionValue()
Edition of the capacity commitment.
.google.cloud.bigquery.reservation.v1.Edition edition = 12;
- Specified by:
getEditionValue
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The enum numeric value on the wire for edition.
-
getEdition
public Edition getEdition()
Edition of the capacity commitment.
.google.cloud.bigquery.reservation.v1.Edition edition = 12;
- Specified by:
getEdition
in interfaceCapacityCommitmentOrBuilder
- Returns:
- The edition.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CapacityCommitment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CapacityCommitment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CapacityCommitment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CapacityCommitment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CapacityCommitment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CapacityCommitment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CapacityCommitment parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CapacityCommitment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CapacityCommitment parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CapacityCommitment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static CapacityCommitment parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CapacityCommitment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public CapacityCommitment.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static CapacityCommitment.Builder newBuilder()
-
newBuilder
public static CapacityCommitment.Builder newBuilder(CapacityCommitment prototype)
-
toBuilder
public CapacityCommitment.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CapacityCommitment.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static CapacityCommitment getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<CapacityCommitment> parser()
-
getParserForType
public com.google.protobuf.Parser<CapacityCommitment> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public CapacityCommitment getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-