Class PythonPackageSpec.Builder (3.48.0)

public static final class PythonPackageSpec.Builder extends GeneratedMessageV3.Builder<PythonPackageSpec.Builder> implements PythonPackageSpecOrBuilder

The spec of a Python packaged code.

Protobuf type google.cloud.aiplatform.v1.PythonPackageSpec

Static Methods

getDescriptor()

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

Methods

addAllArgs(Iterable<String> values)

public PythonPackageSpec.Builder addAllArgs(Iterable<String> values)

Command line arguments to be passed to the Python task.

repeated string args = 4;

Parameter
Name Description
values Iterable<String>

The args to add.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

addAllEnv(Iterable<? extends EnvVar> values)

public PythonPackageSpec.Builder addAllEnv(Iterable<? extends EnvVar> values)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.aiplatform.v1.EnvVar>
Returns
Type Description
PythonPackageSpec.Builder

addAllPackageUris(Iterable<String> values)

public PythonPackageSpec.Builder addAllPackageUris(Iterable<String> values)

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<String>

The packageUris to add.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

addArgs(String value)

public PythonPackageSpec.Builder addArgs(String value)

Command line arguments to be passed to the Python task.

repeated string args = 4;

Parameter
Name Description
value String

The args to add.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

addArgsBytes(ByteString value)

public PythonPackageSpec.Builder addArgsBytes(ByteString value)

Command line arguments to be passed to the Python task.

repeated string args = 4;

Parameter
Name Description
value ByteString

The bytes of the args to add.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

addEnv(EnvVar value)

public PythonPackageSpec.Builder addEnv(EnvVar value)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
value EnvVar
Returns
Type Description
PythonPackageSpec.Builder

addEnv(EnvVar.Builder builderForValue)

public PythonPackageSpec.Builder addEnv(EnvVar.Builder builderForValue)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
builderForValue EnvVar.Builder
Returns
Type Description
PythonPackageSpec.Builder

addEnv(int index, EnvVar value)

public PythonPackageSpec.Builder addEnv(int index, EnvVar value)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameters
Name Description
index int
value EnvVar
Returns
Type Description
PythonPackageSpec.Builder

addEnv(int index, EnvVar.Builder builderForValue)

public PythonPackageSpec.Builder addEnv(int index, EnvVar.Builder builderForValue)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameters
Name Description
index int
builderForValue EnvVar.Builder
Returns
Type Description
PythonPackageSpec.Builder

addEnvBuilder()

public EnvVar.Builder addEnvBuilder()

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Returns
Type Description
EnvVar.Builder

addEnvBuilder(int index)

public EnvVar.Builder addEnvBuilder(int index)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description
EnvVar.Builder

addPackageUris(String value)

public PythonPackageSpec.Builder addPackageUris(String value)

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The packageUris to add.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

addPackageUrisBytes(ByteString value)

public PythonPackageSpec.Builder addPackageUrisBytes(ByteString value)

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes of the packageUris to add.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PythonPackageSpec build()
Returns
Type Description
PythonPackageSpec

buildPartial()

public PythonPackageSpec buildPartial()
Returns
Type Description
PythonPackageSpec

clear()

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

clearArgs()

public PythonPackageSpec.Builder clearArgs()

Command line arguments to be passed to the Python task.

repeated string args = 4;

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

clearEnv()

public PythonPackageSpec.Builder clearEnv()

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Returns
Type Description
PythonPackageSpec.Builder

clearExecutorImageUri()

public PythonPackageSpec.Builder clearExecutorImageUri()

Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of pre-built containers for training. You must use an image from this list.

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

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPackageUris()

public PythonPackageSpec.Builder clearPackageUris()

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

clearPythonModule()

public PythonPackageSpec.Builder clearPythonModule()

Required. The Python module name to run after installing the packages.

string python_module = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

clone()

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

getArgs(int index)

public String getArgs(int index)

Command line arguments to be passed to the Python task.

repeated string args = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The args at the given index.

getArgsBytes(int index)

public ByteString getArgsBytes(int index)

Command line arguments to be passed to the Python task.

repeated string args = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the args at the given index.

getArgsCount()

public int getArgsCount()

Command line arguments to be passed to the Python task.

repeated string args = 4;

Returns
Type Description
int

The count of args.

getArgsList()

public ProtocolStringList getArgsList()

