/*
 * 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 0.16.0.0
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the PublicIPAddress class.
 * @constructor
 * PublicIPAddress resource
 * @member {string} [publicIPAllocationMethod] Gets or sets PublicIP
 * allocation method (Static/Dynamic). Possible values include: 'Static',
 * 'Dynamic'
 * 
 * @member {string} [publicIPAddressVersion] Gets or sets PublicIP address
 * version (IPv4/IPv6). Possible values include: 'IPv4', 'IPv6'
 * 
 * @member {object} [ipConfiguration]
 * 
 * @member {string} [ipConfiguration.privateIPAddress] Gets or sets the
 * privateIPAddress of the IP Configuration
 * 
 * @member {string} [ipConfiguration.privateIPAllocationMethod] Gets or sets
 * PrivateIP allocation method (Static/Dynamic). Possible values include:
 * 'Static', 'Dynamic'
 * 
 * @member {object} [ipConfiguration.subnet] Gets or sets the reference of the
 * subnet resource
 * 
 * @member {string} [ipConfiguration.subnet.addressPrefix] Gets or sets
 * Address prefix for the subnet.
 * 
 * @member {object} [ipConfiguration.subnet.networkSecurityGroup] Gets or sets
 * the reference of the NetworkSecurityGroup resource
 * 
 * @member {array} [ipConfiguration.subnet.networkSecurityGroup.securityRules]
 * Gets or sets Security rules of network security group
 * 
 * @member {array}
 * [ipConfiguration.subnet.networkSecurityGroup.defaultSecurityRules] Gets or
 * sets Default security rules of network security group
 * 
 * @member {array}
 * [ipConfiguration.subnet.networkSecurityGroup.networkInterfaces] Gets
 * collection of references to Network Interfaces
 * 
 * @member {array} [ipConfiguration.subnet.networkSecurityGroup.subnets] Gets
 * collection of references to subnets
 * 
 * @member {string} [ipConfiguration.subnet.networkSecurityGroup.resourceGuid]
 * Gets or sets resource guid property of the network security group resource
 * 
 * @member {string}
 * [ipConfiguration.subnet.networkSecurityGroup.provisioningState] Gets or
 * sets Provisioning state of the PublicIP resource Updating/Deleting/Failed
 * 
 * @member {string} [ipConfiguration.subnet.networkSecurityGroup.etag] Gets a
 * unique read-only string that changes whenever the resource is updated
 * 
 * @member {object} [ipConfiguration.subnet.routeTable] Gets or sets the
 * reference of the RouteTable resource
 * 
 * @member {array} [ipConfiguration.subnet.routeTable.routes] Gets or sets
 * Routes in a Route Table
 * 
 * @member {array} [ipConfiguration.subnet.routeTable.subnets] Gets collection
 * of references to subnets
 * 
 * @member {string} [ipConfiguration.subnet.routeTable.provisioningState] Gets
 * or sets Provisioning state of the resource Updating/Deleting/Failed
 * 
 * @member {string} [ipConfiguration.subnet.routeTable.etag] Gets a unique
 * read-only string that changes whenever the resource is updated
 * 
 * @member {array} [ipConfiguration.subnet.ipConfigurations] Gets array of
 * references to the network interface IP configurations using subnet
 * 
 * @member {string} [ipConfiguration.subnet.provisioningState] Gets or sets
 * Provisioning state of the PublicIP resource Updating/Deleting/Failed
 * 
 * @member {string} [ipConfiguration.subnet.name] Gets name of the resource
 * that is unique within a resource group. This name can be used to access
 * the resource
 * 
 * @member {string} [ipConfiguration.subnet.etag] A unique read-only string
 * that changes whenever the resource is updated
 * 
 * @member {object} [ipConfiguration.publicIPAddress] Gets or sets the
 * reference of the PublicIP resource
 * 
 * @member {string} [ipConfiguration.provisioningState] Gets or sets
 * Provisioning state of the PublicIP resource Updating/Deleting/Failed
 * 
 * @member {string} [ipConfiguration.name] Gets name of the resource that is
 * unique within a resource group. This name can be used to access the
 * resource
 * 
 * @member {string} [ipConfiguration.etag] A unique read-only string that
 * changes whenever the resource is updated
 * 
 * @member {object} [dnsSettings] Gets or sets FQDN of the DNS record
 * associated with the public IP address
 * 
 * @member {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.
 * 
 * @member {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.
 * 
 * @member {string} [dnsSettings.reverseFqdn] Gets or Sests 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.
 * 
 * @member {string} [ipAddress]
 * 
 * @member {number} [idleTimeoutInMinutes] Gets or sets the Idletimeout of the
 * public IP address
 * 
 * @member {string} [resourceGuid] Gets or sets resource guid property of the
 * PublicIP resource
 * 
 * @member {string} [provisioningState] Gets or sets Provisioning state of the
 * PublicIP resource Updating/Deleting/Failed
 * 
 * @member {string} [etag] Gets a unique read-only string that changes
 * whenever the resource is updated
 * 
 */
function PublicIPAddress() {
  PublicIPAddress['super_'].call(this);
}

util.inherits(PublicIPAddress, models['Resource']);

/**
 * Defines the metadata of PublicIPAddress
 *
 * @returns {object} metadata of PublicIPAddress
 *
 */
PublicIPAddress.prototype.mapper = function () {
  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'
                }
            }
          }
        },
        publicIPAllocationMethod: {
          required: false,
          serializedName: 'properties.publicIPAllocationMethod',
          type: {
            name: 'String'
          }
        },
        publicIPAddressVersion: {
          required: false,
          serializedName: 'properties.publicIPAddressVersion',
          type: {
            name: 'String'
          }
        },
        ipConfiguration: {
          required: false,
          serializedName: 'properties.ipConfiguration',
          type: {
            name: 'Composite',
            className: 'IPConfiguration'
          }
        },
        dnsSettings: {
          required: false,
          serializedName: 'properties.dnsSettings',
          type: {
            name: 'Composite',
            className: 'PublicIPAddressDnsSettings'
          }
        },
        ipAddress: {
          required: false,
          serializedName: 'properties.ipAddress',
          type: {
            name: 'String'
          }
        },
        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'
          }
        }
      }
    }
  };
};

module.exports = PublicIPAddress;
