/*
 * 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 NetworkInterface class.
 * @constructor
 * A NetworkInterface in a resource group
 * @member {object} [virtualMachine] Gets or sets the reference of a
 * VirtualMachine
 * 
 * @member {string} [virtualMachine.id] Resource Id
 * 
 * @member {object} [networkSecurityGroup] Gets or sets the reference of the
 * NetworkSecurityGroup resource
 * 
 * @member {array} [networkSecurityGroup.securityRules] Gets or sets Security
 * rules of network security group
 * 
 * @member {array} [networkSecurityGroup.defaultSecurityRules] Gets or sets
 * Default security rules of network security group
 * 
 * @member {array} [networkSecurityGroup.networkInterfaces] Gets collection of
 * references to Network Interfaces
 * 
 * @member {array} [networkSecurityGroup.subnets] Gets collection of
 * references to subnets
 * 
 * @member {string} [networkSecurityGroup.resourceGuid] Gets or sets resource
 * guid property of the network security group resource
 * 
 * @member {string} [networkSecurityGroup.provisioningState] Gets or sets
 * Provisioning state of the PublicIP resource Updating/Deleting/Failed
 * 
 * @member {string} [networkSecurityGroup.etag] Gets a unique read-only string
 * that changes whenever the resource is updated
 * 
 * @member {array} [ipConfigurations] Gets or sets list of IPConfigurations of
 * the NetworkInterface
 * 
 * @member {object} [dnsSettings] Gets or sets DNS Settings in
 * NetworkInterface
 * 
 * @member {array} [dnsSettings.dnsServers] Gets or sets list of DNS servers
 * IP addresses
 * 
 * @member {array} [dnsSettings.appliedDnsServers] Gets or sets list of
 * Applied DNS servers IP addresses
 * 
 * @member {string} [dnsSettings.internalDnsNameLabel] Gets or sets the
 * Internal DNS name
 * 
 * @member {string} [dnsSettings.internalFqdn] Gets or sets the internal fqdn.
 * 
 * @member {string} [dnsSettings.internalDomainNameSuffix] Gets or sets
 * internal domain name suffix of the NIC.
 * 
 * @member {string} [macAddress] Gets the MAC Address of the network interface
 * 
 * @member {boolean} [primary] Gets whether this is a primary NIC on a virtual
 * machine
 * 
 * @member {boolean} [enableIPForwarding] Gets or sets whether IPForwarding is
 * enabled on the NIC
 * 
 * @member {string} [resourceGuid] Gets or sets resource guid property of the
 * network interface 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 NetworkInterface() {
  NetworkInterface['super_'].call(this);
}

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

/**
 * Defines the metadata of NetworkInterface
 *
 * @returns {object} metadata of NetworkInterface
 *
 */
NetworkInterface.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'NetworkInterface',
    type: {
      name: 'Composite',
      className: 'NetworkInterface',
      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'
                }
            }
          }
        },
        virtualMachine: {
          required: false,
          serializedName: 'properties.virtualMachine',
          type: {
            name: 'Composite',
            className: 'SubResource'
          }
        },
        networkSecurityGroup: {
          required: false,
          serializedName: 'properties.networkSecurityGroup',
          type: {
            name: 'Composite',
            className: 'NetworkSecurityGroup'
          }
        },
        ipConfigurations: {
          required: false,
          serializedName: 'properties.ipConfigurations',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'NetworkInterfaceIPConfigurationElementType',
                type: {
                  name: 'Composite',
                  className: 'NetworkInterfaceIPConfiguration'
                }
            }
          }
        },
        dnsSettings: {
          required: false,
          serializedName: 'properties.dnsSettings',
          type: {
            name: 'Composite',
            className: 'NetworkInterfaceDnsSettings'
          }
        },
        macAddress: {
          required: false,
          serializedName: 'properties.macAddress',
          type: {
            name: 'String'
          }
        },
        primary: {
          required: false,
          serializedName: 'properties.primary',
          type: {
            name: 'Boolean'
          }
        },
        enableIPForwarding: {
          required: false,
          serializedName: 'properties.enableIPForwarding',
          type: {
            name: 'Boolean'
          }
        },
        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 = NetworkInterface;
