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

const models = require('./index');

/**
 * Data Lake Analytics Job Parameters base class for build and submit.
 *
 */
class BaseJobParameters {
  /**
   * Create a BaseJobParameters.
   * @member {string} type the job type of the current job (Hive or USql).
   * Possible values include: 'USql', 'Hive'
   * @member {object} properties the job specific properties.
   * @member {string} [properties.runtimeVersion] the runtime version of the
   * Data Lake Analytics engine to use for the specific type of job being run.
   * @member {string} [properties.script] the script to run. Please note that
   * the maximum script size is 3 MB.
   * @member {string} [properties.type] Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of BaseJobParameters
   *
   * @returns {object} metadata of BaseJobParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BaseJobParameters',
      type: {
        name: 'Composite',
        className: 'BaseJobParameters',
        modelProperties: {
          type: {
            required: true,
            serializedName: 'type',
            type: {
              name: 'Enum',
              allowedValues: [ 'USql', 'Hive' ]
            }
          },
          properties: {
            required: true,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'CreateJobProperties',
              className: 'CreateJobProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = BaseJobParameters;
