/*
 * 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 status of operation.
 *
 */
class OperationStatus {
  /**
   * Create a OperationStatus.
   * @member {string} [id] The operation Id.
   * @member {string} [name] The operation name.
   * @member {string} [startTime] The start time of the operation.
   * @member {string} [endTime] The end time of the operation.
   * @member {string} [status] The status of the operation.
   * @member {object} [error] The error detail of the operation if any.
   * @member {string} [error.code] Error code
   * @member {string} [error.message] Error message indicating why the
   * operation failed.
   */
  constructor() {
  }

  /**
   * Defines the metadata of OperationStatus
   *
   * @returns {object} metadata of OperationStatus
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OperationStatus',
      type: {
        name: 'Composite',
        className: 'OperationStatus',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          startTime: {
            required: false,
            serializedName: 'startTime',
            type: {
              name: 'String'
            }
          },
          endTime: {
            required: false,
            serializedName: 'endTime',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          error: {
            required: false,
            serializedName: 'error',
            type: {
              name: 'Composite',
              className: 'ErrorResponse'
            }
          }
        }
      }
    };
  }
}

module.exports = OperationStatus;
