Class ResourcePool.Builder (3.44.0)

public static final class ResourcePool.Builder extends GeneratedMessageV3.Builder<ResourcePool.Builder> implements ResourcePoolOrBuilder

Represents the spec of a group of resources of the same type, for example machine type, disk, and accelerators, in a PersistentResource.

Protobuf type google.cloud.aiplatform.v1beta1.ResourcePool

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ResourcePool build()
Returns
Type Description
ResourcePool

buildPartial()

public ResourcePool buildPartial()
Returns
Type Description
ResourcePool

clear()

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

clearAutoscalingSpec()

public ResourcePool.Builder clearAutoscalingSpec()

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ResourcePool.Builder

clearDiskSpec()

public ResourcePool.Builder clearDiskSpec()

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ResourcePool.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearId()

public ResourcePool.Builder clearId()

Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically.

string id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ResourcePool.Builder

This builder for chaining.

clearMachineSpec()

public ResourcePool.Builder clearMachineSpec()

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ResourcePool.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReplicaCount()

public ResourcePool.Builder clearReplicaCount()

Optional. The total number of machines to use for this resource pool.

optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ResourcePool.Builder

This builder for chaining.

clearUsedReplicaCount()

public ResourcePool.Builder clearUsedReplicaCount()

Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count.

int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ResourcePool.Builder

This builder for chaining.

clone()

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

getAutoscalingSpec()

public ResourcePool.AutoscalingSpec getAutoscalingSpec()

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ResourcePool.AutoscalingSpec

The autoscalingSpec.

getAutoscalingSpecBuilder()

public ResourcePool.AutoscalingSpec.Builder getAutoscalingSpecBuilder()

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ResourcePool.AutoscalingSpec.Builder

getAutoscalingSpecOrBuilder()

public ResourcePool.AutoscalingSpecOrBuilder getAutoscalingSpecOrBuilder()

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ResourcePool.AutoscalingSpecOrBuilder

getDefaultInstanceForType()

public ResourcePool getDefaultInstanceForType()
Returns
Type Description
ResourcePool

getDescriptorForType()

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

getDiskSpec()

public DiskSpec getDiskSpec()

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DiskSpec

The diskSpec.

getDiskSpecBuilder()

public DiskSpec.Builder getDiskSpecBuilder()

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DiskSpec.Builder

getDiskSpecOrBuilder()

public DiskSpecOrBuilder getDiskSpecOrBuilder()

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DiskSpecOrBuilder

getId()

public String getId()

Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically.

string id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically.

string id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for id.

getMachineSpec()

public MachineSpec getMachineSpec()

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MachineSpec

The machineSpec.

getMachineSpecBuilder()

public MachineSpec.Builder getMachineSpecBuilder()

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MachineSpec.Builder

getMachineSpecOrBuilder()

public MachineSpecOrBuilder getMachineSpecOrBuilder()

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MachineSpecOrBuilder

getReplicaCount()

public long getReplicaCount()

Optional. The total number of machines to use for this resource pool.

optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The replicaCount.

getUsedReplicaCount()

public long getUsedReplicaCount()

Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count.

int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The usedReplicaCount.

hasAutoscalingSpec()

public boolean hasAutoscalingSpec()

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the autoscalingSpec field is set.

hasDiskSpec()

public boolean hasDiskSpec()

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the diskSpec field is set.

hasMachineSpec()

public boolean hasMachineSpec()

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
boolean

Whether the machineSpec field is set.

hasReplicaCount()

public boolean hasReplicaCount()

Optional. The total number of machines to use for this resource pool.

optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the replicaCount field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAutoscalingSpec(ResourcePool.AutoscalingSpec value)

public ResourcePool.Builder mergeAutoscalingSpec(ResourcePool.AutoscalingSpec value)

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ResourcePool.AutoscalingSpec
Returns
Type Description
ResourcePool.Builder

mergeDiskSpec(DiskSpec value)

public ResourcePool.Builder mergeDiskSpec(DiskSpec value)

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value DiskSpec
Returns
Type Description
ResourcePool.Builder

mergeFrom(ResourcePool other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMachineSpec(MachineSpec value)

public ResourcePool.Builder mergeMachineSpec(MachineSpec value)

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value MachineSpec
Returns
Type Description
ResourcePool.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAutoscalingSpec(ResourcePool.AutoscalingSpec value)

public ResourcePool.Builder setAutoscalingSpec(ResourcePool.AutoscalingSpec value)

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ResourcePool.AutoscalingSpec
Returns
Type Description
ResourcePool.Builder

setAutoscalingSpec(ResourcePool.AutoscalingSpec.Builder builderForValue)

public ResourcePool.Builder setAutoscalingSpec(ResourcePool.AutoscalingSpec.Builder builderForValue)

Optional. Optional spec to configure GKE autoscaling

.google.cloud.aiplatform.v1beta1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ResourcePool.AutoscalingSpec.Builder
Returns
Type Description
ResourcePool.Builder

setDiskSpec(DiskSpec value)

public ResourcePool.Builder setDiskSpec(DiskSpec value)

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value DiskSpec
Returns
Type Description
ResourcePool.Builder

setDiskSpec(DiskSpec.Builder builderForValue)

public ResourcePool.Builder setDiskSpec(DiskSpec.Builder builderForValue)

Optional. Disk spec for the machine in this node pool.

.google.cloud.aiplatform.v1beta1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue DiskSpec.Builder
Returns
Type Description
ResourcePool.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(String value)

public ResourcePool.Builder setId(String value)

Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically.

string id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The id to set.

Returns
Type Description
ResourcePool.Builder

This builder for chaining.

setIdBytes(ByteString value)

public ResourcePool.Builder setIdBytes(ByteString value)

Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically.

string id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
ResourcePool.Builder

This builder for chaining.

setMachineSpec(MachineSpec value)

public ResourcePool.Builder setMachineSpec(MachineSpec value)

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value MachineSpec
Returns
Type Description
ResourcePool.Builder

setMachineSpec(MachineSpec.Builder builderForValue)

public ResourcePool.Builder setMachineSpec(MachineSpec.Builder builderForValue)

Required. Immutable. The specification of a single machine.

.google.cloud.aiplatform.v1beta1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
builderForValue MachineSpec.Builder
Returns
Type Description
ResourcePool.Builder

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

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

setReplicaCount(long value)

public ResourcePool.Builder setReplicaCount(long value)

Optional. The total number of machines to use for this resource pool.

optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The replicaCount to set.

Returns
Type Description
ResourcePool.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUsedReplicaCount(long value)

public ResourcePool.Builder setUsedReplicaCount(long value)

Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count.

int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The usedReplicaCount to set.

Returns
Type Description
ResourcePool.Builder

This builder for chaining.