Class UsageResourceAllowanceSpec.Builder (0.40.0)

public static final class UsageResourceAllowanceSpec.Builder extends GeneratedMessageV3.Builder<UsageResourceAllowanceSpec.Builder> implements UsageResourceAllowanceSpecOrBuilder

Spec of a usage ResourceAllowance.

Protobuf type google.cloud.batch.v1alpha.UsageResourceAllowanceSpec

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public UsageResourceAllowanceSpec build()
Returns
Type Description
UsageResourceAllowanceSpec

buildPartial()

public UsageResourceAllowanceSpec buildPartial()
Returns
Type Description
UsageResourceAllowanceSpec

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearLimit()

public UsageResourceAllowanceSpec.Builder clearLimit()

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UsageResourceAllowanceSpec.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearType()

public UsageResourceAllowanceSpec.Builder clearType()

Required. Spec type is unique for each usage ResourceAllowance. Batch now only supports type as "cpu-core-hours" for CPU usage consumption tracking.

string type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UsageResourceAllowanceSpec.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public UsageResourceAllowanceSpec getDefaultInstanceForType()
Returns
Type Description
UsageResourceAllowanceSpec

getDescriptorForType()

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

getLimit()

public UsageResourceAllowanceSpec.Limit getLimit()

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UsageResourceAllowanceSpec.Limit

The limit.

getLimitBuilder()

public UsageResourceAllowanceSpec.Limit.Builder getLimitBuilder()

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UsageResourceAllowanceSpec.Limit.Builder

getLimitOrBuilder()

public UsageResourceAllowanceSpec.LimitOrBuilder getLimitOrBuilder()

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UsageResourceAllowanceSpec.LimitOrBuilder

getType()

public String getType()

Required. Spec type is unique for each usage ResourceAllowance. Batch now only supports type as "cpu-core-hours" for CPU usage consumption tracking.

string type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

Required. Spec type is unique for each usage ResourceAllowance. Batch now only supports type as "cpu-core-hours" for CPU usage consumption tracking.

string type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for type.

hasLimit()

public boolean hasLimit()

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the limit field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(UsageResourceAllowanceSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeLimit(UsageResourceAllowanceSpec.Limit value)

public UsageResourceAllowanceSpec.Builder mergeLimit(UsageResourceAllowanceSpec.Limit value)

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value UsageResourceAllowanceSpec.Limit
Returns
Type Description
UsageResourceAllowanceSpec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setLimit(UsageResourceAllowanceSpec.Limit value)

public UsageResourceAllowanceSpec.Builder setLimit(UsageResourceAllowanceSpec.Limit value)

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value UsageResourceAllowanceSpec.Limit
Returns
Type Description
UsageResourceAllowanceSpec.Builder

setLimit(UsageResourceAllowanceSpec.Limit.Builder builderForValue)

public UsageResourceAllowanceSpec.Builder setLimit(UsageResourceAllowanceSpec.Limit.Builder builderForValue)

Required. Threshold of a UsageResourceAllowance limiting how many resources can be consumed for each type.

.google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit limit = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue UsageResourceAllowanceSpec.Limit.Builder
Returns
Type Description
UsageResourceAllowanceSpec.Builder

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

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

setType(String value)

public UsageResourceAllowanceSpec.Builder setType(String value)

Required. Spec type is unique for each usage ResourceAllowance. Batch now only supports type as "cpu-core-hours" for CPU usage consumption tracking.

string type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The type to set.

Returns
Type Description
UsageResourceAllowanceSpec.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public UsageResourceAllowanceSpec.Builder setTypeBytes(ByteString value)

Required. Spec type is unique for each usage ResourceAllowance. Batch now only supports type as "cpu-core-hours" for CPU usage consumption tracking.

string type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for type to set.

Returns
Type Description
UsageResourceAllowanceSpec.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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