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

/**
 * Worker pool of an App Service Environment.
 *
 */
class WorkerPool {
  /**
   * Create a WorkerPool.
   * @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).
   */
  constructor() {
  }

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

module.exports = WorkerPool;
