text: /*
   * Copyright (c) Microsoft Corporation. All rights reserved.
   * Licensed under the MIT License. See License.txt in the project root for
   * license information.
   *
   * Code generated by Microsoft (R) AutoRest Code Generator.
   * Changes may cause incorrect behavior and will be lost if the code is
   * regenerated.
   */
  
  'use strict';
  
  const models = require('./index');
  
  /**
   * Inbound NAT rule of the load balancer.
   *
   * @extends models['SubResource']
   */
  class InboundNatRule extends models['SubResource'] {
    /**
     * Create a InboundNatRule.
     * @property {object} [frontendIPConfiguration] A reference to frontend IP
     * addresses.
     * @property {string} [frontendIPConfiguration.id] Resource ID.
     * @property {object} [backendIPConfiguration] A reference to a private IP
     * address defined on a network interface of a VM. Traffic sent to the
     * frontend port of each of the frontend IP configurations is forwarded to
     * the backend IP.
     * @property {array} [backendIPConfiguration.virtualNetworkTaps] The
     * reference to Virtual Network Taps.
     * @property {array}
     * [backendIPConfiguration.applicationGatewayBackendAddressPools] The
     * reference of ApplicationGatewayBackendAddressPool resource.
     * @property {array} [backendIPConfiguration.loadBalancerBackendAddressPools]
     * The reference of LoadBalancerBackendAddressPool resource.
     * @property {array} [backendIPConfiguration.loadBalancerInboundNatRules] A
     * list of references of LoadBalancerInboundNatRules.
     * @property {string} [backendIPConfiguration.privateIPAddress] Private IP
     * address of the IP configuration.
     * @property {string} [backendIPConfiguration.privateIPAllocationMethod]
     * Defines how a private IP address is assigned. Possible values are:
     * 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
     * @property {string} [backendIPConfiguration.privateIPAddressVersion]
     * Available from Api-Version 2016-03-30 onwards, it represents whether the
     * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.
     * Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4',
     * 'IPv6'
     * @property {object} [backendIPConfiguration.subnet] Subnet bound to the IP
     * configuration.
     * @property {string} [backendIPConfiguration.subnet.addressPrefix] The
     * address prefix for the subnet.
     * @property {array} [backendIPConfiguration.subnet.addressPrefixes] List of
     * address prefixes for the subnet.
     * @property {object} [backendIPConfiguration.subnet.networkSecurityGroup]
     * The reference of the NetworkSecurityGroup resource.
     * @property {array}
     * [backendIPConfiguration.subnet.networkSecurityGroup.securityRules] A
     * collection of security rules of the network security group.
     * @property {array}
     * [backendIPConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
     * The default security rules of network security group.
     * @property {array}
     * [backendIPConfiguration.subnet.networkSecurityGroup.networkInterfaces] A
     * collection of references to network interfaces.
     * @property {array}
     * [backendIPConfiguration.subnet.networkSecurityGroup.subnets] A collection
     * of references to subnets.
     * @property {string}
     * [backendIPConfiguration.subnet.networkSecurityGroup.resourceGuid] The
     * resource GUID property of the network security group resource.
     * @property {string}
     * [backendIPConfiguration.subnet.networkSecurityGroup.provisioningState] The
     * provisioning state of the public IP resource. Possible values are:
     * 'Updating', 'Deleting', and 'Failed'.
     * @property {string}
     * [backendIPConfiguration.subnet.networkSecurityGroup.etag] A unique
     * read-only string that changes whenever the resource is updated.
     * @property {object} [backendIPConfiguration.subnet.routeTable] The
     * reference of the RouteTable resource.
     * @property {array} [backendIPConfiguration.subnet.routeTable.routes]
     * Collection of routes contained within a route table.
     * @property {array} [backendIPConfiguration.subnet.routeTable.subnets] A
     * collection of references to subnets.
     * @property {boolean}
     * [backendIPConfiguration.subnet.routeTable.disableBgpRoutePropagation] Gets
     * or sets whether to disable the routes learned by BGP on that route table.
     * True means disable.
     * @property {string}
     * [backendIPConfiguration.subnet.routeTable.provisioningState] The
     * provisioning state of the resource. Possible values are: 'Updating',
     * 'Deleting', and 'Failed'.
     * @property {string} [backendIPConfiguration.subnet.routeTable.etag] Gets a
     * unique read-only string that changes whenever the resource is updated.
     * @property {array} [backendIPConfiguration.subnet.serviceEndpoints] An
     * array of service endpoints.
     * @property {array} [backendIPConfiguration.subnet.serviceEndpointPolicies]
     * An array of service endpoint policies.
     * @property {array} [backendIPConfiguration.subnet.interfaceEndpoints] An
     * array of references to interface endpoints
     * @property {array} [backendIPConfiguration.subnet.ipConfigurations] Gets an
     * array of references to the network interface IP configurations using
     * subnet.
     * @property {array} [backendIPConfiguration.subnet.ipConfigurationProfiles]
     * Array of IP configuration profiles which reference this subnet.
     * @property {array} [backendIPConfiguration.subnet.resourceNavigationLinks]
     * Gets an array of references to the external resources using subnet.
     * @property {array} [backendIPConfiguration.subnet.serviceAssociationLinks]
     * Gets an array of references to services injecting into this subnet.
     * @property {array} [backendIPConfiguration.subnet.delegations] Gets an
     * array of references to the delegations on the subnet.
     * @property {string} [backendIPConfiguration.subnet.purpose] A read-only
     * string identifying the intention of use for this subnet based on
     * delegations and other user-defined properties.
     * @property {string} [backendIPConfiguration.subnet.provisioningState] The
     * provisioning state of the resource.
     * @property {string} [backendIPConfiguration.subnet.name] The name of the
     * resource that is unique within a resource group. This name can be used to
     * access the resource.
     * @property {string} [backendIPConfiguration.subnet.etag] A unique read-only
     * string that changes whenever the resource is updated.
     * @property {boolean} [backendIPConfiguration.primary] Gets whether this is
     * a primary customer address on the network interface.
     * @property {object} [backendIPConfiguration.publicIPAddress] Public IP
     * address bound to the IP configuration.
     * @property {object} [backendIPConfiguration.publicIPAddress.sku] The public
     * IP address SKU.
     * @property {string} [backendIPConfiguration.publicIPAddress.sku.name] Name
     * of a public IP address SKU. Possible values include: 'Basic', 'Standard'
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.publicIPAllocationMethod] The
     * public IP allocation method. Possible values are: 'Static' and 'Dynamic'.
     * Possible values include: 'Static', 'Dynamic'
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.publicIPAddressVersion] The public
     * IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible
     * values include: 'IPv4', 'IPv6'
     * @property {object}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration] The IP
     * configuration associated with the public IP address.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.privateIPAddress]
     * The private IP address of the IP configuration.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.privateIPAllocationMethod]
     * The private IP allocation method. Possible values are 'Static' and
     * 'Dynamic'. Possible values include: 'Static', 'Dynamic'
     * @property {object}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet] The
     * reference of the subnet resource.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.addressPrefix]
     * The address prefix for the subnet.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.addressPrefixes]
     * List of  address prefixes for the subnet.
     * @property {object}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup]
     * The reference of the NetworkSecurityGroup resource.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.securityRules]
     * A collection of security rules of the network security group.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
     * The default security rules of network security group.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.networkInterfaces]
     * A collection of references to network interfaces.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.subnets]
     * A collection of references to subnets.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.resourceGuid]
     * The resource GUID property of the network security group resource.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.provisioningState]
     * The provisioning state of the public IP resource. Possible values are:
     * 'Updating', 'Deleting', and 'Failed'.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.etag]
     * A unique read-only string that changes whenever the resource is updated.
     * @property {object}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.routeTable]
     * The reference of the RouteTable resource.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.routeTable.routes]
     * Collection of routes contained within a route table.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.routeTable.subnets]
     * A collection of references to subnets.
     * @property {boolean}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.routeTable.disableBgpRoutePropagation]
     * Gets or sets whether to disable the routes learned by BGP on that route
     * table. True means disable.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.routeTable.provisioningState]
     * The provisioning state of the resource. Possible values are: 'Updating',
     * 'Deleting', and 'Failed'.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.routeTable.etag]
     * Gets a unique read-only string that changes whenever the resource is
     * updated.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceEndpoints]
     * An array of service endpoints.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceEndpointPolicies]
     * An array of service endpoint policies.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.interfaceEndpoints]
     * An array of references to interface endpoints
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurations]
     * Gets an array of references to the network interface IP configurations
     * using subnet.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles]
     * Array of IP configuration profiles which reference this subnet.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks]
     * Gets an array of references to the external resources using subnet.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks]
     * Gets an array of references to services injecting into this subnet.
     * @property {array}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations]
     * Gets an array of references to the delegations on the subnet.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.purpose] A
     * read-only string identifying the intention of use for this subnet based on
     * delegations and other user-defined properties.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.provisioningState]
     * The provisioning state of the resource.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.name] The
     * name of the resource that is unique within a resource group. This name can
     * be used to access the resource.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.etag] A
     * unique read-only string that changes whenever the resource is updated.
     * @property {object}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.publicIPAddress]
     * The reference of the public IP resource.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.provisioningState]
     * Gets the provisioning state of the public IP resource. Possible values
     * are: 'Updating', 'Deleting', and 'Failed'.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.name] The name of
     * the resource that is unique within a resource group. This name can be used
     * to access the resource.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ipConfiguration.etag] A unique
     * read-only string that changes whenever the resource is updated.
     * @property {object} [backendIPConfiguration.publicIPAddress.dnsSettings]
     * The FQDN of the DNS record associated with the public IP address.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.dnsSettings.domainNameLabel] Gets
     * or sets the Domain name label.The concatenation of the domain name label
     * and the regionalized DNS zone make up the fully qualified domain name
     * associated with the public IP address. If a domain name label is
     * specified, an A DNS record is created for the public IP in the Microsoft
     * Azure DNS system.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.dnsSettings.fqdn] Gets the FQDN,
     * Fully qualified domain name of the A DNS record associated with the public
     * IP. This is the concatenation of the domainNameLabel and the regionalized
     * DNS zone.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.dnsSettings.reverseFqdn] Gets or
     * Sets the Reverse FQDN. A user-visible, fully qualified domain name that
     * resolves to this public IP address. If the reverseFqdn is specified, then
     * a PTR DNS record is created pointing from the IP address in the
     * in-addr.arpa domain to the reverse FQDN.
     * @property {object} [backendIPConfiguration.publicIPAddress.ddosSettings]
     * The DDoS protection custom policy associated with the public IP address.
     * @property {object}
     * [backendIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy] The
     * DDoS custom policy associated with the public IP.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ddosSettings.ddosCustomPolicy.id]
     * Resource ID.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.ddosSettings.protectionCoverage]
     * The DDoS protection policy customizability of the public IP. Only standard
     * coverage will have the ability to be customized. Possible values include:
     * 'Basic', 'Standard'
     * @property {array} [backendIPConfiguration.publicIPAddress.ipTags] The list
     * of tags associated with the public IP address.
     * @property {string} [backendIPConfiguration.publicIPAddress.ipAddress] The
     * IP address associated with the public IP address resource.
     * @property {object} [backendIPConfiguration.publicIPAddress.publicIPPrefix]
     * The Public IP Prefix this Public IP Address should be allocated from.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.publicIPPrefix.id] Resource ID.
     * @property {number}
     * [backendIPConfiguration.publicIPAddress.idleTimeoutInMinutes] The idle
     * timeout of the public IP address.
     * @property {string} [backendIPConfiguration.publicIPAddress.resourceGuid]
     * The resource GUID property of the public IP resource.
     * @property {string}
     * [backendIPConfiguration.publicIPAddress.provisioningState] The
     * provisioning state of the PublicIP resource. Possible values are:
     * 'Updating', 'Deleting', and 'Failed'.
     * @property {string} [backendIPConfiguration.publicIPAddress.etag] A unique
     * read-only string that changes whenever the resource is updated.
     * @property {array} [backendIPConfiguration.publicIPAddress.zones] A list of
     * availability zones denoting the IP allocated for the resource needs to
     * come from.
     * @property {array} [backendIPConfiguration.applicationSecurityGroups]
     * Application security groups in which the IP configuration is included.
     * @property {string} [backendIPConfiguration.provisioningState] The
     * provisioning state of the network interface IP configuration. Possible
     * values are: 'Updating', 'Deleting', and 'Failed'.
     * @property {string} [backendIPConfiguration.name] The name of the resource
     * that is unique within a resource group. This name can be used to access
     * the resource.
     * @property {string} [backendIPConfiguration.etag] A unique read-only string
     * that changes whenever the resource is updated.
     * @property {string} [protocol] Possible values include: 'Udp', 'Tcp', 'All'
     * @property {number} [frontendPort] The port for the external endpoint. Port
     * numbers for each rule must be unique within the Load Balancer. Acceptable
     * values range from 1 to 65534.
     * @property {number} [backendPort] The port used for the internal endpoint.
     * Acceptable values range from 1 to 65535.
     * @property {number} [idleTimeoutInMinutes] The timeout for the TCP idle
     * connection. The value can be set between 4 and 30 minutes. The default
     * value is 4 minutes. This element is only used when the protocol is set to
     * TCP.
     * @property {boolean} [enableFloatingIP] Configures a virtual machine's
     * endpoint for the floating IP capability required to configure a SQL
     * AlwaysOn Availability Group. This setting is required when using the SQL
     * AlwaysOn Availability Groups in SQL server. This setting can't be changed
     * after you create the endpoint.
     * @property {boolean} [enableTcpReset] Receive bidirectional TCP Reset on
     * TCP flow idle timeout or unexpected connection termination. This element
     * is only used when the protocol is set to TCP.
     * @property {string} [provisioningState] Gets the provisioning state of the
     * public IP resource. Possible values are: 'Updating', 'Deleting', and
     * 'Failed'.
     * @property {string} [name] Gets name of the resource that is unique within
     * a resource group. This name can be used to access the resource.
     * @property {string} [etag] A unique read-only string that changes whenever
     * the resource is updated.
     */
    constructor() {
      super();
    }
  
    /**
     * Defines the metadata of InboundNatRule
     *
     * @returns {object} metadata of InboundNatRule
     *
     */
    mapper() {
      return {
        required: false,
        serializedName: 'InboundNatRule',
        type: {
          name: 'Composite',
          className: 'InboundNatRule',
          modelProperties: {
            id: {
              required: false,
              serializedName: 'id',
              type: {
                name: 'String'
              }
            },
            frontendIPConfiguration: {
              required: false,
              serializedName: 'properties.frontendIPConfiguration',
              type: {
                name: 'Composite',
                className: 'SubResource'
              }
            },
            backendIPConfiguration: {
              required: false,
              readOnly: true,
              serializedName: 'properties.backendIPConfiguration',
              type: {
                name: 'Composite',
                className: 'NetworkInterfaceIPConfiguration'
              }
            },
            protocol: {
              required: false,
              serializedName: 'properties.protocol',
              type: {
                name: 'String'
              }
            },
            frontendPort: {
              required: false,
              serializedName: 'properties.frontendPort',
              type: {
                name: 'Number'
              }
            },
            backendPort: {
              required: false,
              serializedName: 'properties.backendPort',
              type: {
                name: 'Number'
              }
            },
            idleTimeoutInMinutes: {
              required: false,
              serializedName: 'properties.idleTimeoutInMinutes',
              type: {
                name: 'Number'
              }
            },
            enableFloatingIP: {
              required: false,
              serializedName: 'properties.enableFloatingIP',
              type: {
                name: 'Boolean'
              }
            },
            enableTcpReset: {
              required: false,
              serializedName: 'properties.enableTcpReset',
              type: {
                name: 'Boolean'
              }
            },
            provisioningState: {
              required: false,
              serializedName: 'properties.provisioningState',
              type: {
                name: 'String'
              }
            },
            name: {
              required: false,
              serializedName: 'name',
              type: {
                name: 'String'
              }
            },
            etag: {
              required: false,
              serializedName: 'etag',
              type: {
                name: 'String'
              }
            }
          }
        }
      };
    }
  }
  
  module.exports = InboundNatRule;
  