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

/**
 * Represents an instance of a Dedicated Capacity resource.
 *
 * @extends models['Resource']
 */
class DedicatedCapacity extends models['Resource'] {
  /**
   * Create a DedicatedCapacity.
   * @member {object} [administration] A collection of Dedicated capacity
   * administrators
   * @member {array} [administration.members] An array of administrator user
   * identities.
   * @member {string} [state] The current state of PowerBI Dedicated resource.
   * The state is to indicate more states outside of resource provisioning.
   * Possible values include: 'Deleting', 'Succeeded', 'Failed', 'Paused',
   * 'Suspended', 'Provisioning', 'Updating', 'Suspending', 'Pausing',
   * 'Resuming', 'Preparing', 'Scaling'
   * @member {string} [provisioningState] The current deployment state of
   * PowerBI Dedicatedresource. The provisioningState is to indicate states for
   * resource provisioning. Possible values include: 'Deleting', 'Succeeded',
   * 'Failed', 'Paused', 'Suspended', 'Provisioning', 'Updating', 'Suspending',
   * 'Pausing', 'Resuming', 'Preparing', 'Scaling'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DedicatedCapacity
   *
   * @returns {object} metadata of DedicatedCapacity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DedicatedCapacity',
      type: {
        name: 'Composite',
        className: 'DedicatedCapacity',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          sku: {
            required: true,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'ResourceSku'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          administration: {
            required: false,
            serializedName: 'properties.administration',
            type: {
              name: 'Composite',
              className: 'DedicatedCapacityAdministrators'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DedicatedCapacity;
