<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/custom_job.proto

namespace Google\Cloud\AIPlatform\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The spec of a Python packaged code.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.PythonPackageSpec</code>
 */
class PythonPackageSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * 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](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
     * You must use an image from this list.
     *
     * Generated from protobuf field <code>string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $executor_image_uri = '';
    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $package_uris;
    /**
     * Required. The Python module name to run after installing the packages.
     *
     * Generated from protobuf field <code>string python_module = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $python_module = '';
    /**
     * Command line arguments to be passed to the Python task.
     *
     * Generated from protobuf field <code>repeated string args = 4;</code>
     */
    private $args;
    /**
     * Environment variables to be passed to the python module.
     * Maximum limit is 100.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.EnvVar env = 5;</code>
     */
    private $env;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $executor_image_uri
     *           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](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
     *           You must use an image from this list.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $package_uris
     *           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.
     *     @type string $python_module
     *           Required. The Python module name to run after installing the packages.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $args
     *           Command line arguments to be passed to the Python task.
     *     @type array<\Google\Cloud\AIPlatform\V1\EnvVar>|\Google\Protobuf\Internal\RepeatedField $env
     *           Environment variables to be passed to the python module.
     *           Maximum limit is 100.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\CustomJob::initOnce();
        parent::__construct($data);
    }

    /**
     * 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](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
     * You must use an image from this list.
     *
     * Generated from protobuf field <code>string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getExecutorImageUri()
    {
        return $this->executor_image_uri;
    }

    /**
     * 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](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
     * You must use an image from this list.
     *
     * Generated from protobuf field <code>string executor_image_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setExecutorImageUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->executor_image_uri = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPackageUris()
    {
        return $this->package_uris;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string package_uris = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPackageUris($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->package_uris = $arr;

        return $this;
    }

    /**
     * Required. The Python module name to run after installing the packages.
     *
     * Generated from protobuf field <code>string python_module = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPythonModule()
    {
        return $this->python_module;
    }

    /**
     * Required. The Python module name to run after installing the packages.
     *
     * Generated from protobuf field <code>string python_module = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPythonModule($var)
    {
        GPBUtil::checkString($var, True);
        $this->python_module = $var;

        return $this;
    }

    /**
     * Command line arguments to be passed to the Python task.
     *
     * Generated from protobuf field <code>repeated string args = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getArgs()
    {
        return $this->args;
    }

    /**
     * Command line arguments to be passed to the Python task.
     *
     * Generated from protobuf field <code>repeated string args = 4;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setArgs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->args = $arr;

        return $this;
    }

    /**
     * Environment variables to be passed to the python module.
     * Maximum limit is 100.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.EnvVar env = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEnv()
    {
        return $this->env;
    }

    /**
     * Environment variables to be passed to the python module.
     * Maximum limit is 100.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.EnvVar env = 5;</code>
     * @param array<\Google\Cloud\AIPlatform\V1\EnvVar>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEnv($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\EnvVar::class);
        $this->env = $arr;

        return $this;
    }

}

