<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/identity/accesscontextmanager/v1/access_context_manager.proto

namespace Google\Identity\AccessContextManager\V1;

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

/**
 * Request of [UpdateGcpUserAccessBinding]
 * [google.identity.accesscontextmanager.v1.AccessContextManager.UpdateGcpUserAccessBinding].
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.UpdateGcpUserAccessBindingRequest</code>
 */
class UpdateGcpUserAccessBindingRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. [GcpUserAccessBinding]
     * [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.GcpUserAccessBinding gcp_user_access_binding = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $gcp_user_access_binding = null;
    /**
     * Required. Only the fields specified in this mask are updated. Because name and
     * group_key cannot be changed, update_mask is required and must always be:
     * update_mask {
     * paths: "access_levels"
     * }
     *
     * 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\Identity\AccessContextManager\V1\GcpUserAccessBinding $gcp_user_access_binding
     *           Required. [GcpUserAccessBinding]
     *           [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. Only the fields specified in this mask are updated. Because name and
     *           group_key cannot be changed, update_mask is required and must always be:
     *           update_mask {
     *           paths: "access_levels"
     *           }
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\AccessContextManager::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. [GcpUserAccessBinding]
     * [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.GcpUserAccessBinding gcp_user_access_binding = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Identity\AccessContextManager\V1\GcpUserAccessBinding|null
     */
    public function getGcpUserAccessBinding()
    {
        return isset($this->gcp_user_access_binding) ? $this->gcp_user_access_binding : null;
    }

    public function hasGcpUserAccessBinding()
    {
        return isset($this->gcp_user_access_binding);
    }

    public function clearGcpUserAccessBinding()
    {
        unset($this->gcp_user_access_binding);
    }

    /**
     * Required. [GcpUserAccessBinding]
     * [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.GcpUserAccessBinding gcp_user_access_binding = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Identity\AccessContextManager\V1\GcpUserAccessBinding $var
     * @return $this
     */
    public function setGcpUserAccessBinding($var)
    {
        GPBUtil::checkMessage($var, \Google\Identity\AccessContextManager\V1\GcpUserAccessBinding::class);
        $this->gcp_user_access_binding = $var;

        return $this;
    }

    /**
     * Required. Only the fields specified in this mask are updated. Because name and
     * group_key cannot be changed, update_mask is required and must always be:
     * update_mask {
     * paths: "access_levels"
     * }
     *
     * 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 isset($this->update_mask) ? $this->update_mask : null;
    }

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

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

    /**
     * Required. Only the fields specified in this mask are updated. Because name and
     * group_key cannot be changed, update_mask is required and must always be:
     * update_mask {
     * paths: "access_levels"
     * }
     *
     * 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;
    }

}

