/*
 * 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 U-SQL activity.
 *
 * @extends models['ExecutionActivity']
 */
class DataLakeAnalyticsUSQLActivity extends models['ExecutionActivity'] {
  /**
   * Create a DataLakeAnalyticsUSQLActivity.
   * @member {object} scriptPath Case-sensitive path to folder that contains
   * the U-SQL script. Type: string (or Expression with resultType string).
   * @member {object} scriptLinkedService Script linked service reference.
   * @member {string} [scriptLinkedService.referenceName] Reference
   * LinkedService name.
   * @member {object} [scriptLinkedService.parameters] Arguments for
   * LinkedService.
   * @member {object} [degreeOfParallelism] The maximum number of nodes
   * simultaneously used to run the job. Default value is 1. Type: integer (or
   * Expression with resultType integer), minimum: 1.
   * @member {object} [priority] Determines which jobs out of all that are
   * queued should be selected to run first. The lower the number, the higher
   * the priority. Default value is 1000. Type: integer (or Expression with
   * resultType integer), minimum: 1.
   * @member {object} [parameters] Parameters for U-SQL job request.
   * @member {object} [runtimeVersion] Runtime version of the U-SQL engine to
   * use. Type: string (or Expression with resultType string).
   * @member {object} [compilationMode] Compilation mode of U-SQL. Must be one
   * of these values : Semantic, Full and SingleBox. Type: string (or
   * Expression with resultType string).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DataLakeAnalyticsUSQLActivity
   *
   * @returns {object} metadata of DataLakeAnalyticsUSQLActivity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataLakeAnalyticsU-SQL',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'Activity',
        className: 'DataLakeAnalyticsUSQLActivity',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          dependsOn: {
            required: false,
            serializedName: 'dependsOn',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ActivityDependencyElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'ActivityDependency'
                  }
              }
            }
          },
          userProperties: {
            required: false,
            serializedName: 'userProperties',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'UserPropertyElementType',
                  type: {
                    name: 'Composite',
                    className: 'UserProperty'
                  }
              }
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          linkedServiceName: {
            required: false,
            serializedName: 'linkedServiceName',
            type: {
              name: 'Composite',
              className: 'LinkedServiceReference'
            }
          },
          policy: {
            required: false,
            serializedName: 'policy',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'ActivityPolicy'
            }
          },
          scriptPath: {
            required: true,
            serializedName: 'typeProperties.scriptPath',
            type: {
              name: 'Object'
            }
          },
          scriptLinkedService: {
            required: true,
            serializedName: 'typeProperties.scriptLinkedService',
            defaultValue: {},
            type: {
              name: 'Composite',
              className: 'LinkedServiceReference'
            }
          },
          degreeOfParallelism: {
            required: false,
            serializedName: 'typeProperties.degreeOfParallelism',
            type: {
              name: 'Object'
            }
          },
          priority: {
            required: false,
            serializedName: 'typeProperties.priority',
            type: {
              name: 'Object'
            }
          },
          parameters: {
            required: false,
            serializedName: 'typeProperties.parameters',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ObjectElementType',
                  type: {
                    name: 'Object'
                  }
              }
            }
          },
          runtimeVersion: {
            required: false,
            serializedName: 'typeProperties.runtimeVersion',
            type: {
              name: 'Object'
            }
          },
          compilationMode: {
            required: false,
            serializedName: 'typeProperties.compilationMode',
            type: {
              name: 'Object'
            }
          }
        }
      }
    };
  }
}

module.exports = DataLakeAnalyticsUSQLActivity;
