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

/**
 * Description of metrics specification.
 *
 */
class MetricSpecification {
  /**
   * Create a MetricSpecification.
   * @property {string} [name] The name of the metric.
   * @property {string} [displayName] The display name of the metric.
   * @property {string} [displayDescription] The description of the metric.
   * @property {string} [unit] Units the metric to be displayed in.
   * @property {string} [aggregationType] The aggregation type.
   * @property {array} [availabilities] List of availability.
   * @property {boolean} [enableRegionalMdmAccount] Whether regional MDM
   * account enabled.
   * @property {boolean} [fillGapWithZero] Whether gaps would be filled with
   * zeros.
   * @property {string} [metricFilterPattern] Pattern for the filter of the
   * metric.
   * @property {array} [dimensions] List of dimensions.
   * @property {boolean} [isInternal] Whether the metric is internal.
   * @property {string} [sourceMdmAccount] The source MDM account.
   * @property {string} [sourceMdmNamespace] The source MDM namespace.
   * @property {string} [resourceIdDimensionNameOverride] The resource Id
   * dimension name override.
   */
  constructor() {
  }

  /**
   * Defines the metadata of MetricSpecification
   *
   * @returns {object} metadata of MetricSpecification
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'MetricSpecification',
      type: {
        name: 'Composite',
        className: 'MetricSpecification',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'displayName',
            type: {
              name: 'String'
            }
          },
          displayDescription: {
            required: false,
            serializedName: 'displayDescription',
            type: {
              name: 'String'
            }
          },
          unit: {
            required: false,
            serializedName: 'unit',
            type: {
              name: 'String'
            }
          },
          aggregationType: {
            required: false,
            serializedName: 'aggregationType',
            type: {
              name: 'String'
            }
          },
          availabilities: {
            required: false,
            serializedName: 'availabilities',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'AvailabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'Availability'
                  }
              }
            }
          },
          enableRegionalMdmAccount: {
            required: false,
            serializedName: 'enableRegionalMdmAccount',
            type: {
              name: 'Boolean'
            }
          },
          fillGapWithZero: {
            required: false,
            serializedName: 'fillGapWithZero',
            type: {
              name: 'Boolean'
            }
          },
          metricFilterPattern: {
            required: false,
            serializedName: 'metricFilterPattern',
            type: {
              name: 'String'
            }
          },
          dimensions: {
            required: false,
            serializedName: 'dimensions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DimensionElementType',
                  type: {
                    name: 'Composite',
                    className: 'Dimension'
                  }
              }
            }
          },
          isInternal: {
            required: false,
            serializedName: 'isInternal',
            type: {
              name: 'Boolean'
            }
          },
          sourceMdmAccount: {
            required: false,
            serializedName: 'sourceMdmAccount',
            type: {
              name: 'String'
            }
          },
          sourceMdmNamespace: {
            required: false,
            serializedName: 'sourceMdmNamespace',
            type: {
              name: 'String'
            }
          },
          resourceIdDimensionNameOverride: {
            required: false,
            serializedName: 'resourceIdDimensionNameOverride',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = MetricSpecification;
