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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit</code>
 */
class ServiceAttachmentConsumerProjectLimit extends \Google\Protobuf\Internal\Message
{
    /**
     * The value of the limit to set.
     *
     * Generated from protobuf field <code>optional uint32 connection_limit = 131403546;</code>
     */
    private $connection_limit = null;
    /**
     * The network URL for the network to set the limit for.
     *
     * Generated from protobuf field <code>optional string network_url = 207194078;</code>
     */
    private $network_url = null;
    /**
     * The project id or number for the project to set the limit for.
     *
     * Generated from protobuf field <code>optional string project_id_or_num = 349783336;</code>
     */
    private $project_id_or_num = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $connection_limit
     *           The value of the limit to set.
     *     @type string $network_url
     *           The network URL for the network to set the limit for.
     *     @type string $project_id_or_num
     *           The project id or number for the project to set the limit for.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The value of the limit to set.
     *
     * Generated from protobuf field <code>optional uint32 connection_limit = 131403546;</code>
     * @return int
     */
    public function getConnectionLimit()
    {
        return isset($this->connection_limit) ? $this->connection_limit : 0;
    }

    public function hasConnectionLimit()
    {
        return isset($this->connection_limit);
    }

    public function clearConnectionLimit()
    {
        unset($this->connection_limit);
    }

    /**
     * The value of the limit to set.
     *
     * Generated from protobuf field <code>optional uint32 connection_limit = 131403546;</code>
     * @param int $var
     * @return $this
     */
    public function setConnectionLimit($var)
    {
        GPBUtil::checkUint32($var);
        $this->connection_limit = $var;

        return $this;
    }

    /**
     * The network URL for the network to set the limit for.
     *
     * Generated from protobuf field <code>optional string network_url = 207194078;</code>
     * @return string
     */
    public function getNetworkUrl()
    {
        return isset($this->network_url) ? $this->network_url : '';
    }

    public function hasNetworkUrl()
    {
        return isset($this->network_url);
    }

    public function clearNetworkUrl()
    {
        unset($this->network_url);
    }

    /**
     * The network URL for the network to set the limit for.
     *
     * Generated from protobuf field <code>optional string network_url = 207194078;</code>
     * @param string $var
     * @return $this
     */
    public function setNetworkUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->network_url = $var;

        return $this;
    }

    /**
     * The project id or number for the project to set the limit for.
     *
     * Generated from protobuf field <code>optional string project_id_or_num = 349783336;</code>
     * @return string
     */
    public function getProjectIdOrNum()
    {
        return isset($this->project_id_or_num) ? $this->project_id_or_num : '';
    }

    public function hasProjectIdOrNum()
    {
        return isset($this->project_id_or_num);
    }

    public function clearProjectIdOrNum()
    {
        unset($this->project_id_or_num);
    }

    /**
     * The project id or number for the project to set the limit for.
     *
     * Generated from protobuf field <code>optional string project_id_or_num = 349783336;</code>
     * @param string $var
     * @return $this
     */
    public function setProjectIdOrNum($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id_or_num = $var;

        return $this;
    }

}

