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

/**
 * DNS settings of a network interface.
 *
 */
class NetworkInterfaceDnsSettings {
  /**
   * Create a NetworkInterfaceDnsSettings.
   * @property {array} [dnsServers] List of DNS servers IP addresses. Use
   * 'AzureProvidedDNS' to switch to azure provided DNS resolution.
   * 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the
   * only value in dnsServers collection.
   * @property {array} [appliedDnsServers] If the VM that uses this NIC is part
   * of an Availability Set, then this list will have the union of all DNS
   * servers from all NICs that are part of the Availability Set. This property
   * is what is configured on each of those VMs.
   * @property {string} [internalDnsNameLabel] Relative DNS name for this NIC
   * used for internal communications between VMs in the same virtual network.
   * @property {string} [internalFqdn] Fully qualified DNS name supporting
   * internal communications between VMs in the same virtual network.
   * @property {string} [internalDomainNameSuffix] Even if internalDnsNameLabel
   * is not specified, a DNS entry is created for the primary NIC of the VM.
   * This DNS name can be constructed by concatenating the VM name with the
   * value of internalDomainNameSuffix.
   */
  constructor() {
  }

  /**
   * Defines the metadata of NetworkInterfaceDnsSettings
   *
   * @returns {object} metadata of NetworkInterfaceDnsSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'NetworkInterfaceDnsSettings',
      type: {
        name: 'Composite',
        className: 'NetworkInterfaceDnsSettings',
        modelProperties: {
          dnsServers: {
            required: false,
            serializedName: 'dnsServers',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          appliedDnsServers: {
            required: false,
            serializedName: 'appliedDnsServers',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          internalDnsNameLabel: {
            required: false,
            serializedName: 'internalDnsNameLabel',
            type: {
              name: 'String'
            }
          },
          internalFqdn: {
            required: false,
            serializedName: 'internalFqdn',
            type: {
              name: 'String'
            }
          },
          internalDomainNameSuffix: {
            required: false,
            serializedName: 'internalDomainNameSuffix',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = NetworkInterfaceDnsSettings;
