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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Request message for
 * [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.UploadModelRequest</code>
 */
class UploadModelRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the Location into which to upload the Model.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Optional. The resource name of the model into which to upload the version.
     * Only specify this field when uploading a new version.
     *
     * Generated from protobuf field <code>string parent_model = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $parent_model = '';
    /**
     * Optional. The ID to use for the uploaded Model, which will become the final
     * component of the model resource name.
     * 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_id = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $model_id = '';
    /**
     * Required. The Model to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $model = null;
    /**
     * Optional. The user-provided custom service account to use to do the model
     * upload. If empty, [Vertex AI Service
     * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
     * will be used. Users uploading the Model must have the
     * `iam.serviceAccounts.actAs` permission on this service account. Also, this
     * account must belong to the project specified in the `parent` field and have
     * all necessary read permissions.
     *
     * Generated from protobuf field <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $service_account = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the Location into which to upload the Model.
     *           Format: `projects/{project}/locations/{location}`
     *     @type string $parent_model
     *           Optional. The resource name of the model into which to upload the version.
     *           Only specify this field when uploading a new version.
     *     @type string $model_id
     *           Optional. The ID to use for the uploaded Model, which will become the final
     *           component of the model resource name.
     *           This value may be up to 63 characters, and valid characters are
     *           `[a-z0-9_-]`. The first character cannot be a number or hyphen.
     *     @type \Google\Cloud\AIPlatform\V1\Model $model
     *           Required. The Model to create.
     *     @type string $service_account
     *           Optional. The user-provided custom service account to use to do the model
     *           upload. If empty, [Vertex AI Service
     *           Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
     *           will be used. Users uploading the Model must have the
     *           `iam.serviceAccounts.actAs` permission on this service account. Also, this
     *           account must belong to the project specified in the `parent` field and have
     *           all necessary read permissions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the Location into which to upload the Model.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The resource name of the Location into which to upload the Model.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Optional. The resource name of the model into which to upload the version.
     * Only specify this field when uploading a new version.
     *
     * Generated from protobuf field <code>string parent_model = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getParentModel()
    {
        return $this->parent_model;
    }

    /**
     * Optional. The resource name of the model into which to upload the version.
     * Only specify this field when uploading a new version.
     *
     * Generated from protobuf field <code>string parent_model = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setParentModel($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent_model = $var;

        return $this;
    }

    /**
     * Optional. The ID to use for the uploaded Model, which will become the final
     * component of the model resource name.
     * 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_id = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getModelId()
    {
        return $this->model_id;
    }

    /**
     * Optional. The ID to use for the uploaded Model, which will become the final
     * component of the model resource name.
     * 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_id = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setModelId($var)
    {
        GPBUtil::checkString($var, True);
        $this->model_id = $var;

        return $this;
    }

    /**
     * Required. The Model to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\Model|null
     */
    public function getModel()
    {
        return $this->model;
    }

    public function hasModel()
    {
        return isset($this->model);
    }

    public function clearModel()
    {
        unset($this->model);
    }

    /**
     * Required. The Model to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Model model = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\Model $var
     * @return $this
     */
    public function setModel($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Model::class);
        $this->model = $var;

        return $this;
    }

    /**
     * Optional. The user-provided custom service account to use to do the model
     * upload. If empty, [Vertex AI Service
     * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
     * will be used. Users uploading the Model must have the
     * `iam.serviceAccounts.actAs` permission on this service account. Also, this
     * account must belong to the project specified in the `parent` field and have
     * all necessary read permissions.
     *
     * Generated from protobuf field <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getServiceAccount()
    {
        return $this->service_account;
    }

    /**
     * Optional. The user-provided custom service account to use to do the model
     * upload. If empty, [Vertex AI Service
     * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
     * will be used. Users uploading the Model must have the
     * `iam.serviceAccounts.actAs` permission on this service account. Also, this
     * account must belong to the project specified in the `parent` field and have
     * all necessary read permissions.
     *
     * Generated from protobuf field <code>string service_account = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setServiceAccount($var)
    {
        GPBUtil::checkString($var, True);
        $this->service_account = $var;

        return $this;
    }

}

