<?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;

/**
 * A request to update an `AccessLevel`.
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.UpdateAccessLevelRequest</code>
 */
class UpdateAccessLevelRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The updated [Access Level]
     * [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic
     * correctness of the [Access Level]
     * [google.identity.accesscontextmanager.v1.AccessLevel] is a
     * precondition for creation.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.AccessLevel access_level = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $access_level = null;
    /**
     * Required. Mask to control which fields get updated. Must be non-empty.
     *
     * 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\AccessLevel $access_level
     *           Required. The updated [Access Level]
     *           [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic
     *           correctness of the [Access Level]
     *           [google.identity.accesscontextmanager.v1.AccessLevel] is a
     *           precondition for creation.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. Mask to control which fields get updated. Must be non-empty.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\AccessContextManager::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The updated [Access Level]
     * [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic
     * correctness of the [Access Level]
     * [google.identity.accesscontextmanager.v1.AccessLevel] is a
     * precondition for creation.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.AccessLevel access_level = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Identity\AccessContextManager\V1\AccessLevel|null
     */
    public function getAccessLevel()
    {
        return isset($this->access_level) ? $this->access_level : null;
    }

    public function hasAccessLevel()
    {
        return isset($this->access_level);
    }

    public function clearAccessLevel()
    {
        unset($this->access_level);
    }

    /**
     * Required. The updated [Access Level]
     * [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic
     * correctness of the [Access Level]
     * [google.identity.accesscontextmanager.v1.AccessLevel] is a
     * precondition for creation.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.AccessLevel access_level = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Identity\AccessContextManager\V1\AccessLevel $var
     * @return $this
     */
    public function setAccessLevel($var)
    {
        GPBUtil::checkMessage($var, \Google\Identity\AccessContextManager\V1\AccessLevel::class);
        $this->access_level = $var;

        return $this;
    }

    /**
     * Required. Mask to control which fields get updated. Must be non-empty.
     *
     * 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. Mask to control which fields get updated. Must be non-empty.
     *
     * 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;
    }

}

