Class PersistentResource.Builder (3.32.0)

public static final class PersistentResource.Builder extends GeneratedMessageV3.Builder<PersistentResource.Builder> implements PersistentResourceOrBuilder

Represents long-lasting resources that are dedicated to users to runs custom workloads. A PersistentResource can have multiple node pools and each node pool can have its own machine spec.

Protobuf type google.cloud.aiplatform.v1beta1.PersistentResource

Static Methods

getDescriptor()

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

Methods

addAllReservedIpRanges(Iterable<String> values)

public PersistentResource.Builder addAllReservedIpRanges(Iterable<String> values)

Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource.

If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network.

Example: ['vertex-ai-ip-range'].

repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The reservedIpRanges to add.

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

addAllResourcePools(Iterable<? extends ResourcePool> values)

public PersistentResource.Builder addAllResourcePools(Iterable<? extends ResourcePool> values)

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.aiplatform.v1beta1.ResourcePool>
Returns
TypeDescription
PersistentResource.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addReservedIpRanges(String value)

public PersistentResource.Builder addReservedIpRanges(String value)

Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource.

If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network.

Example: ['vertex-ai-ip-range'].

repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The reservedIpRanges to add.

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

addReservedIpRangesBytes(ByteString value)

public PersistentResource.Builder addReservedIpRangesBytes(ByteString value)

Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource.

If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network.

Example: ['vertex-ai-ip-range'].

repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the reservedIpRanges to add.

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

addResourcePools(ResourcePool value)

public PersistentResource.Builder addResourcePools(ResourcePool value)

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueResourcePool
Returns
TypeDescription
PersistentResource.Builder

addResourcePools(ResourcePool.Builder builderForValue)

public PersistentResource.Builder addResourcePools(ResourcePool.Builder builderForValue)

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueResourcePool.Builder
Returns
TypeDescription
PersistentResource.Builder

addResourcePools(int index, ResourcePool value)

public PersistentResource.Builder addResourcePools(int index, ResourcePool value)

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
valueResourcePool
Returns
TypeDescription
PersistentResource.Builder

addResourcePools(int index, ResourcePool.Builder builderForValue)

public PersistentResource.Builder addResourcePools(int index, ResourcePool.Builder builderForValue)

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueResourcePool.Builder
Returns
TypeDescription
PersistentResource.Builder

addResourcePoolsBuilder()

public ResourcePool.Builder addResourcePoolsBuilder()

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ResourcePool.Builder

addResourcePoolsBuilder(int index)

public ResourcePool.Builder addResourcePoolsBuilder(int index)

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
ResourcePool.Builder

build()

public PersistentResource build()
Returns
TypeDescription
PersistentResource

buildPartial()

public PersistentResource buildPartial()
Returns
TypeDescription
PersistentResource

clear()

public PersistentResource.Builder clear()
Returns
TypeDescription
PersistentResource.Builder
Overrides

clearCreateTime()

public PersistentResource.Builder clearCreateTime()

Output only. Time when the PersistentResource was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
PersistentResource.Builder

clearDisplayName()

public PersistentResource.Builder clearDisplayName()

Optional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

clearEncryptionSpec()

public PersistentResource.Builder clearEncryptionSpec()

Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PersistentResource.Builder

clearError()

public PersistentResource.Builder clearError()

Output only. Only populated when persistent resource's state is STOPPING or ERROR.

.google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
PersistentResource.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public PersistentResource.Builder clearLabels()
Returns
TypeDescription
PersistentResource.Builder

clearName()

public PersistentResource.Builder clearName()

Immutable. Resource name of a PersistentResource.

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

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

clearNetwork()

public PersistentResource.Builder clearNetwork()

Optional. The full name of the Compute Engine network to peered with Vertex AI to host the persistent resources. For example, projects/12345/global/networks/myVPC. Format is of the form projects/{project}/global/networks/{network}. Where {project} is a project number, as in 12345, and {network} is a network name.

To specify this field, you must have already configured VPC Network Peering for Vertex AI.

If this field is left unspecified, the resources aren't peered with any network.

