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

var models = require('./index');

/**
 * @class
 * Initializes a new instance of the PoolInformation class.
 * @constructor
 * Specifies how a job should be assigned to a pool.
 * @member {string} [poolId] The id of an existing pool. All the tasks of the
 * job will run on the specified pool. You must specify either PoolId or
 * AutoPoolSpecification, but not both.
 * 
 * @member {object} [autoPoolSpecification] Characteristics for a temporary
 * 'auto pool'. The Batch service will create this auto pool and run all of
 * the tasks of the job on it, and will delete the pool once the job has
 * completed. You must specify either PoolId or AutoPoolSpecification, but
 * not both.
 * 
 * @member {string} [autoPoolSpecification.autoPoolIdPrefix] A prefix to be
 * added to the unique identifier when a pool is automatically created. The
 * prefix can be up to 20 characters long.
 * 
 * @member {string} [autoPoolSpecification.poolLifetimeOption] The minimum
 * lifetime of created auto pools, and how multiple jobs on a schedule are
 * assigned to pools. Possible values include: 'jobschedule', 'job',
 * 'unmapped'
 * 
 * @member {boolean} [autoPoolSpecification.keepAlive] Whether to keep an auto
 * pool alive after its lifetime expires.
 * 
 * @member {object} [autoPoolSpecification.pool] The pool specification for
 * the auto pool.
 * 
 * @member {string} [autoPoolSpecification.pool.displayName] The display name
 * for the pool.
 * 
 * @member {string} [autoPoolSpecification.pool.vmSize] The size of the
 * virtual machines in the pool. All virtual machines in a pool are the same
 * size.
 * 
 * @member {object} [autoPoolSpecification.pool.cloudServiceConfiguration] The
 * cloud service configuration for the pool. This property and
 * VirtualMachineConfiguration are mutually exclusive and one of the
 * properties must be specified.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.cloudServiceConfiguration.osFamily] The Azure
 * Guest OS family to be installed on the virtual machines in the pool.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.cloudServiceConfiguration.targetOSVersion] The
 * Azure Guest OS version to be installed on the virtual machines in the
 * pool. The default value is * which specifies the latest operating system
 * version for the specified OS family.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.cloudServiceConfiguration.currentOSVersion]
 * The Azure Guest OS Version currently installed on the virtual machines in
 * the pool. This may differ from TargetOSVersion if the pool state is
 * Upgrading.
 * 
 * @member {object} [autoPoolSpecification.pool.virtualMachineConfiguration]
 * The virtual machine configuration for the pool. This property and
 * CloudServiceConfiguration are mutually exclusive and one of the properties
 * must be specified.
 * 
 * @member {object}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference] A
 * reference to the Azure Virtual Machines Marketplace image to use.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.publisher]
 * The publisher of the Azure Virtual Machines Marketplace image. For
 * example, Canonical or MicrosoftWindowsServer.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.offer]
 * The offer type of the Azure Virtual Machines Marketplace image. For
 * example, UbuntuServer or WindowsServer.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.sku]
 * The SKU of the Azure Virtual Machines Marketplace image. For example,
 * 14.04.0-LTS or 2012-R2-Datacenter.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.imageReference.version]
 * The version of the Azure Virtual Machines Marketplace image. A value of
 * 'latest' can be specified to select the latest version of an image. If
 * omitted, the default is 'latest'.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.nodeAgentSKUId]
 * The SKU of Batch Node Agent to be provisioned on the compute node. The
 * Batch node agent is a program that runs on each node in the pool, and
 * provides the command-and-control interface between the node and the Batch
 * service. There are different implementations of the node agent, known as
 * SKUs, for different operating systems.
 * 
 * @member {object}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration]
 * Windows operating system settings on the virtual machine. This property
 * must not be specified if the ImageReference property specifies a Linux OS
 * image.
 * 
 * @member {boolean}
 * [autoPoolSpecification.pool.virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates]
 * Whether automatic updates are enabled on the virtual machine. If omitted,
 * the default value is true.
 * 
 * @member {number} [autoPoolSpecification.pool.maxTasksPerNode] The maximum
 * number of tasks that can run concurrently on a single compute node in the
 * pool.
 * 
 * @member {object} [autoPoolSpecification.pool.taskSchedulingPolicy] How
 * tasks are distributed among compute nodes in the pool.
 * 
 * @member {string}
 * [autoPoolSpecification.pool.taskSchedulingPolicy.nodeFillType] How tasks
 * should be distributed across compute nodes. Possible values include:
 * 'spread', 'pack', 'unmapped'
 * 
 * @member {moment.duration} [autoPoolSpecification.pool.resizeTimeout] The
 * timeout for allocation of compute nodes to the pool.
 * 
 * @member {number} [autoPoolSpecification.pool.targetDedicated] The desired
 * number of compute nodes in the pool.
 * 
 * @member {boolean} [autoPoolSpecification.pool.enableAutoScale] Whether the
 * pool size should automatically adjust over time.
 * 
 * @member {string} [autoPoolSpecification.pool.autoScaleFormula] The formula
 * for the desired number of compute nodes in the pool.
 * 
 * @member {moment.duration}
 * [autoPoolSpecification.pool.autoScaleEvaluationInterval] A time interval
 * for the desired AutoScale evaluation period in the pool.
 * 
 * @member {boolean} [autoPoolSpecification.pool.enableInterNodeCommunication]
 * Whether the pool permits direct communication between nodes.
 * 
 * @member {object} [autoPoolSpecification.pool.startTask] A task to run on
 * each compute node as it joins the pool. The task runs when the node is
 * added to the pool or when the node is restarted.
 * 
 * @member {string} [autoPoolSpecification.pool.startTask.commandLine] The
 * command line of the start task.
 * 
 * @member {array} [autoPoolSpecification.pool.startTask.resourceFiles] A list
 * of files that the Batch service will download to the compute node before
 * running the command line.
 * 
 * @member {array} [autoPoolSpecification.pool.startTask.environmentSettings]
 * A list of environment variable settings for the start task.
 * 
 * @member {boolean} [autoPoolSpecification.pool.startTask.runElevated]
 * Whether to run the start task in elevated mode. The default value is false.
 * 
 * @member {number} [autoPoolSpecification.pool.startTask.maxTaskRetryCount]
 * The maximum number of times the task may be retried.
 * 
 * @member {boolean} [autoPoolSpecification.pool.startTask.waitForSuccess]
 * Whether the Batch service should wait for the start task to complete
 * successfully (that is, to exit with exit code 0) before scheduling any
 * tasks on the compute node.
 * 
 * @member {array} [autoPoolSpecification.pool.certificateReferences] A list
 * of certificates to be installed on each compute node in the pool.
 * 
 * @member {array} [autoPoolSpecification.pool.applicationPackageReferences]
 * The list of application packages to be installed on each compute node in
 * the pool.
 * 
 * @member {array} [autoPoolSpecification.pool.metadata] A list of name-value
 * pairs associated with the pool as metadata.
 * 
 */
function PoolInformation() {
}

/**
 * Defines the metadata of PoolInformation
 *
 * @returns {object} metadata of PoolInformation
 *
 */
PoolInformation.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'PoolInformation',
    type: {
      name: 'Composite',
      className: 'PoolInformation',
      modelProperties: {
        poolId: {
          required: false,
          serializedName: 'poolId',
          type: {
            name: 'String'
          }
        },
        autoPoolSpecification: {
          required: false,
          serializedName: 'autoPoolSpecification',
          type: {
            name: 'Composite',
            className: 'AutoPoolSpecification'
          }
        }
      }
    }
  };
};

module.exports = PoolInformation;
