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

/**
 * Contains the OperationId, OperationState, and OperationType for user-induced
 * operations.
 *
 */
class OperationStatus {
  /**
   * Create a OperationStatus.
   * @property {uuid} [operationId] A GUID that identifies a call to this API.
   * This is also passed into the corresponding GetProgress API.
   * @property {string} [state] The state of the operation. Possible values
   * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted',
   * 'Cancelled', 'ForceCancelled'
   * @property {string} [type] The type of the operation. Possible values
   * include: 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss',
   * 'PartitionRestart', 'NodeTransition'
   */
  constructor() {
  }

  /**
   * Defines the metadata of OperationStatus
   *
   * @returns {object} metadata of OperationStatus
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OperationStatus',
      type: {
        name: 'Composite',
        className: 'OperationStatus',
        modelProperties: {
          operationId: {
            required: false,
            serializedName: 'OperationId',
            type: {
              name: 'String'
            }
          },
          state: {
            required: false,
            serializedName: 'State',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'Type',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = OperationStatus;
