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

/**
 * Public IP address resource.
 *
 * @extends models['Resource']
 */
class PublicIPAddress extends models['Resource'] {
  /**
   * Create a PublicIPAddress.
   * @property {object} [sku] The public IP address SKU.
   * @property {string} [sku.name] Name of a public IP address SKU. Possible
   * values include: 'Basic', 'Standard'
   * @property {string} [publicIPAllocationMethod] The public IP address
   * allocation method. Possible values include: 'Static', 'Dynamic'
   * @property {string} [publicIPAddressVersion] The public IP address version.
   * Possible values include: 'IPv4', 'IPv6'
   * @property {object} [ipConfiguration] The IP configuration associated with
   * the public IP address.
   * @property {string} [ipConfiguration.privateIPAddress] The private IP
   * address of the IP configuration.
   * @property {string} [ipConfiguration.privateIPAllocationMethod] The private
   * IP address allocation method. Possible values include: 'Static', 'Dynamic'
   * @property {object} [ipConfiguration.subnet] The reference of the subnet
   * resource.
   * @property {string} [ipConfiguration.subnet.addressPrefix] The address
   * prefix for the subnet.
   * @property {array} [ipConfiguration.subnet.addressPrefixes] List of
   * address prefixes for the subnet.
   * @property {object} [ipConfiguration.subnet.networkSecurityGroup] The
   * reference of the NetworkSecurityGroup resource.
   * @property {array}
   * [ipConfiguration.subnet.networkSecurityGroup.securityRules] A collection
   * of security rules of the network security group.
   * @property {array}
   * [ipConfiguration.subnet.networkSecurityGroup.defaultSecurityRules] The
   * default security rules of network security group.
   * @property {array}
   * [ipConfiguration.subnet.networkSecurityGroup.networkInterfaces] A
   * collection of references to network interfaces.
   * @property {array} [ipConfiguration.subnet.networkSecurityGroup.subnets] A
   * collection of references to subnets.
   * @property {string}
   * [ipConfiguration.subnet.networkSecurityGroup.resourceGuid] The resource
   * GUID property of the network security group resource.
   * @property {string}
   * [ipConfiguration.subnet.networkSecurityGroup.provisioningState] The
   * provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [ipConfiguration.subnet.networkSecurityGroup.etag] A
   * unique read-only string that changes whenever the resource is updated.
   * @property {object} [ipConfiguration.subnet.routeTable] The reference of
   * the RouteTable resource.
   * @property {array} [ipConfiguration.subnet.routeTable.routes] Collection of
   * routes contained within a route table.
   * @property {array} [ipConfiguration.subnet.routeTable.subnets] A collection
   * of references to subnets.
   * @property {boolean}
   * [ipConfiguration.subnet.routeTable.disableBgpRoutePropagation] Gets or
   * sets whether to disable the routes learned by BGP on that route table.
   * True means disable.
   * @property {string} [ipConfiguration.subnet.routeTable.provisioningState]
   * The provisioning state of the resource. Possible values are: 'Updating',
   * 'Deleting', and 'Failed'.
   * @property {string} [ipConfiguration.subnet.routeTable.etag] Gets a unique
   * read-only string that changes whenever the resource is updated.
   * @property {object} [ipConfiguration.subnet.natGateway] Nat gateway
   * associated with this subnet.
   * @property {string} [ipConfiguration.subnet.natGateway.id] Resource ID.
   * @property {array} [ipConfiguration.subnet.serviceEndpoints] An array of
   * service endpoints.
   * @property {array} [ipConfiguration.subnet.serviceEndpointPolicies] An
   * array of service endpoint policies.
   * @property {array} [ipConfiguration.subnet.interfaceEndpoints] An array of
   * references to interface endpoints
   * @property {array} [ipConfiguration.subnet.ipConfigurations] Gets an array
   * of references to the network interface IP configurations using subnet.
   * @property {array} [ipConfiguration.subnet.ipConfigurationProfiles] Array
   * of IP configuration profiles which reference this subnet.
   * @property {array} [ipConfiguration.subnet.resourceNavigationLinks] Gets an
   * array of references to the external resources using subnet.
   * @property {array} [ipConfiguration.subnet.serviceAssociationLinks] Gets an
   * array of references to services injecting into this subnet.
   * @property {array} [ipConfiguration.subnet.delegations] Gets an array of
   * references to the delegations on the subnet.
   * @property {string} [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} [ipConfiguration.subnet.provisioningState] The
   * provisioning state of the resource.
   * @property {string} [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} [ipConfiguration.subnet.etag] A unique read-only string
   * that changes whenever the resource is updated.
   * @property {object} [ipConfiguration.publicIPAddress] The reference of the
   * public IP resource.
   * @property {string} [ipConfiguration.provisioningState] Gets the
   * provisioning state of the public IP resource. Possible values are:
   * 'Updating', 'Deleting', and 'Failed'.
   * @property {string} [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} [ipConfiguration.etag] A unique read-only string that
   * changes whenever the resource is updated.
   * @property {object} [dnsSettings] The FQDN of the DNS record associated
   * with the public IP address.
   * @property {string} [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} [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} [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} [ddosSettings] The DDoS protection custom policy
   * associated with the public IP address.
   * @property {object} [ddosSettings.ddosCustomPolicy] The DDoS custom policy
   * associated with the public IP.
   * @property {string} [ddosSettings.ddosCustomPolicy.id] Resource ID.
   * @property {string} [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} [ipTags] The list of tags associated with the public IP
   * address.
   * @property {string} [ipAddress] The IP address associated with the public
   * IP address resource.
   * @property {object} [publicIPPrefix] The Public IP Prefix this Public IP
   * Address should be allocated from.
   * @property {string} [publicIPPrefix.id] Resource ID.
   * @property {number} [idleTimeoutInMinutes] The idle timeout of the public
   * IP address.
   * @property {string} [resourceGuid] The resource GUID property of the public
   * IP resource.
   * @property {string} [provisioningState] The provisioning state of the
   * PublicIP resource. Possible values are: 'Updating', 'Deleting', and
   * 'Failed'.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   * @property {array} [zones] A list of availability zones denoting the IP
   * allocated for the resource needs to come from.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of PublicIPAddress
   *
   * @returns {object} metadata of PublicIPAddress
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PublicIPAddress',
      type: {
        name: 'Composite',
        className: 'PublicIPAddress',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'PublicIPAddressSku'
            }
          },
          publicIPAllocationMethod: {
            required: false,
            serializedName: 'properties.publicIPAllocationMethod',
            type: {
              name: 'String'
            }
          },
          publicIPAddressVersion: {
            required: false,
            serializedName: 'properties.publicIPAddressVersion',
            type: {
              name: 'String'
            }
          },
          ipConfiguration: {
            required: false,
            readOnly: true,
            serializedName: 'properties.ipConfiguration',
            type: {
              name: 'Composite',
              className: 'IPConfiguration'
            }
          },
          dnsSettings: {
            required: false,
            serializedName: 'properties.dnsSettings',
            type: {
              name: 'Composite',
              className: 'PublicIPAddressDnsSettings'
            }
          },
          ddosSettings: {
            required: false,
            serializedName: 'properties.ddosSettings',
            type: {
              name: 'Composite',
              className: 'DdosSettings'
            }
          },
          ipTags: {
            required: false,
            serializedName: 'properties.ipTags',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'IpTagElementType',
                  type: {
                    name: 'Composite',
                    className: 'IpTag'
                  }
              }
            }
          },
          ipAddress: {
            required: false,
            serializedName: 'properties.ipAddress',
            type: {
              name: 'String'
            }
          },
          publicIPPrefix: {
            required: false,
            serializedName: 'properties.publicIPPrefix',
            type: {
              name: 'Composite',
              className: 'SubResource'
            }
          },
          idleTimeoutInMinutes: {
            required: false,
            serializedName: 'properties.idleTimeoutInMinutes',
            type: {
              name: 'Number'
            }
          },
          resourceGuid: {
            required: false,
            serializedName: 'properties.resourceGuid',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          zones: {
            required: false,
            serializedName: 'zones',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = PublicIPAddress;
