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

namespace Google\Cloud\GkeHub\V1;

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

/**
 * Request to update a Scope.
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1.UpdateScopeRequest</code>
 */
class UpdateScopeRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A Scope with fields updated. The 'name' field in this
     * namespace is used to identify the resource to update.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $scope = null;
    /**
     * Required. The fields to be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $update_mask = null;

    /**
     * @param \Google\Cloud\GkeHub\V1\Scope $scope      Required. A Scope with fields updated. The 'name' field in this
     *                                                  namespace is used to identify the resource to update.
     * @param \Google\Protobuf\FieldMask    $updateMask Required. The fields to be updated.
     *
     * @return \Google\Cloud\GkeHub\V1\UpdateScopeRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\GkeHub\V1\Scope $scope, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setScope($scope)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\GkeHub\V1\Scope $scope
     *           Required. A Scope with fields updated. The 'name' field in this
     *           namespace is used to identify the resource to update.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. The fields to be updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A Scope with fields updated. The 'name' field in this
     * namespace is used to identify the resource to update.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GkeHub\V1\Scope|null
     */
    public function getScope()
    {
        return $this->scope;
    }

    public function hasScope()
    {
        return isset($this->scope);
    }

    public function clearScope()
    {
        unset($this->scope);
    }

    /**
     * Required. A Scope with fields updated. The 'name' field in this
     * namespace is used to identify the resource to update.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.Scope scope = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\GkeHub\V1\Scope $var
     * @return $this
     */
    public function setScope($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\Scope::class);
        $this->scope = $var;

        return $this;
    }

    /**
     * Required. The fields to be updated.
     *
     * 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 fields to be updated.
     *
     * 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;
    }

}

