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

/**
 * Metric availability specifies the time grain (aggregation interval or
 * frequency) and the retention period for that time grain.
 *
 */
class MetricAvailability {
  /**
   * Create a MetricAvailability.
   * @property {moment.duration} [timeGrain] the time grain specifies the
   * aggregation interval for the metric. Expressed as a duration 'PT1M',
   * 'P1D', etc.
   * @property {moment.duration} [retention] the retention period for the
   * metric at the specified timegrain.  Expressed as a duration 'PT1M', 'P1D',
   * etc.
   */
  constructor() {
  }

  /**
   * Defines the metadata of MetricAvailability
   *
   * @returns {object} metadata of MetricAvailability
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'MetricAvailability',
      type: {
        name: 'Composite',
        className: 'MetricAvailability',
        modelProperties: {
          timeGrain: {
            required: false,
            serializedName: 'timeGrain',
            type: {
              name: 'TimeSpan'
            }
          },
          retention: {
            required: false,
            serializedName: 'retention',
            type: {
              name: 'TimeSpan'
            }
          }
        }
      }
    };
  }
}

module.exports = MetricAvailability;
