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

namespace Google\Cloud\Container\V1;

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

/**
 * Configuration for Binary Authorization.
 *
 * Generated from protobuf message <code>google.container.v1.BinaryAuthorization</code>
 */
class BinaryAuthorization extends \Google\Protobuf\Internal\Message
{
    /**
     * This field is deprecated. Leave this unset and instead configure
     * BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
     * anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
     *
     * Generated from protobuf field <code>bool enabled = 1 [deprecated = true];</code>
     * @deprecated
     */
    protected $enabled = false;
    /**
     * Mode of operation for binauthz policy evaluation. If unspecified, defaults
     * to DISABLED.
     *
     * Generated from protobuf field <code>.google.container.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 2;</code>
     */
    private $evaluation_mode = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enabled
     *           This field is deprecated. Leave this unset and instead configure
     *           BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
     *           anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
     *     @type int $evaluation_mode
     *           Mode of operation for binauthz policy evaluation. If unspecified, defaults
     *           to DISABLED.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * This field is deprecated. Leave this unset and instead configure
     * BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
     * anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
     *
     * Generated from protobuf field <code>bool enabled = 1 [deprecated = true];</code>
     * @return bool
     * @deprecated
     */
    public function getEnabled()
    {
        @trigger_error('enabled is deprecated.', E_USER_DEPRECATED);
        return $this->enabled;
    }

    /**
     * This field is deprecated. Leave this unset and instead configure
     * BinaryAuthorization using evaluation_mode. If evaluation_mode is set to
     * anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.
     *
     * Generated from protobuf field <code>bool enabled = 1 [deprecated = true];</code>
     * @param bool $var
     * @return $this
     * @deprecated
     */
    public function setEnabled($var)
    {
        @trigger_error('enabled is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

    /**
     * Mode of operation for binauthz policy evaluation. If unspecified, defaults
     * to DISABLED.
     *
     * Generated from protobuf field <code>.google.container.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 2;</code>
     * @return int
     */
    public function getEvaluationMode()
    {
        return $this->evaluation_mode;
    }

    /**
     * Mode of operation for binauthz policy evaluation. If unspecified, defaults
     * to DISABLED.
     *
     * Generated from protobuf field <code>.google.container.v1.BinaryAuthorization.EvaluationMode evaluation_mode = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setEvaluationMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\BinaryAuthorization\EvaluationMode::class);
        $this->evaluation_mode = $var;

        return $this;
    }

}

