Class CreateCapacityCommitmentRequest.Builder (2.53.0)

public static final class CreateCapacityCommitmentRequest.Builder extends GeneratedMessageV3.Builder<CreateCapacityCommitmentRequest.Builder> implements CreateCapacityCommitmentRequestOrBuilder

The request for ReservationService.CreateCapacityCommitment.

Protobuf type google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateCapacityCommitmentRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

build()

public CreateCapacityCommitmentRequest build()
Returns
Type Description
CreateCapacityCommitmentRequest

buildPartial()

public CreateCapacityCommitmentRequest buildPartial()
Returns
Type Description
CreateCapacityCommitmentRequest

clear()

public CreateCapacityCommitmentRequest.Builder clear()
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

clearCapacityCommitment()

public CreateCapacityCommitmentRequest.Builder clearCapacityCommitment()

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

clearCapacityCommitmentId()

public CreateCapacityCommitmentRequest.Builder clearCapacityCommitmentId()

The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged.

string capacity_commitment_id = 5;

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

clearEnforceSingleAdminProjectPerOrg()

public CreateCapacityCommitmentRequest.Builder clearEnforceSingleAdminProjectPerOrg()

If true, fail the request if another project in the organization has a capacity commitment.

bool enforce_single_admin_project_per_org = 4;

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CreateCapacityCommitmentRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateCapacityCommitmentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

clearParent()

public CreateCapacityCommitmentRequest.Builder clearParent()

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

clone()

public CreateCapacityCommitmentRequest.Builder clone()
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

getCapacityCommitment()

public CapacityCommitment getCapacityCommitment()

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Returns
Type Description
CapacityCommitment

The capacityCommitment.

getCapacityCommitmentBuilder()

public CapacityCommitment.Builder getCapacityCommitmentBuilder()

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Returns
Type Description
CapacityCommitment.Builder

getCapacityCommitmentId()

public String getCapacityCommitmentId()

The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged.

string capacity_commitment_id = 5;

Returns
Type Description
String

The capacityCommitmentId.

getCapacityCommitmentIdBytes()

public ByteString getCapacityCommitmentIdBytes()

The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged.

string capacity_commitment_id = 5;

Returns
Type Description
ByteString

The bytes for capacityCommitmentId.

getCapacityCommitmentOrBuilder()

public CapacityCommitmentOrBuilder getCapacityCommitmentOrBuilder()

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Returns
Type Description
CapacityCommitmentOrBuilder

getDefaultInstanceForType()

public CreateCapacityCommitmentRequest getDefaultInstanceForType()
Returns
Type Description
CreateCapacityCommitmentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnforceSingleAdminProjectPerOrg()

public boolean getEnforceSingleAdminProjectPerOrg()

If true, fail the request if another project in the organization has a capacity commitment.

bool enforce_single_admin_project_per_org = 4;

Returns
Type Description
boolean

The enforceSingleAdminProjectPerOrg.

getParent()

public String getParent()

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

hasCapacityCommitment()

public boolean hasCapacityCommitment()

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Returns
Type Description
boolean

Whether the capacityCommitment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCapacityCommitment(CapacityCommitment value)

public CreateCapacityCommitmentRequest.Builder mergeCapacityCommitment(CapacityCommitment value)

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Parameter
Name Description
value CapacityCommitment
Returns
Type Description
CreateCapacityCommitmentRequest.Builder

mergeFrom(CreateCapacityCommitmentRequest other)

public CreateCapacityCommitmentRequest.Builder mergeFrom(CreateCapacityCommitmentRequest other)
Parameter
Name Description
other CreateCapacityCommitmentRequest
Returns
Type Description
CreateCapacityCommitmentRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateCapacityCommitmentRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CreateCapacityCommitmentRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateCapacityCommitmentRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

setCapacityCommitment(CapacityCommitment value)

public CreateCapacityCommitmentRequest.Builder setCapacityCommitment(CapacityCommitment value)

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Parameter
Name Description
value CapacityCommitment
Returns
Type Description
CreateCapacityCommitmentRequest.Builder

setCapacityCommitment(CapacityCommitment.Builder builderForValue)

public CreateCapacityCommitmentRequest.Builder setCapacityCommitment(CapacityCommitment.Builder builderForValue)

Content of the capacity commitment to create.

.google.cloud.bigquery.reservation.v1.CapacityCommitment capacity_commitment = 2;

Parameter
Name Description
builderForValue CapacityCommitment.Builder
Returns
Type Description
CreateCapacityCommitmentRequest.Builder

setCapacityCommitmentId(String value)

public CreateCapacityCommitmentRequest.Builder setCapacityCommitmentId(String value)

The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged.

string capacity_commitment_id = 5;

Parameter
Name Description
value String

The capacityCommitmentId to set.

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

setCapacityCommitmentIdBytes(ByteString value)

public CreateCapacityCommitmentRequest.Builder setCapacityCommitmentIdBytes(ByteString value)

The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged.

string capacity_commitment_id = 5;

Parameter
Name Description
value ByteString

The bytes for capacityCommitmentId to set.

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

setEnforceSingleAdminProjectPerOrg(boolean value)

public CreateCapacityCommitmentRequest.Builder setEnforceSingleAdminProjectPerOrg(boolean value)

If true, fail the request if another project in the organization has a capacity commitment.

bool enforce_single_admin_project_per_org = 4;

Parameter
Name Description
value boolean

The enforceSingleAdminProjectPerOrg to set.

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CreateCapacityCommitmentRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

setParent(String value)

public CreateCapacityCommitmentRequest.Builder setParent(String value)

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateCapacityCommitmentRequest.Builder setParentBytes(ByteString value)

Required. Resource name of the parent reservation. E.g., projects/myproject/locations/US

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CreateCapacityCommitmentRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateCapacityCommitmentRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateCapacityCommitmentRequest.Builder
Overrides