<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Contains information of NAT Mappings provided by a NAT Rule.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings</code>
 */
class VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. List of all drain IP:port-range mappings assigned to this interface
     * by this rule.
     * These ranges are inclusive, that is, both the first and the last
     * ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     * "1.1.1.1:2234-2234"].
     *
     * Generated from protobuf field <code>repeated string drain_nat_ip_port_ranges = 395440577;</code>
     */
    private $drain_nat_ip_port_ranges;
    /**
     * Output only. A list of all IP:port-range mappings assigned to this interface by this
     * rule.
     * These ranges are inclusive, that is, both the first and the last
     * ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     * "1.1.1.1:2234-2234"].
     *
     * Generated from protobuf field <code>repeated string nat_ip_port_ranges = 531830810;</code>
     */
    private $nat_ip_port_ranges;
    /**
     * Output only. Total number of drain ports across all NAT IPs allocated to this
     * interface by this rule.
     * It equals the aggregated port number in the field
     * drain_nat_ip_port_ranges.
     *
     * Generated from protobuf field <code>optional int32 num_total_drain_nat_ports = 335532793;</code>
     */
    protected $num_total_drain_nat_ports = null;
    /**
     * Output only. Total number of ports across all NAT IPs allocated to this interface
     * by this rule.
     * It equals the aggregated port number in the field nat_ip_port_ranges.
     *
     * Generated from protobuf field <code>optional int32 num_total_nat_ports = 299904384;</code>
     */
    protected $num_total_nat_ports = null;
    /**
     * Output only. Rule number of the NAT Rule.
     *
     * Generated from protobuf field <code>optional int32 rule_number = 535211500;</code>
     */
    protected $rule_number = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[] $drain_nat_ip_port_ranges
     *           Output only. List of all drain IP:port-range mappings assigned to this interface
     *           by this rule.
     *           These ranges are inclusive, that is, both the first and the last
     *           ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     *           "1.1.1.1:2234-2234"].
     *     @type string[] $nat_ip_port_ranges
     *           Output only. A list of all IP:port-range mappings assigned to this interface by this
     *           rule.
     *           These ranges are inclusive, that is, both the first and the last
     *           ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     *           "1.1.1.1:2234-2234"].
     *     @type int $num_total_drain_nat_ports
     *           Output only. Total number of drain ports across all NAT IPs allocated to this
     *           interface by this rule.
     *           It equals the aggregated port number in the field
     *           drain_nat_ip_port_ranges.
     *     @type int $num_total_nat_ports
     *           Output only. Total number of ports across all NAT IPs allocated to this interface
     *           by this rule.
     *           It equals the aggregated port number in the field nat_ip_port_ranges.
     *     @type int $rule_number
     *           Output only. Rule number of the NAT Rule.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. List of all drain IP:port-range mappings assigned to this interface
     * by this rule.
     * These ranges are inclusive, that is, both the first and the last
     * ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     * "1.1.1.1:2234-2234"].
     *
     * Generated from protobuf field <code>repeated string drain_nat_ip_port_ranges = 395440577;</code>
     * @return RepeatedField<string>
     */
    public function getDrainNatIpPortRanges()
    {
        return $this->drain_nat_ip_port_ranges;
    }

    /**
     * Output only. List of all drain IP:port-range mappings assigned to this interface
     * by this rule.
     * These ranges are inclusive, that is, both the first and the last
     * ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     * "1.1.1.1:2234-2234"].
     *
     * Generated from protobuf field <code>repeated string drain_nat_ip_port_ranges = 395440577;</code>
     * @param string[] $var
     * @return $this
     */
    public function setDrainNatIpPortRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->drain_nat_ip_port_ranges = $arr;

        return $this;
    }

    /**
     * Output only. A list of all IP:port-range mappings assigned to this interface by this
     * rule.
     * These ranges are inclusive, that is, both the first and the last
     * ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     * "1.1.1.1:2234-2234"].
     *
     * Generated from protobuf field <code>repeated string nat_ip_port_ranges = 531830810;</code>
     * @return RepeatedField<string>
     */
    public function getNatIpPortRanges()
    {
        return $this->nat_ip_port_ranges;
    }

    /**
     * Output only. A list of all IP:port-range mappings assigned to this interface by this
     * rule.
     * These ranges are inclusive, that is, both the first and the last
     * ports can be used for NAT. Example: ["2.2.2.2:12345-12355",
     * "1.1.1.1:2234-2234"].
     *
     * Generated from protobuf field <code>repeated string nat_ip_port_ranges = 531830810;</code>
     * @param string[] $var
     * @return $this
     */
    public function setNatIpPortRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->nat_ip_port_ranges = $arr;

        return $this;
    }

    /**
     * Output only. Total number of drain ports across all NAT IPs allocated to this
     * interface by this rule.
     * It equals the aggregated port number in the field
     * drain_nat_ip_port_ranges.
     *
     * Generated from protobuf field <code>optional int32 num_total_drain_nat_ports = 335532793;</code>
     * @return int
     */
    public function getNumTotalDrainNatPorts()
    {
        return isset($this->num_total_drain_nat_ports) ? $this->num_total_drain_nat_ports : 0;
    }

    public function hasNumTotalDrainNatPorts()
    {
        return isset($this->num_total_drain_nat_ports);
    }

    public function clearNumTotalDrainNatPorts()
    {
        unset($this->num_total_drain_nat_ports);
    }

    /**
     * Output only. Total number of drain ports across all NAT IPs allocated to this
     * interface by this rule.
     * It equals the aggregated port number in the field
     * drain_nat_ip_port_ranges.
     *
     * Generated from protobuf field <code>optional int32 num_total_drain_nat_ports = 335532793;</code>
     * @param int $var
     * @return $this
     */
    public function setNumTotalDrainNatPorts($var)
    {
        GPBUtil::checkInt32($var);
        $this->num_total_drain_nat_ports = $var;

        return $this;
    }

    /**
     * Output only. Total number of ports across all NAT IPs allocated to this interface
     * by this rule.
     * It equals the aggregated port number in the field nat_ip_port_ranges.
     *
     * Generated from protobuf field <code>optional int32 num_total_nat_ports = 299904384;</code>
     * @return int
     */
    public function getNumTotalNatPorts()
    {
        return isset($this->num_total_nat_ports) ? $this->num_total_nat_ports : 0;
    }

    public function hasNumTotalNatPorts()
    {
        return isset($this->num_total_nat_ports);
    }

    public function clearNumTotalNatPorts()
    {
        unset($this->num_total_nat_ports);
    }

    /**
     * Output only. Total number of ports across all NAT IPs allocated to this interface
     * by this rule.
     * It equals the aggregated port number in the field nat_ip_port_ranges.
     *
     * Generated from protobuf field <code>optional int32 num_total_nat_ports = 299904384;</code>
     * @param int $var
     * @return $this
     */
    public function setNumTotalNatPorts($var)
    {
        GPBUtil::checkInt32($var);
        $this->num_total_nat_ports = $var;

        return $this;
    }

    /**
     * Output only. Rule number of the NAT Rule.
     *
     * Generated from protobuf field <code>optional int32 rule_number = 535211500;</code>
     * @return int
     */
    public function getRuleNumber()
    {
        return isset($this->rule_number) ? $this->rule_number : 0;
    }

    public function hasRuleNumber()
    {
        return isset($this->rule_number);
    }

    public function clearRuleNumber()
    {
        unset($this->rule_number);
    }

    /**
     * Output only. Rule number of the NAT Rule.
     *
     * Generated from protobuf field <code>optional int32 rule_number = 535211500;</code>
     * @param int $var
     * @return $this
     */
    public function setRuleNumber($var)
    {
        GPBUtil::checkInt32($var);
        $this->rule_number = $var;

        return $this;
    }

}

