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

/**
 * The max per-database performance level capability.
 *
 */
class ElasticPoolPerDatabaseMaxPerformanceLevelCapability {
  /**
   * Create a ElasticPoolPerDatabaseMaxPerformanceLevelCapability.
   * @property {number} [limit] The maximum performance level per database.
   * @property {string} [unit] Unit type used to measure performance level.
   * Possible values include: 'DTU', 'VCores'
   * @property {array} [supportedPerDatabaseMinPerformanceLevels] The list of
   * supported min database performance levels.
   * @property {string} [status] The status of the capability. Possible values
   * include: 'Visible', 'Available', 'Default', 'Disabled'
   * @property {string} [reason] The reason for the capability not being
   * available.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ElasticPoolPerDatabaseMaxPerformanceLevelCapability
   *
   * @returns {object} metadata of ElasticPoolPerDatabaseMaxPerformanceLevelCapability
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability',
      type: {
        name: 'Composite',
        className: 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability',
        modelProperties: {
          limit: {
            required: false,
            readOnly: true,
            serializedName: 'limit',
            type: {
              name: 'Number'
            }
          },
          unit: {
            required: false,
            readOnly: true,
            serializedName: 'unit',
            type: {
              name: 'String'
            }
          },
          supportedPerDatabaseMinPerformanceLevels: {
            required: false,
            readOnly: true,
            serializedName: 'supportedPerDatabaseMinPerformanceLevels',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ElasticPoolPerDatabaseMinPerformanceLevelCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'ElasticPoolPerDatabaseMinPerformanceLevelCapability'
                  }
              }
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'Enum',
              allowedValues: [ 'Visible', 'Available', 'Default', 'Disabled' ]
            }
          },
          reason: {
            required: false,
            serializedName: 'reason',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ElasticPoolPerDatabaseMaxPerformanceLevelCapability;
