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

/**
 * Describes a DNS zone.
 *
 * @extends models['TrackedResource']
 */
class Zone extends models['TrackedResource'] {
  /**
   * Create a Zone.
   * @member {string} [etag] The etag of the zone.
   * @member {number} [maxNumberOfRecordSets] The maximum number of record sets
   * that can be created in this DNS zone.  This is a read-only property and
   * any attempt to set this value will be ignored.
   * @member {number} [numberOfRecordSets] The current number of record sets in
   * this DNS zone.  This is a read-only property and any attempt to set this
   * value will be ignored.
   * @member {array} [nameServers] The name servers for this DNS zone. This is
   * a read-only property and any attempt to set this value will be ignored.
   * @member {string} [zoneType] The type of this DNS zone (Public or Private).
   * Possible values include: 'Public', 'Private'. Default value: 'Public' .
   * @member {array} [registrationVirtualNetworks] A list of references to
   * virtual networks that register hostnames in this DNS zone. This is a only
   * when ZoneType is Private.
   * @member {array} [resolutionVirtualNetworks] A list of references to
   * virtual networks that resolve records in this DNS zone. This is a only
   * when ZoneType is Private.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Zone
   *
   * @returns {object} metadata of Zone
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Zone',
      type: {
        name: 'Composite',
        className: 'Zone',
        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'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          maxNumberOfRecordSets: {
            required: false,
            readOnly: true,
            serializedName: 'properties.maxNumberOfRecordSets',
            type: {
              name: 'Number'
            }
          },
          numberOfRecordSets: {
            required: false,
            readOnly: true,
            serializedName: 'properties.numberOfRecordSets',
            type: {
              name: 'Number'
            }
          },
          nameServers: {
            required: false,
            readOnly: true,
            serializedName: 'properties.nameServers',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          zoneType: {
            required: false,
            serializedName: 'properties.zoneType',
            defaultValue: 'Public',
            type: {
              name: 'Enum',
              allowedValues: [ 'Public', 'Private' ]
            }
          },
          registrationVirtualNetworks: {
            required: false,
            serializedName: 'properties.registrationVirtualNetworks',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubResource'
                  }
              }
            }
          },
          resolutionVirtualNetworks: {
            required: false,
            serializedName: 'properties.resolutionVirtualNetworks',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubResource'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = Zone;
