Class ResourcePool.Builder (3.30.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
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()

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
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()

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

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
NameDescription
valueString

The id to set.

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

The bytes for id 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.