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

var util = require('util');

/**
 * @class
 * Initializes a new instance of the PoolPatchParameter class.
 * @constructor
 * Parameters for a CloudPoolOperations.Patch request.
 * @member {object} [startTask] A task to run on each compute node as it joins
 * the pool. If omitted, any existing start task is left unchanged.
 * 
 * @member {string} [startTask.commandLine] The command line of the start task.
 * 
 * @member {array} [startTask.resourceFiles] A list of files that the Batch
 * service will download to the compute node before running the command line.
 * 
 * @member {array} [startTask.environmentSettings] A list of environment
 * variable settings for the start task.
 * 
 * @member {boolean} [startTask.runElevated] Whether to run the start task in
 * elevated mode. The default value is false.
 * 
 * @member {number} [startTask.maxTaskRetryCount] The maximum number of times
 * the task may be retried.
 * 
 * @member {boolean} [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} [certificateReferences] A list of certificates to be
 * installed on each compute node in the pool. If omitted, any existing
 * certificate references are left unchanged.
 * 
 * @member {array} [applicationPackageReferences] A list of application
 * packages to be installed on each compute node in the pool. If omitted, any
 * existing application package references are left unchanged.
 * 
 * @member {array} [metadata] A list of name-value pairs associated with the
 * pool as metadata. If omitted, any existing metadata is left unchanged.
 * 
 */
function PoolPatchParameter() {
}

/**
 * Defines the metadata of PoolPatchParameter
 *
 * @returns {object} metadata of PoolPatchParameter
 *
 */
PoolPatchParameter.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'PoolPatchParameter',
    type: {
      name: 'Composite',
      className: 'PoolPatchParameter',
      modelProperties: {
        startTask: {
          required: false,
          serializedName: 'startTask',
          type: {
            name: 'Composite',
            className: 'StartTask'
          }
        },
        certificateReferences: {
          required: false,
          serializedName: 'certificateReferences',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'CertificateReferenceElementType',
                type: {
                  name: 'Composite',
                  className: 'CertificateReference'
                }
            }
          }
        },
        applicationPackageReferences: {
          required: false,
          serializedName: 'applicationPackageReferences',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'ApplicationPackageReferenceElementType',
                type: {
                  name: 'Composite',
                  className: 'ApplicationPackageReference'
                }
            }
          }
        },
        metadata: {
          required: false,
          serializedName: 'metadata',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'MetadataItemElementType',
                type: {
                  name: 'Composite',
                  className: 'MetadataItem'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = PoolPatchParameter;
