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

/**
 * `BasicLevel` is an `AccessLevel` using a set of recommended features.
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.BasicLevel</code>
 */
class BasicLevel extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A list of requirements for the `AccessLevel` to be granted.
     *
     * Generated from protobuf field <code>repeated .google.identity.accesscontextmanager.v1.Condition conditions = 1;</code>
     */
    private $conditions;
    /**
     * How the `conditions` list should be combined to determine if a request is
     * granted this `AccessLevel`. If AND is used, each `Condition` in
     * `conditions` must be satisfied for the `AccessLevel` to be applied. If OR
     * is used, at least one `Condition` in `conditions` must be satisfied for the
     * `AccessLevel` to be applied. Default behavior is AND.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction combining_function = 2;</code>
     */
    private $combining_function = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Identity\AccessContextManager\V1\Condition[]|\Google\Protobuf\Internal\RepeatedField $conditions
     *           Required. A list of requirements for the `AccessLevel` to be granted.
     *     @type int $combining_function
     *           How the `conditions` list should be combined to determine if a request is
     *           granted this `AccessLevel`. If AND is used, each `Condition` in
     *           `conditions` must be satisfied for the `AccessLevel` to be applied. If OR
     *           is used, at least one `Condition` in `conditions` must be satisfied for the
     *           `AccessLevel` to be applied. Default behavior is AND.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\AccessLevel::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A list of requirements for the `AccessLevel` to be granted.
     *
     * Generated from protobuf field <code>repeated .google.identity.accesscontextmanager.v1.Condition conditions = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getConditions()
    {
        return $this->conditions;
    }

    /**
     * Required. A list of requirements for the `AccessLevel` to be granted.
     *
     * Generated from protobuf field <code>repeated .google.identity.accesscontextmanager.v1.Condition conditions = 1;</code>
     * @param \Google\Identity\AccessContextManager\V1\Condition[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setConditions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Identity\AccessContextManager\V1\Condition::class);
        $this->conditions = $arr;

        return $this;
    }

    /**
     * How the `conditions` list should be combined to determine if a request is
     * granted this `AccessLevel`. If AND is used, each `Condition` in
     * `conditions` must be satisfied for the `AccessLevel` to be applied. If OR
     * is used, at least one `Condition` in `conditions` must be satisfied for the
     * `AccessLevel` to be applied. Default behavior is AND.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction combining_function = 2;</code>
     * @return int
     */
    public function getCombiningFunction()
    {
        return $this->combining_function;
    }

    /**
     * How the `conditions` list should be combined to determine if a request is
     * granted this `AccessLevel`. If AND is used, each `Condition` in
     * `conditions` must be satisfied for the `AccessLevel` to be applied. If OR
     * is used, at least one `Condition` in `conditions` must be satisfied for the
     * `AccessLevel` to be applied. Default behavior is AND.
     *
     * Generated from protobuf field <code>.google.identity.accesscontextmanager.v1.BasicLevel.ConditionCombiningFunction combining_function = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setCombiningFunction($var)
    {
        GPBUtil::checkEnum($var, \Google\Identity\AccessContextManager\V1\BasicLevel_ConditionCombiningFunction::class);
        $this->combining_function = $var;

        return $this;
    }

}

