/*
 * 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 output configuration of a job step.
 *
 */
class JobStepOutput {
  /**
   * Create a JobStepOutput.
   * @property {string} [type] The output destination type. Possible values
   * include: 'SqlDatabase'. Default value: 'SqlDatabase' .
   * @property {uuid} [subscriptionId] The output destination subscription id.
   * @property {string} [resourceGroupName] The output destination resource
   * group.
   * @property {string} serverName The output destination server name.
   * @property {string} databaseName The output destination database.
   * @property {string} [schemaName] The output destination schema. Default
   * value: 'dbo' .
   * @property {string} tableName The output destination table.
   * @property {string} credential The resource ID of the credential to use to
   * connect to the output destination.
   */
  constructor() {
  }

  /**
   * Defines the metadata of JobStepOutput
   *
   * @returns {object} metadata of JobStepOutput
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'JobStepOutput',
      type: {
        name: 'Composite',
        className: 'JobStepOutput',
        modelProperties: {
          type: {
            required: false,
            serializedName: 'type',
            defaultValue: 'SqlDatabase',
            type: {
              name: 'String'
            }
          },
          subscriptionId: {
            required: false,
            serializedName: 'subscriptionId',
            type: {
              name: 'String'
            }
          },
          resourceGroupName: {
            required: false,
            serializedName: 'resourceGroupName',
            type: {
              name: 'String'
            }
          },
          serverName: {
            required: true,
            serializedName: 'serverName',
            type: {
              name: 'String'
            }
          },
          databaseName: {
            required: true,
            serializedName: 'databaseName',
            type: {
              name: 'String'
            }
          },
          schemaName: {
            required: false,
            serializedName: 'schemaName',
            defaultValue: 'dbo',
            type: {
              name: 'String'
            }
          },
          tableName: {
            required: true,
            serializedName: 'tableName',
            type: {
              name: 'String'
            }
          },
          credential: {
            required: true,
            serializedName: 'credential',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = JobStepOutput;
