/*
 * 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 Deployment configuration properties.
  *
 */
class DeploymentConfiguration {
  /**
   * Create a DeploymentConfiguration.
   * @property {object} [cloudServiceConfiguration] The cloud service
   * configuration for the pool. This property and virtualMachineConfiguration
   * are mutually exclusive and one of the properties must be specified. This
   * property cannot be specified if the Batch account was created with its
   * poolAllocationMode property set to 'UserSubscription'.
   * @property {string} [cloudServiceConfiguration.osFamily] Possible values
   * are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS
   * Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent
   * to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server
   * 2016. 6 - OS Family 6, equivalent to Windows Server 2019. For more
   * information, see Azure Guest OS Releases
   * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).
   * @property {string} [cloudServiceConfiguration.osVersion] The default value
   * is * which specifies the latest operating system version for the specified
   * OS family.
   * @property {object} [virtualMachineConfiguration] The virtual machine
   * configuration for the pool. This property and cloudServiceConfiguration
   * are mutually exclusive and one of the properties must be specified.
   * @property {object} [virtualMachineConfiguration.imageReference]
   * @property {string} [virtualMachineConfiguration.imageReference.publisher]
   * For example, Canonical or MicrosoftWindowsServer.
   * @property {string} [virtualMachineConfiguration.imageReference.offer] For
   * example, UbuntuServer or WindowsServer.
   * @property {string} [virtualMachineConfiguration.imageReference.sku] For
   * example, 18.04-LTS or 2019-Datacenter.
   * @property {string} [virtualMachineConfiguration.imageReference.version] A
   * value of 'latest' can be specified to select the latest version of an
   * image. If omitted, the default is 'latest'.
   * @property {string} [virtualMachineConfiguration.imageReference.id] This
   * property is mutually exclusive with other properties. The Shared Image
   * Gallery image must have replicas in the same region as the Azure Batch
   * account. For information about the firewall settings for the Batch node
   * agent to communicate with the Batch service see
   * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
   * @property {string} [virtualMachineConfiguration.nodeAgentSkuId] 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. You must specify a node agent SKU which
   * matches the selected image reference. To get the list of supported node
   * agent SKUs along with their list of verified image references, see the
   * 'List supported node agent SKUs' operation.
   * @property {object} [virtualMachineConfiguration.windowsConfiguration] This
   * property must not be specified if the imageReference specifies a Linux OS
   * image.
   * @property {boolean}
   * [virtualMachineConfiguration.windowsConfiguration.enableAutomaticUpdates]
   * If omitted, the default value is true.
   * @property {array} [virtualMachineConfiguration.dataDisks] This property
   * must be specified if the compute nodes in the pool need to have empty data
   * disks attached to them.
   * @property {string} [virtualMachineConfiguration.licenseType] This only
   * applies to images that contain the Windows operating system, and should
   * only be used when you hold valid on-premises licenses for the nodes which
   * will be deployed. If omitted, no on-premises licensing discount is
   * applied. Values are:
   *
   * Windows_Server - The on-premises license is for Windows Server.
   * Windows_Client - The on-premises license is for Windows Client.
   * @property {object} [virtualMachineConfiguration.containerConfiguration] If
   * specified, setup is performed on each node in the pool to allow tasks to
   * run in containers. All regular tasks and job manager tasks run on this
   * pool must specify the containerSettings property, and all other tasks may
   * specify it.
   * @property {array}
   * [virtualMachineConfiguration.containerConfiguration.containerImageNames]
   * This is the full image reference, as would be specified to "docker pull".
   * An image will be sourced from the default Docker registry unless the image
   * is fully qualified with an alternative registry.
   * @property {array}
   * [virtualMachineConfiguration.containerConfiguration.containerRegistries]
   * If any images must be downloaded from a private registry which requires
   * credentials, then those credentials must be provided here.
   * @property {object}
   * [virtualMachineConfiguration.diskEncryptionConfiguration] If specified,
   * encryption is performed on each node in the pool during node provisioning.
   * @property {array}
   * [virtualMachineConfiguration.diskEncryptionConfiguration.targets] On Linux
   * pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and
   * "TemporaryDisk" must be specified.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DeploymentConfiguration
   *
   * @returns {object} metadata of DeploymentConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DeploymentConfiguration',
      type: {
        name: 'Composite',
        className: 'DeploymentConfiguration',
        modelProperties: {
          cloudServiceConfiguration: {
            required: false,
            serializedName: 'cloudServiceConfiguration',
            type: {
              name: 'Composite',
              className: 'CloudServiceConfiguration'
            }
          },
          virtualMachineConfiguration: {
            required: false,
            serializedName: 'virtualMachineConfiguration',
            type: {
              name: 'Composite',
              className: 'VirtualMachineConfiguration'
            }
          }
        }
      }
    };
  }
}

module.exports = DeploymentConfiguration;
