/*
 * 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 run operation result properties.
 *
 */
class OperationResultProperties {
  /**
   * Create a OperationResultProperties.
   * @property {date} [startTime] The start time of the workflow scope
   * repetition.
   * @property {date} [endTime] The end time of the workflow scope repetition.
   * @property {object} [correlation] The correlation properties.
   * @property {string} [correlation.actionTrackingId] The action tracking
   * identifier.
   * @property {string} [status] The status of the workflow scope repetition.
   * Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting',
   * 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted',
   * 'TimedOut', 'Aborted', 'Ignored'
   * @property {string} [code] The workflow scope repetition code.
   * @property {object} [error]
   */
  constructor() {
  }

  /**
   * Defines the metadata of OperationResultProperties
   *
   * @returns {object} metadata of OperationResultProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OperationResultProperties',
      type: {
        name: 'Composite',
        className: 'OperationResultProperties',
        modelProperties: {
          startTime: {
            required: false,
            serializedName: 'startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            serializedName: 'endTime',
            type: {
              name: 'DateTime'
            }
          },
          correlation: {
            required: false,
            serializedName: 'correlation',
            type: {
              name: 'Composite',
              className: 'RunActionCorrelation'
            }
          },
          status: {
            required: false,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          code: {
            required: false,
            serializedName: 'code',
            type: {
              name: 'String'
            }
          },
          error: {
            required: false,
            serializedName: 'error',
            type: {
              name: 'Object'
            }
          }
        }
      }
    };
  }
}

module.exports = OperationResultProperties;
