Class CreateCapacityCommitmentRequest.Builder (2.24.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateCapacityCommitmentRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder
Overrides

build()

public CreateCapacityCommitmentRequest build()
Returns
TypeDescription
CreateCapacityCommitmentRequest

buildPartial()

public CreateCapacityCommitmentRequest buildPartial()
Returns
TypeDescription
CreateCapacityCommitmentRequest

clear()

public CreateCapacityCommitmentRequest.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CreateCapacityCommitmentRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateCapacityCommitmentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

clone()

public CreateCapacityCommitmentRequest.Builder clone()
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder
Overrides

getCapacityCommitment()

public CapacityCommitment getCapacityCommitment()

Content of the capacity commitment to create.

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

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

getDefaultInstanceForType()

public CreateCapacityCommitmentRequest getDefaultInstanceForType()
Returns
TypeDescription
CreateCapacityCommitmentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the capacityCommitment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueCapacityCommitment
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder

mergeFrom(CreateCapacityCommitmentRequest other)

public CreateCapacityCommitmentRequest.Builder mergeFrom(CreateCapacityCommitmentRequest other)
Parameter
NameDescription
otherCreateCapacityCommitmentRequest
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateCapacityCommitmentRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CreateCapacityCommitmentRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateCapacityCommitmentRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueCapacityCommitment
Returns
TypeDescription
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
NameDescription
builderForValueCapacityCommitment.Builder
Returns
TypeDescription
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
NameDescription
valueString

The capacityCommitmentId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for capacityCommitmentId to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The enforceSingleAdminProjectPerOrg to set.

Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CreateCapacityCommitmentRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The parent to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateCapacityCommitmentRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CreateCapacityCommitmentRequest.Builder
Overrides