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

/**
 * Detailed information of a specific step run.
 *
 */
class StepOperationInfo {
  /**
   * Create a StepOperationInfo.
   * @member {string} [deploymentName] The name of the ARM deployment initiated
   * as part of the step.
   * @member {string} [correlationId] Unique identifier to track the request
   * for ARM-based resources.
   * @member {date} [startTime] Start time of the action in UTC.
   * @member {date} [endTime] End time of the action in UTC.
   * @member {date} [lastUpdatedTime] Last time in UTC this operation was
   * updated.
   * @member {object} [error] The errors, if any, for the action.
   * @member {string} [error.code] Error code string.
   * @member {string} [error.message] Descriptive error information.
   * @member {string} [error.target] Error target
   * @member {array} [error.details] More detailed error information.
   */
  constructor() {
  }

  /**
   * Defines the metadata of StepOperationInfo
   *
   * @returns {object} metadata of StepOperationInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'StepOperationInfo',
      type: {
        name: 'Composite',
        className: 'StepOperationInfo',
        modelProperties: {
          deploymentName: {
            required: false,
            readOnly: true,
            serializedName: 'deploymentName',
            type: {
              name: 'String'
            }
          },
          correlationId: {
            required: false,
            readOnly: true,
            serializedName: 'correlationId',
            type: {
              name: 'String'
            }
          },
          startTime: {
            required: false,
            readOnly: true,
            serializedName: 'startTime',
            type: {
              name: 'DateTime'
            }
          },
          endTime: {
            required: false,
            readOnly: true,
            serializedName: 'endTime',
            type: {
              name: 'DateTime'
            }
          },
          lastUpdatedTime: {
            required: false,
            readOnly: true,
            serializedName: 'lastUpdatedTime',
            type: {
              name: 'DateTime'
            }
          },
          error: {
            required: false,
            serializedName: 'error',
            type: {
              name: 'Composite',
              className: 'CloudErrorBody'
            }
          }
        }
      }
    };
  }
}

module.exports = StepOperationInfo;
