<?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.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.UpdateModelRequest</code>
 */
class UpdateModelRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Model which replaces the resource on the server.
     * When Model Versioning is enabled, the model.name will be used to determine
     * whether to update the model or model version.
     * 1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
     * specific update.
     * 2. model.name without the &#64; value, e.g. models/123, refers to a model
     * update.
     * 3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
     * 4. Supported model fields: display_name, description; supported
     * version-specific fields: version_description. Labels are supported in both
     * scenarios. Both the model labels and the version labels are merged when a
     * model is returned. When updating labels, if the request is for
     * model-specific update, model label gets updated. Otherwise, version labels
     * get updated.
     * 5. A model name or model version name fields update mismatch will cause a
     * precondition error.
     * 6. One request cannot update both the model and the version fields. You
     * must update them separately.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $model = null;
    /**
     * Required. The update mask applies to the resource.
     * For the `FieldMask` definition, see
     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\Model $model
     *           Required. The Model which replaces the resource on the server.
     *           When Model Versioning is enabled, the model.name will be used to determine
     *           whether to update the model or model version.
     *           1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
     *           specific update.
     *           2. model.name without the &#64; value, e.g. models/123, refers to a model
     *           update.
     *           3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
     *           4. Supported model fields: display_name, description; supported
     *           version-specific fields: version_description. Labels are supported in both
     *           scenarios. Both the model labels and the version labels are merged when a
     *           model is returned. When updating labels, if the request is for
     *           model-specific update, model label gets updated. Otherwise, version labels
     *           get updated.
     *           5. A model name or model version name fields update mismatch will cause a
     *           precondition error.
     *           6. One request cannot update both the model and the version fields. You
     *           must update them separately.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. The update mask applies to the resource.
     *           For the `FieldMask` definition, see
     *           [google.protobuf.FieldMask][google.protobuf.FieldMask].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The Model which replaces the resource on the server.
     * When Model Versioning is enabled, the model.name will be used to determine
     * whether to update the model or model version.
     * 1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
     * specific update.
     * 2. model.name without the &#64; value, e.g. models/123, refers to a model
     * update.
     * 3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
     * 4. Supported model fields: display_name, description; supported
     * version-specific fields: version_description. Labels are supported in both
     * scenarios. Both the model labels and the version labels are merged when a
     * model is returned. When updating labels, if the request is for
     * model-specific update, model label gets updated. Otherwise, version labels
     * get updated.
     * 5. A model name or model version name fields update mismatch will cause a
     * precondition error.
     * 6. One request cannot update both the model and the version fields. You
     * must update them separately.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Model model = 1 [(.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 which replaces the resource on the server.
     * When Model Versioning is enabled, the model.name will be used to determine
     * whether to update the model or model version.
     * 1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
     * specific update.
     * 2. model.name without the &#64; value, e.g. models/123, refers to a model
     * update.
     * 3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
     * 4. Supported model fields: display_name, description; supported
     * version-specific fields: version_description. Labels are supported in both
     * scenarios. Both the model labels and the version labels are merged when a
     * model is returned. When updating labels, if the request is for
     * model-specific update, model label gets updated. Otherwise, version labels
     * get updated.
     * 5. A model name or model version name fields update mismatch will cause a
     * precondition error.
     * 6. One request cannot update both the model and the version fields. You
     * must update them separately.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Model model = 1 [(.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;
    }

    /**
     * Required. The update mask applies to the resource.
     * For the `FieldMask` definition, see
     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Required. The update mask applies to the resource.
     * For the `FieldMask` definition, see
     * [google.protobuf.FieldMask][google.protobuf.FieldMask].
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

