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

/**
 * Performance monitor API response.
 *
 */
class PerfMonResponse {
  /**
   * Create a PerfMonResponse.
   * @member {string} [code] The response code.
   * @member {string} [message] The message.
   * @member {object} [data] The performance monitor counters.
   * @member {string} [data.name] Unique key name of the counter.
   * @member {date} [data.startTime] Start time of the period.
   * @member {date} [data.endTime] End time of the period.
   * @member {string} [data.timeGrain] Presented time grain.
   * @member {array} [data.values] Collection of workers that are active during
   * this time.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PerfMonResponse
   *
   * @returns {object} metadata of PerfMonResponse
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PerfMonResponse',
      type: {
        name: 'Composite',
        className: 'PerfMonResponse',
        modelProperties: {
          code: {
            required: false,
            serializedName: 'code',
            type: {
              name: 'String'
            }
          },
          message: {
            required: false,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          data: {
            required: false,
            serializedName: 'data',
            type: {
              name: 'Composite',
              className: 'PerfMonSet'
            }
          }
        }
      }
    };
  }
}

module.exports = PerfMonResponse;
