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

/**
 * Class representing the Geographic hierarchy used with the Geographic traffic
 * routing method.
 *
 * @extends models['ProxyResource']
 */
class TrafficManagerGeographicHierarchy extends models['ProxyResource'] {
  /**
   * Create a TrafficManagerGeographicHierarchy.
   * @member {object} [geographicHierarchy] The region at the root of the
   * hierarchy from all the regions in the hierarchy can be retrieved.
   * @member {string} [geographicHierarchy.code] The code of the region
   * @member {string} [geographicHierarchy.name] The name of the region
   * @member {array} [geographicHierarchy.regions] The list of Regions grouped
   * under this Region in the Geographic Hierarchy.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of TrafficManagerGeographicHierarchy
   *
   * @returns {object} metadata of TrafficManagerGeographicHierarchy
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TrafficManagerGeographicHierarchy',
      type: {
        name: 'Composite',
        className: 'TrafficManagerGeographicHierarchy',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          geographicHierarchy: {
            required: false,
            serializedName: 'properties.geographicHierarchy',
            type: {
              name: 'Composite',
              className: 'Region'
            }
          }
        }
      }
    };
  }
}

module.exports = TrafficManagerGeographicHierarchy;
