Class ResourcePool.Builder (3.24.0)

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

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

Protobuf type google.cloud.aiplatform.v1beta1.ResourcePool

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ResourcePool build()
Returns
TypeDescription
ResourcePool

buildPartial()

public ResourcePool buildPartial()
Returns
TypeDescription
ResourcePool

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearId()

public ResourcePool.Builder clearId()

Optional. The unique ID in a PersistentResource to refer the this resource pool. User can specify it if need to use it, otherwise we will generate it automatically.

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

Returns
TypeDescription
ResourcePool.Builder

This builder for chaining.

clearIdleReplicaCount() (deprecated)

public ResourcePool.Builder clearIdleReplicaCount()

Deprecated. google.cloud.aiplatform.v1beta1.ResourcePool.idle_replica_count is deprecated. See google/cloud/aiplatform/v1beta1/persistent_resource.proto;l=187

Output only. The number of machines currently not in use by training jobs for this resource pool. Deprecated. Use used_replica_count instead.

int64 idle_replica_count = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
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
TypeDescription
ResourcePool.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clone()

public ResourcePool.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ResourcePool.AutoscalingSpecOrBuilder

getDefaultInstanceForType()

public ResourcePool getDefaultInstanceForType()
Returns
TypeDescription
ResourcePool

getDescriptorForType()

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

getId()

public String getId()

Optional. The unique ID in a PersistentResource to refer the this resource pool. User can specify it if need to use it, otherwise we will generate it automatically.

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

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Optional. The unique ID in a PersistentResource to refer the this resource pool. User can specify it if need to use it, otherwise we will generate it automatically.

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

Returns
TypeDescription
ByteString

The bytes for id.

getIdleReplicaCount() (deprecated)

public long getIdleReplicaCount()

Deprecated. google.cloud.aiplatform.v1beta1.ResourcePool.idle_replica_count is deprecated. See google/cloud/aiplatform/v1beta1/persistent_resource.proto;l=187

Output only. The number of machines currently not in use by training jobs for this resource pool. Deprecated. Use used_replica_count instead.

int64 idle_replica_count = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The idleReplicaCount.

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

Whether the replicaCount field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueResourcePool.AutoscalingSpec
Returns
TypeDescription
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
NameDescription
valueDiskSpec
Returns
TypeDescription
ResourcePool.Builder

mergeFrom(ResourcePool other)

public ResourcePool.Builder mergeFrom(ResourcePool other)
Parameter
NameDescription
otherResourcePool
Returns
TypeDescription
ResourcePool.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ResourcePool.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueMachineSpec
Returns
TypeDescription
ResourcePool.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ResourcePool.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueResourcePool.AutoscalingSpec
Returns
TypeDescription
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
NameDescription
builderForValueResourcePool.AutoscalingSpec.Builder
Returns
TypeDescription
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
NameDescription
valueDiskSpec
Returns
TypeDescription
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
NameDescription
builderForValueDiskSpec.Builder
Returns
TypeDescription
ResourcePool.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(String value)

public ResourcePool.Builder setId(String value)

Optional. The unique ID in a PersistentResource to refer the this resource pool. User can specify it if need to use it, otherwise we will generate it automatically.

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

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
ResourcePool.Builder

This builder for chaining.

setIdBytes(ByteString value)

public ResourcePool.Builder setIdBytes(ByteString value)

Optional. The unique ID in a PersistentResource to refer the this resource pool. User can specify it if need to use it, otherwise we will generate it automatically.

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

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
ResourcePool.Builder

This builder for chaining.

setIdleReplicaCount(long value) (deprecated)

public ResourcePool.Builder setIdleReplicaCount(long value)

Deprecated. google.cloud.aiplatform.v1beta1.ResourcePool.idle_replica_count is deprecated. See google/cloud/aiplatform/v1beta1/persistent_resource.proto;l=187

Output only. The number of machines currently not in use by training jobs for this resource pool. Deprecated. Use used_replica_count instead.

int64 idle_replica_count = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuelong

The idleReplicaCount to set.

Returns
TypeDescription
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
NameDescription
valueMachineSpec
Returns
TypeDescription
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
NameDescription
builderForValueMachineSpec.Builder
Returns
TypeDescription
ResourcePool.Builder

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

public ResourcePool.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valuelong

The replicaCount to set.

Returns
TypeDescription
ResourcePool.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ResourcePool.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuelong

The usedReplicaCount to set.

Returns
TypeDescription
ResourcePool.Builder

This builder for chaining.