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

/**
 * Specifies the metric alert criteria for a single resource that has multiple
 * metric criteria.
 *
 * @extends models['MetricAlertCriteria']
 */
class MetricAlertSingleResourceMultipleMetricCriteria extends models['MetricAlertCriteria'] {
  /**
   * Create a MetricAlertSingleResourceMultipleMetricCriteria.
   * @property {array} [allOf] The list of metric criteria for this 'all of'
   * operation.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of MetricAlertSingleResourceMultipleMetricCriteria
   *
   * @returns {object} metadata of MetricAlertSingleResourceMultipleMetricCriteria
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'odata.type',
          clientName: 'odatatype'
        },
        uberParent: 'MetricAlertCriteria',
        className: 'MetricAlertSingleResourceMultipleMetricCriteria',
        modelProperties: {
          odatatype: {
            required: true,
            serializedName: 'odata\\.type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          allOf: {
            required: false,
            serializedName: 'allOf',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MetricCriteriaElementType',
                  type: {
                    name: 'Composite',
                    polymorphicDiscriminator: {
                      serializedName: 'criterionType',
                      clientName: 'criterionType'
                    },
                    uberParent: 'MultiMetricCriteria',
                    className: 'MetricCriteria'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = MetricAlertSingleResourceMultipleMetricCriteria;
