Class CapacityCommitment (2.9.0)

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

Static Fields

COMMITMENT_END_TIME_FIELD_NUMBER

public static final int COMMITMENT_END_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

COMMITMENT_START_TIME_FIELD_NUMBER

public static final int COMMITMENT_START_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

FAILURE_STATUS_FIELD_NUMBER

public static final int FAILURE_STATUS_FIELD_NUMBER
Field Value
TypeDescription
int

MULTI_REGION_AUXILIARY_FIELD_NUMBER

public static final int MULTI_REGION_AUXILIARY_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PLAN_FIELD_NUMBER

public static final int PLAN_FIELD_NUMBER
Field Value
TypeDescription
int

RENEWAL_PLAN_FIELD_NUMBER

public static final int RENEWAL_PLAN_FIELD_NUMBER
Field Value
TypeDescription
int

SLOT_COUNT_FIELD_NUMBER

public static final int SLOT_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CapacityCommitment getDefaultInstance()
Returns
TypeDescription
CapacityCommitment

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CapacityCommitment.Builder newBuilder()
Returns
TypeDescription
CapacityCommitment.Builder

newBuilder(CapacityCommitment prototype)

public static CapacityCommitment.Builder newBuilder(CapacityCommitment prototype)
Parameter
NameDescription
prototypeCapacityCommitment
Returns
TypeDescription
CapacityCommitment.Builder

parseDelimitedFrom(InputStream input)

public static CapacityCommitment parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CapacityCommitment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CapacityCommitment parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CapacityCommitment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CapacityCommitment parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CapacityCommitment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CapacityCommitment parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CapacityCommitment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CapacityCommitment parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CapacityCommitment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CapacityCommitment parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CapacityCommitment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CapacityCommitment
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CapacityCommitment> parser()
Returns
TypeDescription
Parser<CapacityCommitment>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public CapacityCommitment getDefaultInstanceForType()
Returns
TypeDescription
CapacityCommitment

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
TypeDescription
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
TypeDescription
com.google.rpc.StatusOrBuilder

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.

bool multi_region_auxiliary = 10;

Returns
TypeDescription
boolean

The multiRegionAuxiliary.

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];

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<CapacityCommitment> getParserForType()
Returns
TypeDescription
Parser<CapacityCommitment>
Overrides

getPlan()

public CapacityCommitment.CommitmentPlan getPlan()

Capacity commitment commitment plan.

.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;

Returns
TypeDescription
CapacityCommitment.CommitmentPlan

The plan.

getPlanValue()

public int getPlanValue()

Capacity commitment commitment plan.

.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan plan = 3;

Returns
TypeDescription
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
TypeDescription
CapacityCommitment.CommitmentPlan

The renewalPlan.

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
TypeDescription
int

The enum numeric value on the wire for renewalPlan.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSlotCount()

public long getSlotCount()

Number of slots in this commitment.

int64 slot_count = 2;

Returns
TypeDescription
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
TypeDescription
CapacityCommitment.State

The state.

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
TypeDescription
int

The enum numeric value on the wire for state.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the failureStatus field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public CapacityCommitment.Builder newBuilderForType()
Returns
TypeDescription
CapacityCommitment.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CapacityCommitment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CapacityCommitment.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public CapacityCommitment.Builder toBuilder()
Returns
TypeDescription
CapacityCommitment.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException