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

namespace Google\Cloud\NetworkServices\V1\ServiceLbPolicy;

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

/**
 * Configuration to provide isolation support for the associated Backend
 * Service.
 *
 * Generated from protobuf message <code>google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig</code>
 */
class IsolationConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The isolation granularity of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularity isolation_granularity = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $isolation_granularity = 0;
    /**
     * Optional. The isolation mode of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationMode isolation_mode = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $isolation_mode = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $isolation_granularity
     *           Optional. The isolation granularity of the load balancer.
     *     @type int $isolation_mode
     *           Optional. The isolation mode of the load balancer.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceLbPolicy::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The isolation granularity of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularity isolation_granularity = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getIsolationGranularity()
    {
        return $this->isolation_granularity;
    }

    /**
     * Optional. The isolation granularity of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularity isolation_granularity = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setIsolationGranularity($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\ServiceLbPolicy\IsolationGranularity::class);
        $this->isolation_granularity = $var;

        return $this;
    }

    /**
     * Optional. The isolation mode of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationMode isolation_mode = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getIsolationMode()
    {
        return $this->isolation_mode;
    }

    /**
     * Optional. The isolation mode of the load balancer.
     *
     * Generated from protobuf field <code>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationMode isolation_mode = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setIsolationMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\ServiceLbPolicy\IsolationMode::class);
        $this->isolation_mode = $var;

        return $this;
    }

}


