/*
 * 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 MultiInstanceSettings class.
 * @constructor
 * Settings which specify how to run a multi-instance task. Multi-instance
 * tasks are commonly used to support MPI tasks.
 * @member {number} numberOfInstances The number of compute nodes required by
 * the multi-instance task.
 * 
 * @member {string} [coordinationCommandLine] The command to run on the
 * compute node instances for coordinating among the subtasks.
 * 
 * @member {array} [commonResourceFiles] A list of files that the Batch
 * service will download before running the coordination command line. The
 * difference between common resource files and task resource files is that
 * common resource files are downloaded for all subtasks including the
 * primary, whereas task resource files are downloaded only for the primary.
 * 
 */
function MultiInstanceSettings() {
}

/**
 * Defines the metadata of MultiInstanceSettings
 *
 * @returns {object} metadata of MultiInstanceSettings
 *
 */
MultiInstanceSettings.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'MultiInstanceSettings',
    type: {
      name: 'Composite',
      className: 'MultiInstanceSettings',
      modelProperties: {
        numberOfInstances: {
          required: true,
          serializedName: 'numberOfInstances',
          type: {
            name: 'Number'
          }
        },
        coordinationCommandLine: {
          required: false,
          serializedName: 'coordinationCommandLine',
          type: {
            name: 'String'
          }
        },
        commonResourceFiles: {
          required: false,
          serializedName: 'commonResourceFiles',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'ResourceFileElementType',
                type: {
                  name: 'Composite',
                  className: 'ResourceFile'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = MultiInstanceSettings;
