/*
 * 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 details about the specific stage of a job.
 *
 */
class JobStage {
  /**
   * Create a JobStage.
   * @member {string} [message] The message of the job stage.
   * @member {string} stageStatus The stage status. Possible values include:
   * 'Running', 'Succeeded', 'Failed', 'Canceled'
   * @member {string} [detail] The details of the stage.
   * @member {string} [errorCode] The error code of the stage if any.
   */
  constructor() {
  }

  /**
   * Defines the metadata of JobStage
   *
   * @returns {object} metadata of JobStage
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'JobStage',
      type: {
        name: 'Composite',
        className: 'JobStage',
        modelProperties: {
          message: {
            required: false,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          stageStatus: {
            required: true,
            serializedName: 'stageStatus',
            type: {
              name: 'Enum',
              allowedValues: [ 'Running', 'Succeeded', 'Failed', 'Canceled' ]
            }
          },
          detail: {
            required: false,
            serializedName: 'detail',
            type: {
              name: 'String'
            }
          },
          errorCode: {
            required: false,
            serializedName: 'errorCode',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = JobStage;
