/*
 * 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 Elastic Pool performance level capability.
 *
 */
class ElasticPoolPerformanceLevelCapability {
  /**
   * Create a ElasticPoolPerformanceLevelCapability.
   * @property {object} [performanceLevel] The performance level for the pool.
   * @property {number} [performanceLevel.value] Performance level value.
   * @property {string} [performanceLevel.unit] Unit type used to measure
   * performance level. Possible values include: 'DTU', 'VCores'
   * @property {object} [sku] The sku.
   * @property {string} [sku.name] The name of the SKU. Ex - P3. It is
   * typically a letter+number code
   * @property {string} [sku.tier] This field is required to be implemented by
   * the Resource Provider if the service has more than one tier, but is not
   * required on a PUT.
   * @property {string} [sku.size] The SKU size. When the name field is the
   * combination of tier and some other value, this would be the standalone
   * code.
   * @property {string} [sku.family] If the service has different generations
   * of hardware, for the same SKU, then that can be captured here.
   * @property {number} [sku.capacity] If the SKU supports scale out/in then
   * the capacity integer should be included. If scale out/in is not possible
   * for the resource this may be omitted.
   * @property {array} [supportedLicenseTypes] List of supported license types.
   * @property {number} [maxDatabaseCount] The maximum number of databases
   * supported.
   * @property {object} [includedMaxSize] The included (free) max size for this
   * performance level.
   * @property {number} [includedMaxSize.limit] The maximum size limit (see
   * 'unit' for the units).
   * @property {string} [includedMaxSize.unit] The units that the limit is
   * expressed in. Possible values include: 'Megabytes', 'Gigabytes',
   * 'Terabytes', 'Petabytes'
   * @property {array} [supportedMaxSizes] The list of supported max sizes.
   * @property {array} [supportedPerDatabaseMaxSizes] The list of supported per
   * database max sizes.
   * @property {array} [supportedPerDatabaseMaxPerformanceLevels] The list of
   * supported per database max 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 ElasticPoolPerformanceLevelCapability
   *
   * @returns {object} metadata of ElasticPoolPerformanceLevelCapability
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ElasticPoolPerformanceLevelCapability',
      type: {
        name: 'Composite',
        className: 'ElasticPoolPerformanceLevelCapability',
        modelProperties: {
          performanceLevel: {
            required: false,
            readOnly: true,
            serializedName: 'performanceLevel',
            type: {
              name: 'Composite',
              className: 'PerformanceLevelCapability'
            }
          },
          sku: {
            required: false,
            readOnly: true,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          },
          supportedLicenseTypes: {
            required: false,
            readOnly: true,
            serializedName: 'supportedLicenseTypes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'LicenseTypeCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'LicenseTypeCapability'
                  }
              }
            }
          },
          maxDatabaseCount: {
            required: false,
            readOnly: true,
            serializedName: 'maxDatabaseCount',
            type: {
              name: 'Number'
            }
          },
          includedMaxSize: {
            required: false,
            readOnly: true,
            serializedName: 'includedMaxSize',
            type: {
              name: 'Composite',
              className: 'MaxSizeCapability'
            }
          },
          supportedMaxSizes: {
            required: false,
            readOnly: true,
            serializedName: 'supportedMaxSizes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MaxSizeRangeCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'MaxSizeRangeCapability'
                  }
              }
            }
          },
          supportedPerDatabaseMaxSizes: {
            required: false,
            readOnly: true,
            serializedName: 'supportedPerDatabaseMaxSizes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MaxSizeRangeCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'MaxSizeRangeCapability'
                  }
              }
            }
          },
          supportedPerDatabaseMaxPerformanceLevels: {
            required: false,
            readOnly: true,
            serializedName: 'supportedPerDatabaseMaxPerformanceLevels',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ElasticPoolPerDatabaseMaxPerformanceLevelCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'ElasticPoolPerDatabaseMaxPerformanceLevelCapability'
                  }
              }
            }
          },
          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 = ElasticPoolPerformanceLevelCapability;