string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PersistentResource.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PersistentResource.Builder
Overrides

clearReservedIpRanges()

public PersistentResource.Builder clearReservedIpRanges()

Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource.

If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network.

Example: ['vertex-ai-ip-range'].

repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

clearResourcePools()

public PersistentResource.Builder clearResourcePools()

Required. The spec of the pools of different resources.

repeated .google.cloud.aiplatform.v1beta1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
PersistentResource.Builder

clearResourceRuntime()

public PersistentResource.Builder clearResourceRuntime()

Output only. Runtime information of the Persistent Resource.

.google.cloud.aiplatform.v1beta1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
PersistentResource.Builder

clearResourceRuntimeSpec()

public PersistentResource.Builder clearResourceRuntimeSpec()

Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration.

.google.cloud.aiplatform.v1beta1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
PersistentResource.Builder

clearStartTime()

public PersistentResource.Builder clearStartTime()

Output only. Time when the PersistentResource for the first time entered the RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
PersistentResource.Builder

clearState()

public PersistentResource.Builder clearState()

Output only. The detailed state of a Study.

.google.cloud.aiplatform.v1beta1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
PersistentResource.Builder

This builder for chaining.

clearUpdateTime()

public PersistentResource.Builder clearUpdateTime()

Output only. Time when the PersistentResource was most recently updated.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
PersistentResource.Builder

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Optional. The labels with user-defined metadata to organize PersistentResource.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when the PersistentResource was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when the PersistentResource was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when the PersistentResource was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public PersistentResource getDefaultInstanceForType()
Returns
TypeDescription
PersistentResource

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Optional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for displayName.

getEncryptionSpec()

public EncryptionSpec getEncryptionSpec()

Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EncryptionSpec

The encryptionSpec.

getEncryptionSpecBuilder()

public EncryptionSpec.Builder getEncryptionSpecBuilder()

Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EncryptionSpec.Builder

getEncryptionSpecOrBuilder()

public EncryptionSpecOrBuilder getEncryptionSpecOrBuilder()

Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key.

.google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EncryptionSpecOrBuilder

getError()

public Status getError()

Output only. Only populated when persistent resource's state is STOPPING or ERROR.

.google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.Status

The error.

getErrorBuilder()

public Status.Builder getErrorBuilder()

Output only. Only populated when persistent resource's state is STOPPING or ERROR.

.google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

Output only. Only populated when persistent resource's state is STOPPING or ERROR.

.google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. The labels with user-defined metadata to organize PersistentResource.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. The labels with user-defined metadata to organize PersistentResource.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. The labels with user-defined metadata to organize PersistentResource.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. The labels with user-defined metadata to organize PersistentResource.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Immutable. Resource name of a PersistentResource.

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Resource name of a PersistentResource.

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

Returns
TypeDescription
ByteString

The bytes for name.

getNetwork()

public String getNetwork()

Optional. The full name of the Compute Engine network to peered with Vertex AI to host the persistent resources. For example, projects/12345/global/networks/myVPC. Format is of the form projects/{project}/global/networks/{network}. Where {project} is a project number, as in 12345, and {network} is a network name.

To specify this field, you must have already configured VPC Network Peering for Vertex AI.

If this field is left unspecified, the resources aren't peered with any network.

string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

Optional. The full name of the Compute Engine network to peered with Vertex AI to host the persistent resources. For example, projects/12345/global/networks/myVPC. Format is of the form projects/{project}/global/networks/{network}. Where {project} is a project number, as in 12345, and {network} is a network name.

To specify this field, you must have already configured VPC Network Peering for Vertex AI.

If this field is left unspecified, the resources aren't peered with any network.

string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for network.

getReservedIpRanges(int index)

public String getReservedIpRanges(int index)

Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource.

If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network.

Example: ['vertex-ai-ip-range'].

repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The reservedIpRanges at the given index.

getReservedIpRangesBytes(int index)

public ByteString getReservedIpRangesBytes(int index)

Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource.

If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network.

Example: ['vertex-ai-ip-range'].

repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the reservedIpRanges at the given index.

getReservedIpRangesCount()