/*
 * 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');

/**
 * IPConfiguration in a network interface.
 *
 * @extends models['SubResource']
 */
class NetworkInterfaceIPConfiguration extends models['SubResource'] {
  /**
   * Create a NetworkInterfaceIPConfiguration.
   * @property {array} [virtualNetworkTaps] The reference to Virtual Network
   * Taps.
   * @property {array} [applicationGatewayBackendAddressPools] The reference of
   * ApplicationGatewayBackendAddressPool resource.
   * @property {array} [loadBalancerBackendAddressPools] The reference of
   * LoadBalancerBackendAddressPool resource.
   * @property {array} [loadBalancerInboundNatRules] A list of references of
   * LoadBalancerInboundNatRules.
   * @property {string} [privateIPAddress] Private IP address of the IP
   * configuration.
   * @property {string} [privateIPAllocationMethod] The private IP address
   * allocation method. Possible values include: 'Static', 'Dynamic'
   * @property {string} [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 include: 'IPv4',
   * 'IPv6'
   * @property {object} [subnet] Subnet bound to the IP configuration.
   * @property {string} [subnet.addressPrefix] The address prefix for the
   * subnet.
   * @property {array} [subnet.addressPrefixes] List of  address prefixes for
   * the subnet.
   * @property {object} [subnet.networkSecurityGroup] The reference of the
   * NetworkSecurityGroup resource.
   * @property {array} [subnet.networkSecurityGroup.securityRules] A collection
   * of security rules of the network security group.
   * @property {array} [subnet.networkSecurityGroup.defaultSecurityRules] The
   * default security rules of network security group.
   * @property {array} [subnet.networkSecurityGroup.networkInterfaces] A
   * collection of references to network interfaces.
   * @property {array} [subnet.networkSecurityGroup.subnets] A collection of
   * references to subnets.
   * @property {string} [subnet.networkSecurityGroup.resourceGuid] The resource
   * GUID property of the network security group resource.
   * @property {string} [subnet.networkSecurityGroup.provisioningState] The
   * provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [subnet.networkSecurityGroup.etag] A unique read-only
   * string that changes whenever the resource is updated.
   * @property {object} [subnet.routeTable] The reference of the RouteTable
   * resource.
   * @property {array} [subnet.routeTable.routes] Collection of routes
   * contained within a route table.
   * @property {array} [subnet.routeTable.subnets] A collection of references
   * to subnets.
   * @property {boolean} [subnet.routeTable.disableBgpRoutePropagation] Gets or
   * sets whether to disable the routes learned by BGP on that route table.
   * True means disable.
   * @property {string} [subnet.routeTable.provisioningState] The provisioning
   * state of the resource. Possible values are: 'Updating', 'Deleting', and
   * 'Failed'.
   * @property {string} [subnet.routeTable.etag] Gets a unique read-only string
   * that changes whenever the resource is updated.
   * @property {object} [subnet.natGateway] Nat gateway associated with this
   * subnet.
   * @property {string} [subnet.natGateway.id] Resource ID.
   * @property {array} [subnet.serviceEndpoints] An array of service endpoints.
   * @property {array} [subnet.serviceEndpointPolicies] An array of service
   * endpoint policies.
   * @property {array} [subnet.interfaceEndpoints] An array of references to
   * interface endpoints
   * @property {array} [subnet.ipConfigurations] Gets an array of references to
   * the network interface IP configurations using subnet.
   * @property {array} [subnet.ipConfigurationProfiles] Array of IP
   * configuration profiles which reference this subnet.
   * @property {array} [subnet.resourceNavigationLinks] Gets an array of
   * references to the external resources using subnet.
   * @property {array} [subnet.serviceAssociationLinks] Gets an array of
   * references to services injecting into this subnet.
   * @property {array} [subnet.delegations] Gets an array of references to the
   * delegations on the subnet.
   * @property {string} [subnet.purpose] A read-only string identifying the
   * intention of use for this subnet based on delegations and other
   * user-defined properties.
   * @property {string} [subnet.provisioningState] The provisioning state of
   * the resource.
   * @property {string} [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} [subnet.etag] A unique read-only string that changes
   * whenever the resource is updated.
   * @property {boolean} [primary] Gets whether this is a primary customer
   * address on the network interface.
   * @property {object} [publicIPAddress] Public IP address bound to the IP
   * configuration.
   * @property {object} [publicIPAddress.sku] The public IP address SKU.
   * @property {string} [publicIPAddress.sku.name] Name of a public IP address
   * SKU. Possible values include: 'Basic', 'Standard'
   * @property {string} [publicIPAddress.publicIPAllocationMethod] The public
   * IP address allocation method. Possible values include: 'Static', 'Dynamic'
   * @property {string} [publicIPAddress.publicIPAddressVersion] The public IP
   * address version. Possible values include: 'IPv4', 'IPv6'
   * @property {object} [publicIPAddress.ipConfiguration] The IP configuration
   * associated with the public IP address.
   * @property {string} [publicIPAddress.ipConfiguration.privateIPAddress] The
   * private IP address of the IP configuration.
   * @property {string}
   * [publicIPAddress.ipConfiguration.privateIPAllocationMethod] The private IP
   * address allocation method. Possible values include: 'Static', 'Dynamic'
   * @property {object} [publicIPAddress.ipConfiguration.subnet] The reference
   * of the subnet resource.
   * @property {string} [publicIPAddress.ipConfiguration.subnet.addressPrefix]
   * The address prefix for the subnet.
   * @property {array} [publicIPAddress.ipConfiguration.subnet.addressPrefixes]
   * List of  address prefixes for the subnet.
   * @property {object}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup] The
   * reference of the NetworkSecurityGroup resource.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.securityRules]
   * A collection of security rules of the network security group.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.defaultSecurityRules]
   * The default security rules of network security group.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.networkInterfaces]
   * A collection of references to network interfaces.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.subnets] A
   * collection of references to subnets.
   * @property {string}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.resourceGuid]
   * The resource GUID property of the network security group resource.
   * @property {string}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.provisioningState]
   * The provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   * @property {string}
   * [publicIPAddress.ipConfiguration.subnet.networkSecurityGroup.etag] A
   * unique read-only string that changes whenever the resource is updated.
   * @property {object} [publicIPAddress.ipConfiguration.subnet.routeTable] The
   * reference of the RouteTable resource.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.routeTable.routes] Collection of
   * routes contained within a route table.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.routeTable.subnets] A collection
   * of references to subnets.
   * @property {boolean}
   * [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}
   * [publicIPAddress.ipConfiguration.subnet.routeTable.provisioningState] The
   * provisioning state of the resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {string}
   * [publicIPAddress.ipConfiguration.subnet.routeTable.etag] Gets a unique
   * read-only string that changes whenever the resource is updated.
   * @property {object} [publicIPAddress.ipConfiguration.subnet.natGateway] Nat
   * gateway associated with this subnet.
   * @property {string} [publicIPAddress.ipConfiguration.subnet.natGateway.id]
   * Resource ID.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.serviceEndpoints] An array of
   * service endpoints.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.serviceEndpointPolicies] An array
   * of service endpoint policies.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.interfaceEndpoints] An array of
   * references to interface endpoints
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.ipConfigurations] Gets an array of
   * references to the network interface IP configurations using subnet.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] Array of
   * IP configuration profiles which reference this subnet.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] Gets an
   * array of references to the external resources using subnet.
   * @property {array}
   * [publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] Gets an
   * array of references to services injecting into this subnet.
   * @property {array} [publicIPAddress.ipConfiguration.subnet.delegations]
   * Gets an array of references to the delegations on the subnet.
   * @property {string} [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}
   * [publicIPAddress.ipConfiguration.subnet.provisioningState] The
   * provisioning state of the resource.
   * @property {string} [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} [publicIPAddress.ipConfiguration.subnet.etag] A unique
   * read-only string that changes whenever the resource is updated.
   * @property {object} [publicIPAddress.ipConfiguration.publicIPAddress] The
   * reference of the public IP resource.
   * @property {string} [publicIPAddress.ipConfiguration.provisioningState]
   * Gets the provisioning state of the public IP resource. Possible values
   * are: 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [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} [publicIPAddress.ipConfiguration.etag] A unique
   * read-only string that changes whenever the resource is updated.
   * @property {object} [publicIPAddress.dnsSettings] The FQDN of the DNS
   * record associated with the public IP address.
   * @property {string} [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} [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} [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} [publicIPAddress.ddosSettings] The DDoS protection
   * custom policy associated with the public IP address.
   * @property {object} [publicIPAddress.ddosSettings.ddosCustomPolicy] The
   * DDoS custom policy associated with the public IP.
   * @property {string} [publicIPAddress.ddosSettings.ddosCustomPolicy.id]
   * Resource ID.
   * @property {string} [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} [publicIPAddress.ipTags] The list of tags associated
   * with the public IP address.
   * @property {string} [publicIPAddress.ipAddress] The IP address associated
   * with the public IP address resource.
   * @property {object} [publicIPAddress.publicIPPrefix] The Public IP Prefix
   * this Public IP Address should be allocated from.
   * @property {string} [publicIPAddress.publicIPPrefix.id] Resource ID.
   * @property {number} [publicIPAddress.idleTimeoutInMinutes] The idle timeout
   * of the public IP address.
   * @property {string} [publicIPAddress.resourceGuid] The resource GUID
   * property of the public IP resource.
   * @property {string} [publicIPAddress.provisioningState] The provisioning
   * state of the PublicIP resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {string} [publicIPAddress.etag] A unique read-only string that
   * changes whenever the resource is updated.
   * @property {array} [publicIPAddress.zones] A list of availability zones
   * denoting the IP allocated for the resource needs to come from.
   * @property {array} [applicationSecurityGroups] Application security groups
   * in which the IP configuration is included.
   * @property {string} [provisioningState] The provisioning state of the
   * network interface IP configuration. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {string} [name] The 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 NetworkInterfaceIPConfiguration
   *
   * @returns {object} metadata of NetworkInterfaceIPConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'NetworkInterfaceIPConfiguration',
      type: {
        name: 'Composite',
        className: 'NetworkInterfaceIPConfiguration',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          virtualNetworkTaps: {
            required: false,
            serializedName: 'properties.virtualNetworkTaps',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VirtualNetworkTapElementType',
                  type: {
                    name: 'Composite',
                    className: 'VirtualNetworkTap'
                  }
              }
            }
          },
          applicationGatewayBackendAddressPools: {
            required: false,
            serializedName: 'properties.applicationGatewayBackendAddressPools',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationGatewayBackendAddressPoolElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationGatewayBackendAddressPool'
                  }
              }
            }
          },
          loadBalancerBackendAddressPools: {
            required: false,
            serializedName: 'properties.loadBalancerBackendAddressPools',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'BackendAddressPoolElementType',
                  type: {
                    name: 'Composite',
                    className: 'BackendAddressPool'
                  }
              }
            }
          },
          loadBalancerInboundNatRules: {
            required: false,
            serializedName: 'properties.loadBalancerInboundNatRules',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'InboundNatRuleElementType',
                  type: {
                    name: 'Composite',
                    className: 'InboundNatRule'
                  }
              }
            }
          },
          privateIPAddress: {
            required: false,
            serializedName: 'properties.privateIPAddress',
            type: {
              name: 'String'
            }
          },
          privateIPAllocationMethod: {
            required: false,
            serializedName: 'properties.privateIPAllocationMethod',
            type: {
              name: 'String'
            }
          },
          privateIPAddressVersion: {
            required: false,
            serializedName: 'properties.privateIPAddressVersion',
            type: {
              name: 'String'
            }
          },
          subnet: {
            required: false,
            serializedName: 'properties.subnet',
            type: {
              name: 'Composite',
              className: 'Subnet'
            }
          },
          primary: {
            required: false,
            serializedName: 'properties.primary',
            type: {
              name: 'Boolean'
            }
          },
          publicIPAddress: {
            required: false,
            serializedName: 'properties.publicIPAddress',
            type: {
              name: 'Composite',
              className: 'PublicIPAddress'
            }
          },
          applicationSecurityGroups: {
            required: false,
            serializedName: 'properties.applicationSecurityGroups',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationSecurityGroupElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationSecurityGroup'
                  }
              }
            }
          },
          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 = NetworkInterfaceIPConfiguration;
