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

/**
 * Status of a NAT Rule contained in this NAT.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus</code>
 */
class RouterStatusNatStatusNatRuleStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"].
     *
     * Generated from protobuf field <code>repeated string active_nat_ips = 208517077;</code>
     */
    private $active_nat_ips;
    /**
     * A list of IPs for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
     *
     * Generated from protobuf field <code>repeated string drain_nat_ips = 504078535;</code>
     */
    private $drain_nat_ips;
    /**
     * The number of extra IPs to allocate. This will be greater than 0 only if the existing IPs in this NAT Rule are NOT enough to allow all configured VMs to use NAT.
     *
     * Generated from protobuf field <code>optional int32 min_extra_ips_needed = 353002756;</code>
     */
    private $min_extra_ips_needed = null;
    /**
     * Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule.
     *
     * Generated from protobuf field <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
     */
    private $num_vm_endpoints_with_nat_mappings = null;
    /**
     * Rule number of the rule.
     *
     * Generated from protobuf field <code>optional int32 rule_number = 535211500;</code>
     */
    private $rule_number = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $active_nat_ips
     *           A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"].
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $drain_nat_ips
     *           A list of IPs for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
     *     @type int $min_extra_ips_needed
     *           The number of extra IPs to allocate. This will be greater than 0 only if the existing IPs in this NAT Rule are NOT enough to allow all configured VMs to use NAT.
     *     @type int $num_vm_endpoints_with_nat_mappings
     *           Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule.
     *     @type int $rule_number
     *           Rule number of the rule.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"].
     *
     * Generated from protobuf field <code>repeated string active_nat_ips = 208517077;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getActiveNatIps()
    {
        return $this->active_nat_ips;
    }

    /**
     * A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"].
     *
     * Generated from protobuf field <code>repeated string active_nat_ips = 208517077;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setActiveNatIps($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->active_nat_ips = $arr;

        return $this;
    }

    /**
     * A list of IPs for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
     *
     * Generated from protobuf field <code>repeated string drain_nat_ips = 504078535;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDrainNatIps()
    {
        return $this->drain_nat_ips;
    }

    /**
     * A list of IPs for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
     *
     * Generated from protobuf field <code>repeated string drain_nat_ips = 504078535;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDrainNatIps($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->drain_nat_ips = $arr;

        return $this;
    }

    /**
     * The number of extra IPs to allocate. This will be greater than 0 only if the existing IPs in this NAT Rule are NOT enough to allow all configured VMs to use NAT.
     *
     * Generated from protobuf field <code>optional int32 min_extra_ips_needed = 353002756;</code>
     * @return int
     */
    public function getMinExtraIpsNeeded()
    {
        return isset($this->min_extra_ips_needed) ? $this->min_extra_ips_needed : 0;
    }

    public function hasMinExtraIpsNeeded()
    {
        return isset($this->min_extra_ips_needed);
    }

    public function clearMinExtraIpsNeeded()
    {
        unset($this->min_extra_ips_needed);
    }

    /**
     * The number of extra IPs to allocate. This will be greater than 0 only if the existing IPs in this NAT Rule are NOT enough to allow all configured VMs to use NAT.
     *
     * Generated from protobuf field <code>optional int32 min_extra_ips_needed = 353002756;</code>
     * @param int $var
     * @return $this
     */
    public function setMinExtraIpsNeeded($var)
    {
        GPBUtil::checkInt32($var);
        $this->min_extra_ips_needed = $var;

        return $this;
    }

    /**
     * Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule.
     *
     * Generated from protobuf field <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
     * @return int
     */
    public function getNumVmEndpointsWithNatMappings()
    {
        return isset($this->num_vm_endpoints_with_nat_mappings) ? $this->num_vm_endpoints_with_nat_mappings : 0;
    }

    public function hasNumVmEndpointsWithNatMappings()
    {
        return isset($this->num_vm_endpoints_with_nat_mappings);
    }

    public function clearNumVmEndpointsWithNatMappings()
    {
        unset($this->num_vm_endpoints_with_nat_mappings);
    }

    /**
     * Number of VM endpoints (i.e., NICs) that have NAT Mappings from this NAT Rule.
     *
     * Generated from protobuf field <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
     * @param int $var
     * @return $this
     */
    public function setNumVmEndpointsWithNatMappings($var)
    {
        GPBUtil::checkInt32($var);
        $this->num_vm_endpoints_with_nat_mappings = $var;

        return $this;
    }

    /**
     * Rule number of the 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);
    }

    /**
     * Rule number of the 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;
    }

}

