/*
 * 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 a Traffic Manager HeatMap traffic flow properties.
 *
 */
class TrafficFlow {
  /**
   * Create a TrafficFlow.
   * @member {string} [sourceIp] The IP address that this query experience
   * originated from.
   * @member {number} [latitude] The approximate latitude that these queries
   * originated from.
   * @member {number} [longitude] The approximate longitude that these queries
   * originated from.
   * @member {array} [queryExperiences] The query experiences produced in this
   * HeatMap calculation.
   */
  constructor() {
  }

  /**
   * Defines the metadata of TrafficFlow
   *
   * @returns {object} metadata of TrafficFlow
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TrafficFlow',
      type: {
        name: 'Composite',
        className: 'TrafficFlow',
        modelProperties: {
          sourceIp: {
            required: false,
            serializedName: 'sourceIp',
            type: {
              name: 'String'
            }
          },
          latitude: {
            required: false,
            serializedName: 'latitude',
            type: {
              name: 'Number'
            }
          },
          longitude: {
            required: false,
            serializedName: 'longitude',
            type: {
              name: 'Number'
            }
          },
          queryExperiences: {
            required: false,
            serializedName: 'queryExperiences',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'QueryExperienceElementType',
                  type: {
                    name: 'Composite',
                    className: 'QueryExperience'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = TrafficFlow;
