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

namespace Google\Cloud\Compute\V1;

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

/**
 * Subsetting configuration for this BackendService. Currently this is applicable only for Internal TCP/UDP load balancing, Internal HTTP(S) load balancing and Traffic Director.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.Subsetting</code>
 */
class Subsetting extends \Google\Protobuf\Internal\Message
{
    /**
     * 
     * Check the Policy enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string policy = 91071794;</code>
     */
    private $policy = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $policy
     *           
     *           Check the Policy enum for the list of possible values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * 
     * Check the Policy enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string policy = 91071794;</code>
     * @return string
     */
    public function getPolicy()
    {
        return isset($this->policy) ? $this->policy : '';
    }

    public function hasPolicy()
    {
        return isset($this->policy);
    }

    public function clearPolicy()
    {
        unset($this->policy);
    }

    /**
     * 
     * Check the Policy enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string policy = 91071794;</code>
     * @param string $var
     * @return $this
     */
    public function setPolicy($var)
    {
        GPBUtil::checkString($var, True);
        $this->policy = $var;

        return $this;
    }

}

