Class 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 type google.cloud.bigquery.reservation.v1.CapacityCommitment
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.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 class com.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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        Returns:
        The bytes for name.
      • getSlotCount

        public long getSlotCount()
         Number of slots in this commitment.
         
        int64 slot_count = 2;
        Specified by:
        getSlotCount in interface CapacityCommitmentOrBuilder
        Returns:
        The slotCount.
      • getPlanValue

        public int getPlanValue()
         Capacity commitment commitment plan.
         
        .google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;
        Specified by:
        getPlanValue in interface CapacityCommitmentOrBuilder
        Returns:
        The enum numeric value on the wire for 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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
      • 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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
      • 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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
      • 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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        Returns:
        The multiRegionAuxiliary.
      • getEditionValue

        public int getEditionValue()
         Edition of the capacity commitment.
         
        .google.cloud.bigquery.reservation.v1.Edition edition = 12;
        Specified by:
        getEditionValue in interface CapacityCommitmentOrBuilder
        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 interface CapacityCommitmentOrBuilder
        Returns:
        The edition.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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​(com.google.protobuf.CodedInputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws IOException
        Throws:
        IOException
      • newBuilderForType

        public CapacityCommitment.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public CapacityCommitment.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected CapacityCommitment.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<CapacityCommitment> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public CapacityCommitment getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder