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

namespace Google\Identity\AccessContextManager\V1;

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

/**
 * `CustomLevel` is an `AccessLevel` using the Cloud Common Expression Language
 * to represent the necessary conditions for the level to apply to a request.
 * See CEL spec at: https://github.com/google/cel-spec
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.CustomLevel</code>
 */
class CustomLevel extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A Cloud CEL expression evaluating to a boolean.
     *
     * Generated from protobuf field <code>.google.type.Expr expr = 1;</code>
     */
    private $expr = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Type\Expr $expr
     *           Required. A Cloud CEL expression evaluating to a boolean.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\AccessLevel::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A Cloud CEL expression evaluating to a boolean.
     *
     * Generated from protobuf field <code>.google.type.Expr expr = 1;</code>
     * @return \Google\Type\Expr|null
     */
    public function getExpr()
    {
        return isset($this->expr) ? $this->expr : null;
    }

    public function hasExpr()
    {
        return isset($this->expr);
    }

    public function clearExpr()
    {
        unset($this->expr);
    }

    /**
     * Required. A Cloud CEL expression evaluating to a boolean.
     *
     * Generated from protobuf field <code>.google.type.Expr expr = 1;</code>
     * @param \Google\Type\Expr $var
     * @return $this
     */
    public function setExpr($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Expr::class);
        $this->expr = $var;

        return $this;
    }

}

