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

/**
 * Represents the network settings of a device.
 *
 * @extends models['BaseModel']
 */
class NetworkSettings extends models['BaseModel'] {
  /**
   * Create a NetworkSettings.
   * @member {object} dnsSettings The DNS (Domain Name System) settings of
   * device.
   * @member {string} [dnsSettings.primaryDnsServer] The primary IPv4 DNS
   * server for the device
   * @member {string} [dnsSettings.primaryIpv6DnsServer] The primary IPv6 DNS
   * server for the device
   * @member {array} [dnsSettings.secondaryDnsServers] The secondary IPv4 DNS
   * server for the device
   * @member {array} [dnsSettings.secondaryIpv6DnsServers] The secondary IPv6
   * DNS server for the device
   * @member {object} networkAdapters The network adapter list of device.
   * @member {array} [networkAdapters.value] The value.
   * @member {object} webproxySettings The webproxy settings of device.
   * @member {string} [webproxySettings.connectionUri] The connection URI.
   * @member {string} [webproxySettings.authentication] The authentication
   * type. Possible values include: 'Invalid', 'None', 'Basic', 'NTLM'
   * @member {string} [webproxySettings.username] The webproxy username.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of NetworkSettings
   *
   * @returns {object} metadata of NetworkSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'NetworkSettings',
      type: {
        name: 'Composite',
        className: 'NetworkSettings',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            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'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'Enum',
              allowedValues: [ 'Series8000' ]
            }
          },
          dnsSettings: {
            required: true,
            serializedName: 'properties.dnsSettings',
            type: {
              name: 'Composite',
              className: 'DNSSettings'
            }
          },
          networkAdapters: {
            required: true,
            serializedName: 'properties.networkAdapters',
            type: {
              name: 'Composite',
              className: 'NetworkAdapterList'
            }
          },
          webproxySettings: {
            required: true,
            serializedName: 'properties.webproxySettings',
            type: {
              name: 'Composite',
              className: 'WebproxySettings'
            }
          }
        }
      }
    };
  }
}

module.exports = NetworkSettings;
