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

namespace Google\Cloud\GkeHub\V1;

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

/**
 * BinaryAuthorizationConfig defines the fleet level configuration of binary
 * authorization feature.
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1.BinaryAuthorizationConfig</code>
 */
class BinaryAuthorizationConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Mode of operation for binauthz policy evaluation.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $evaluation_mode = 0;
    /**
     * Optional. Binauthz policies that apply to this cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $policy_bindings;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $evaluation_mode
     *           Optional. Mode of operation for binauthz policy evaluation.
     *     @type \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding[] $policy_bindings
     *           Optional. Binauthz policies that apply to this cluster.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1\Fleet::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Mode of operation for binauthz policy evaluation.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getEvaluationMode()
    {
        return $this->evaluation_mode;
    }

    /**
     * Optional. Mode of operation for binauthz policy evaluation.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setEvaluationMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\EvaluationMode::class);
        $this->evaluation_mode = $var;

        return $this;
    }

    /**
     * Optional. Binauthz policies that apply to this cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<\Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding>
     */
    public function getPolicyBindings()
    {
        return $this->policy_bindings;
    }

    /**
     * Optional. Binauthz policies that apply to this cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding policy_bindings = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding[] $var
     * @return $this
     */
    public function setPolicyBindings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1\BinaryAuthorizationConfig\PolicyBinding::class);
        $this->policy_bindings = $arr;

        return $this;
    }

}

