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

/**
 * @summary The container settings for a task.
  *
 */
class TaskContainerSettings {
  /**
   * Create a TaskContainerSettings.
   * @property {string} [containerRunOptions] Additional options to the
   * container create command. These additional options are supplied as
   * arguments to the "docker create" command, in addition to those controlled
   * by the Batch Service.
   * @property {string} imageName The image to use to create the container in
   * which the task will run. This is the full image reference, as would be
   * specified to "docker pull". If no tag is provided as part of the image
   * name, the tag ":latest" is used as a default.
   * @property {object} [registry] The private registry which contains the
   * container image. This setting can be omitted if was already provided at
   * pool creation.
   * @property {string} [registry.registryServer] If omitted, the default is
   * "docker.io".
   * @property {string} [registry.userName]
   * @property {string} [registry.password]
   * @property {string} [workingDirectory] A flag to indicate where the
   * container task working directory is. The default is
   * 'taskWorkingDirectory'. Possible values include: 'TaskWorkingDirectory',
   * 'ContainerImageDefault'
   */
  constructor() {
  }

  /**
   * Defines the metadata of TaskContainerSettings
   *
   * @returns {object} metadata of TaskContainerSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TaskContainerSettings',
      type: {
        name: 'Composite',
        className: 'TaskContainerSettings',
        modelProperties: {
          containerRunOptions: {
            required: false,
            serializedName: 'containerRunOptions',
            type: {
              name: 'String'
            }
          },
          imageName: {
            required: true,
            serializedName: 'imageName',
            type: {
              name: 'String'
            }
          },
          registry: {
            required: false,
            serializedName: 'registry',
            type: {
              name: 'Composite',
              className: 'ContainerRegistry'
            }
          },
          workingDirectory: {
            required: false,
            serializedName: 'workingDirectory',
            type: {
              name: 'Enum',
              allowedValues: [ 'TaskWorkingDirectory', 'ContainerImageDefault' ]
            }
          }
        }
      }
    };
  }
}

module.exports = TaskContainerSettings;
