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

/**
 * The OS image reference.
 *
 */
class ImageReference {
  /**
   * Create a ImageReference.
   * @member {string} publisher Publisher. Publisher of the image.
   * @member {string} offer Offer. Offer of the image.
   * @member {string} sku SKU. SKU of the image.
   * @member {string} [version] Version. Version of the image.
   * @member {string} [virtualMachineImageId] Custom VM image resource ID. The
   * ARM resource identifier of the virtual machine image for the compute
   * nodes. This is of the form
   * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}.
   * The virtual machine image must be in the same region and subscription as
   * the cluster. 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.
   * Note, you need to provide publisher, offer and sku of the base OS image of
   * which the custom image has been derived from.
   */
  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: true,
            serializedName: 'publisher',
            type: {
              name: 'String'
            }
          },
          offer: {
            required: true,
            serializedName: 'offer',
            type: {
              name: 'String'
            }
          },
          sku: {
            required: true,
            serializedName: 'sku',
            type: {
              name: 'String'
            }
          },
          version: {
            required: false,
            serializedName: 'version',
            type: {
              name: 'String'
            }
          },
          virtualMachineImageId: {
            required: false,
            serializedName: 'virtualMachineImageId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ImageReference;
