<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/persistent_resource_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 UpdatePersistentResource method.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.UpdatePersistentResourceRequest</code>
 */
class UpdatePersistentResourceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The PersistentResource to update.
     * The PersistentResource's `name` field is used to identify the
     * PersistentResource to update. Format:
     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $persistent_resource = null;
    /**
     * Required. Specify the fields to be overwritten in the PersistentResource by
     * the update method.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $update_mask = null;

    /**
     * @param \Google\Cloud\AIPlatform\V1\PersistentResource $persistentResource Required. The PersistentResource to update.
     *
     *                                                                           The PersistentResource's `name` field is used to identify the
     *                                                                           PersistentResource to update. Format:
     *                                                                           `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
     * @param \Google\Protobuf\FieldMask                     $updateMask         Required. Specify the fields to be overwritten in the PersistentResource by
     *                                                                           the update method.
     *
     * @return \Google\Cloud\AIPlatform\V1\UpdatePersistentResourceRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\AIPlatform\V1\PersistentResource $persistentResource, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setPersistentResource($persistentResource)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\PersistentResource $persistent_resource
     *           Required. The PersistentResource to update.
     *           The PersistentResource's `name` field is used to identify the
     *           PersistentResource to update. Format:
     *           `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. Specify the fields to be overwritten in the PersistentResource by
     *           the update method.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The PersistentResource to update.
     * The PersistentResource's `name` field is used to identify the
     * PersistentResource to update. Format:
     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\PersistentResource|null
     */
    public function getPersistentResource()
    {
        return $this->persistent_resource;
    }

    public function hasPersistentResource()
    {
        return isset($this->persistent_resource);
    }

    public function clearPersistentResource()
    {
        unset($this->persistent_resource);
    }

    /**
     * Required. The PersistentResource to update.
     * The PersistentResource's `name` field is used to identify the
     * PersistentResource to update. Format:
     * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\PersistentResource $var
     * @return $this
     */
    public function setPersistentResource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PersistentResource::class);
        $this->persistent_resource = $var;

        return $this;
    }

    /**
     * Required. Specify the fields to be overwritten in the PersistentResource by
     * the update method.
     *
     * 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. Specify the fields to be overwritten in the PersistentResource by
     * the update method.
     *
     * 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;
    }

}