Command line arguments to be passed to the Python task.

repeated string args = 4;

Returns
Type Description
ProtocolStringList

A list containing the args.

getDefaultInstanceForType()

public PythonPackageSpec getDefaultInstanceForType()
Returns
Type Description
PythonPackageSpec

getDescriptorForType()

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

getEnv(int index)

public EnvVar getEnv(int index)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description
EnvVar

getEnvBuilder(int index)

public EnvVar.Builder getEnvBuilder(int index)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description
EnvVar.Builder

getEnvBuilderList()

public List<EnvVar.Builder> getEnvBuilderList()

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Returns
Type Description
List<Builder>

getEnvCount()

public int getEnvCount()

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Returns
Type Description
int

getEnvList()

public List<EnvVar> getEnvList()

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Returns
Type Description
List<EnvVar>

getEnvOrBuilder(int index)

public EnvVarOrBuilder getEnvOrBuilder(int index)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description
EnvVarOrBuilder

getEnvOrBuilderList()

public List<? extends EnvVarOrBuilder> getEnvOrBuilderList()

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1.EnvVarOrBuilder>

getExecutorImageUri()

public String getExecutorImageUri()

Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of pre-built containers for training. You must use an image from this list.

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

Returns
Type Description
String

The executorImageUri.

getExecutorImageUriBytes()

public ByteString getExecutorImageUriBytes()

Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of pre-built containers for training. You must use an image from this list.

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

Returns
Type Description
ByteString

The bytes for executorImageUri.

getPackageUris(int index)

public String getPackageUris(int index)

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The packageUris at the given index.

getPackageUrisBytes(int index)

public ByteString getPackageUrisBytes(int index)

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the packageUris at the given index.

getPackageUrisCount()

public int getPackageUrisCount()

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of packageUris.

getPackageUrisList()

public ProtocolStringList getPackageUrisList()

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the packageUris.

getPythonModule()

public String getPythonModule()

Required. The Python module name to run after installing the packages.

string python_module = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The pythonModule.

getPythonModuleBytes()

public ByteString getPythonModuleBytes()

Required. The Python module name to run after installing the packages.

string python_module = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for pythonModule.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PythonPackageSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeEnv(int index)

public PythonPackageSpec.Builder removeEnv(int index)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameter
Name Description
index int
Returns
Type Description
PythonPackageSpec.Builder

setArgs(int index, String value)

public PythonPackageSpec.Builder setArgs(int index, String value)

Command line arguments to be passed to the Python task.

repeated string args = 4;

Parameters
Name Description
index int

The index to set the value at.

value String

The args to set.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

setEnv(int index, EnvVar value)

public PythonPackageSpec.Builder setEnv(int index, EnvVar value)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameters
Name Description
index int
value EnvVar
Returns
Type Description
PythonPackageSpec.Builder

setEnv(int index, EnvVar.Builder builderForValue)

public PythonPackageSpec.Builder setEnv(int index, EnvVar.Builder builderForValue)

Environment variables to be passed to the python module. Maximum limit is 100.

repeated .google.cloud.aiplatform.v1.EnvVar env = 5;

Parameters
Name Description
index int
builderForValue EnvVar.Builder
Returns
Type Description
PythonPackageSpec.Builder

setExecutorImageUri(String value)

public PythonPackageSpec.Builder setExecutorImageUri(String value)

Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of pre-built containers for training. You must use an image from this list.

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

Parameter
Name Description
value String

The executorImageUri to set.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

setExecutorImageUriBytes(ByteString value)

public PythonPackageSpec.Builder setExecutorImageUriBytes(ByteString value)

Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of pre-built containers for training. You must use an image from this list.

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

Parameter
Name Description
value ByteString

The bytes for executorImageUri to set.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setPackageUris(int index, String value)

public PythonPackageSpec.Builder setPackageUris(int index, String value)

Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.

repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value String

The packageUris to set.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

setPythonModule(String value)

public PythonPackageSpec.Builder setPythonModule(String value)

Required. The Python module name to run after installing the packages.

string python_module = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The pythonModule to set.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

setPythonModuleBytes(ByteString value)

public PythonPackageSpec.Builder setPythonModuleBytes(ByteString value)

Required. The Python module name to run after installing the packages.

string python_module = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for pythonModule to set.

Returns
Type Description
PythonPackageSpec.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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