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

/**
 * Worker pool of an App Service Environment ARM resource.
 *
 * @extends models['ProxyOnlyResource']
 */
class WorkerPoolResource extends models['ProxyOnlyResource'] {
  /**
   * Create a WorkerPoolResource.
   * @member {number} [workerSizeId] Worker size ID for referencing this worker
   * pool.
   * @member {string} [computeMode] Shared or dedicated app hosting. Possible
   * values include: 'Shared', 'Dedicated', 'Dynamic'
   * @member {string} [workerSize] VM size of the worker pool instances.
   * @member {number} [workerCount] Number of instances in the worker pool.
   * @member {array} [instanceNames] Names of all instances in the worker pool
   * (read only).
   * @member {object} [sku]
   * @member {string} [sku.name] Name of the resource SKU.
   * @member {string} [sku.tier] Service tier of the resource SKU.
   * @member {string} [sku.size] Size specifier of the resource SKU.
   * @member {string} [sku.family] Family code of the resource SKU.
   * @member {number} [sku.capacity] Current number of instances assigned to
   * the resource.
   * @member {object} [sku.skuCapacity] Min, max, and default scale values of
   * the SKU.
   * @member {number} [sku.skuCapacity.minimum] Minimum number of workers for
   * this App Service plan SKU.
   * @member {number} [sku.skuCapacity.maximum] Maximum number of workers for
   * this App Service plan SKU.
   * @member {number} [sku.skuCapacity.default] Default number of workers for
   * this App Service plan SKU.
   * @member {string} [sku.skuCapacity.scaleType] Available scale
   * configurations for an App Service plan.
   * @member {array} [sku.locations] Locations of the SKU.
   * @member {array} [sku.capabilities] Capabilities of the SKU, e.g., is
   * traffic manager enabled?
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of WorkerPoolResource
   *
   * @returns {object} metadata of WorkerPoolResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'WorkerPoolResource',
      type: {
        name: 'Composite',
        className: 'WorkerPoolResource',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          workerSizeId: {
            required: false,
            serializedName: 'properties.workerSizeId',
            type: {
              name: 'Number'
            }
          },
          computeMode: {
            required: false,
            serializedName: 'properties.computeMode',
            type: {
              name: 'Enum',
              allowedValues: [ 'Shared', 'Dedicated', 'Dynamic' ]
            }
          },
          workerSize: {
            required: false,
            serializedName: 'properties.workerSize',
            type: {
              name: 'String'
            }
          },
          workerCount: {
            required: false,
            serializedName: 'properties.workerCount',
            type: {
              name: 'Number'
            }
          },
          instanceNames: {
            required: false,
            readOnly: true,
            serializedName: 'properties.instanceNames',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'SkuDescription'
            }
          }
        }
      }
    };
  }
}

module.exports = WorkerPoolResource;
