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

namespace Google\Cloud\AIPlatform\V1\DeployRequest;

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

/**
 * The model config to use for the deployment.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.DeployRequest.ModelConfig</code>
 */
class ModelConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Whether the user accepts the End User License Agreement (EULA)
     * for the model.
     *
     * Generated from protobuf field <code>bool accept_eula = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $accept_eula = false;
    /**
     * Optional. The Hugging Face read access token used to access the model
     * artifacts of gated models.
     *
     * Generated from protobuf field <code>string hugging_face_access_token = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $hugging_face_access_token = '';
    /**
     * Optional. If true, the model will deploy with a cached version instead of
     * directly downloading the model artifacts from Hugging Face. This is
     * suitable for VPC-SC users with limited internet access.
     *
     * Generated from protobuf field <code>bool hugging_face_cache_enabled = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $hugging_face_cache_enabled = false;
    /**
     * Optional. The user-specified display name of the uploaded model. If not
     * set, a default name will be used.
     *
     * Generated from protobuf field <code>string model_display_name = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $model_display_name = '';
    /**
     * Optional. The specification of the container that is to be used when
     * deploying. If not set, the default container spec will be used.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $container_spec = null;
    /**
     * Optional. The ID to use for the uploaded Model, which will become the
     * final component of the model resource name. When not provided, Vertex AI
     * will generate a value for this ID. When Model Registry model is provided,
     * this field will be ignored.
     * This value may be up to 63 characters, and valid characters are
     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
     *
     * Generated from protobuf field <code>string model_user_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $model_user_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $accept_eula
     *           Optional. Whether the user accepts the End User License Agreement (EULA)
     *           for the model.
     *     @type string $hugging_face_access_token
     *           Optional. The Hugging Face read access token used to access the model
     *           artifacts of gated models.
     *     @type bool $hugging_face_cache_enabled
     *           Optional. If true, the model will deploy with a cached version instead of
     *           directly downloading the model artifacts from Hugging Face. This is
     *           suitable for VPC-SC users with limited internet access.
     *     @type string $model_display_name
     *           Optional. The user-specified display name of the uploaded model. If not
     *           set, a default name will be used.
     *     @type \Google\Cloud\AIPlatform\V1\ModelContainerSpec $container_spec
     *           Optional. The specification of the container that is to be used when
     *           deploying. If not set, the default container spec will be used.
     *     @type string $model_user_id
     *           Optional. The ID to use for the uploaded Model, which will become the
     *           final component of the model resource name. When not provided, Vertex AI
     *           will generate a value for this ID. When Model Registry model is provided,
     *           this field will be ignored.
     *           This value may be up to 63 characters, and valid characters are
     *           `[a-z0-9_-]`. The first character cannot be a number or hyphen.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelGardenService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Whether the user accepts the End User License Agreement (EULA)
     * for the model.
     *
     * Generated from protobuf field <code>bool accept_eula = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getAcceptEula()
    {
        return $this->accept_eula;
    }

    /**
     * Optional. Whether the user accepts the End User License Agreement (EULA)
     * for the model.
     *
     * Generated from protobuf field <code>bool accept_eula = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setAcceptEula($var)
    {
        GPBUtil::checkBool($var);
        $this->accept_eula = $var;

        return $this;
    }

    /**
     * Optional. The Hugging Face read access token used to access the model
     * artifacts of gated models.
     *
     * Generated from protobuf field <code>string hugging_face_access_token = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getHuggingFaceAccessToken()
    {
        return $this->hugging_face_access_token;
    }

    /**
     * Optional. The Hugging Face read access token used to access the model
     * artifacts of gated models.
     *
     * Generated from protobuf field <code>string hugging_face_access_token = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setHuggingFaceAccessToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->hugging_face_access_token = $var;

        return $this;
    }

    /**
     * Optional. If true, the model will deploy with a cached version instead of
     * directly downloading the model artifacts from Hugging Face. This is
     * suitable for VPC-SC users with limited internet access.
     *
     * Generated from protobuf field <code>bool hugging_face_cache_enabled = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getHuggingFaceCacheEnabled()
    {
        return $this->hugging_face_cache_enabled;
    }

    /**
     * Optional. If true, the model will deploy with a cached version instead of
     * directly downloading the model artifacts from Hugging Face. This is
     * suitable for VPC-SC users with limited internet access.
     *
     * Generated from protobuf field <code>bool hugging_face_cache_enabled = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setHuggingFaceCacheEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->hugging_face_cache_enabled = $var;

        return $this;
    }

    /**
     * Optional. The user-specified display name of the uploaded model. If not
     * set, a default name will be used.
     *
     * Generated from protobuf field <code>string model_display_name = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getModelDisplayName()
    {
        return $this->model_display_name;
    }

    /**
     * Optional. The user-specified display name of the uploaded model. If not
     * set, a default name will be used.
     *
     * Generated from protobuf field <code>string model_display_name = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setModelDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->model_display_name = $var;

        return $this;
    }

    /**
     * Optional. The specification of the container that is to be used when
     * deploying. If not set, the default container spec will be used.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\ModelContainerSpec|null
     */
    public function getContainerSpec()
    {
        return $this->container_spec;
    }

    public function hasContainerSpec()
    {
        return isset($this->container_spec);
    }

    public function clearContainerSpec()
    {
        unset($this->container_spec);
    }

    /**
     * Optional. The specification of the container that is to be used when
     * deploying. If not set, the default container spec will be used.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelContainerSpec container_spec = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\ModelContainerSpec $var
     * @return $this
     */
    public function setContainerSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ModelContainerSpec::class);
        $this->container_spec = $var;

        return $this;
    }

    /**
     * Optional. The ID to use for the uploaded Model, which will become the
     * final component of the model resource name. When not provided, Vertex AI
     * will generate a value for this ID. When Model Registry model is provided,
     * this field will be ignored.
     * This value may be up to 63 characters, and valid characters are
     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
     *
     * Generated from protobuf field <code>string model_user_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getModelUserId()
    {
        return $this->model_user_id;
    }

    /**
     * Optional. The ID to use for the uploaded Model, which will become the
     * final component of the model resource name. When not provided, Vertex AI
     * will generate a value for this ID. When Model Registry model is provided,
     * this field will be ignored.
     * This value may be up to 63 characters, and valid characters are
     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
     *
     * Generated from protobuf field <code>string model_user_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setModelUserId($var)
    {
        GPBUtil::checkString($var, True);
        $this->model_user_id = $var;

        return $this;
    }

}


