/*
 * 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 A reference to an Azure Virtual Machines Marketplace image or the
 * Azure Image resource of a custom Virtual Machine. To get the list of all
 * imageReferences verified by Azure Batch, see the 'List supported node agent
 * SKUs' operation.
  *
 */
class ImageReference {
  /**
   * Create a ImageReference.
   * @property {string} [publisher] The publisher of the Azure Virtual Machines
   * Marketplace image. For example, Canonical or MicrosoftWindowsServer.
   * @property {string} [offer] The offer type of the Azure Virtual Machines
   * Marketplace image. For example, UbuntuServer or WindowsServer.
   * @property {string} [sku] The SKU of the Azure Virtual Machines Marketplace
   * image. For example, 18.04-LTS or 2019-Datacenter.
   * @property {string} [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'.
   * @property {string} [id] The ARM resource identifier of the Shared Image
   * Gallery Image. Compute Nodes in the Pool will be created using this Image
   * Id. This is of the form
   * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId}.
   * 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.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ImageReference
   *
   * @returns {object} metadata of ImageReference
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ImageReference',
      type: {
        name: 'Composite',
        className: 'ImageReference',
        modelProperties: {
          publisher: {
            required: false,
            serializedName: 'publisher',
            type: {
              name: 'String'
            }
          },
          offer: {
            required: false,
            serializedName: 'offer',
            type: {
              name: 'String'
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'String'
            }
          },
          version: {
            required: false,
            serializedName: 'version',
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ImageReference;
