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

/**
 * The Elastic Pool DTU capability.
 *
 */
class ElasticPoolDtuCapability {
  /**
   * Create a ElasticPoolDtuCapability.
   * @member {number} [limit] The maximum size of the database (see 'unit' for
   * the units).
   * @member {number} [maxDatabaseCount] The maximum number of databases
   * supported.
   * @member {string} [status] The status of the capability. Possible values
   * include: 'Visible', 'Available', 'Default', 'Disabled'
   * @member {array} [supportedMaxSizes] The list of supported max sizes.
   * @member {object} [includedMaxSize] The included (free) max size for this
   * service level objective.
   * @member {number} [includedMaxSize.limit] The maximum size of the database
   * (see 'unit' for the units).
   * @member {string} [includedMaxSize.unit] The units that the limit is
   * expressed in. Possible values include: 'Megabytes', 'Gigabytes',
   * 'Terabytes', 'Petabytes'
   * @member {string} [includedMaxSize.status] The status of the maximum size
   * capability. Possible values include: 'Visible', 'Available', 'Default',
   * 'Disabled'
   * @member {array} [supportedPerDatabaseMaxSizes] The list of supported max
   * database sizes.
   * @member {array} [supportedPerDatabaseMaxDtus] The list of supported max
   * database DTUs.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ElasticPoolDtuCapability
   *
   * @returns {object} metadata of ElasticPoolDtuCapability
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ElasticPoolDtuCapability',
      type: {
        name: 'Composite',
        className: 'ElasticPoolDtuCapability',
        modelProperties: {
          limit: {
            required: false,
            readOnly: true,
            serializedName: 'limit',
            type: {
              name: 'Number'
            }
          },
          maxDatabaseCount: {
            required: false,
            readOnly: true,
            serializedName: 'maxDatabaseCount',
            type: {
              name: 'Number'
            }
          },
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'Enum',
              allowedValues: [ 'Visible', 'Available', 'Default', 'Disabled' ]
            }
          },
          supportedMaxSizes: {
            required: false,
            readOnly: true,
            serializedName: 'supportedMaxSizes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MaxSizeCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'MaxSizeCapability'
                  }
              }
            }
          },
          includedMaxSize: {
            required: false,
            readOnly: true,
            serializedName: 'includedMaxSize',
            type: {
              name: 'Composite',
              className: 'MaxSizeCapability'
            }
          },
          supportedPerDatabaseMaxSizes: {
            required: false,
            readOnly: true,
            serializedName: 'supportedPerDatabaseMaxSizes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MaxSizeCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'MaxSizeCapability'
                  }
              }
            }
          },
          supportedPerDatabaseMaxDtus: {
            required: false,
            readOnly: true,
            serializedName: 'supportedPerDatabaseMaxDtus',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ElasticPoolPerDatabaseMaxDtuCapabilityElementType',
                  type: {
                    name: 'Composite',
                    className: 'ElasticPoolPerDatabaseMaxDtuCapability'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ElasticPoolDtuCapability;
