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

/**
 * Represents information about an operation in a terminal state (Completed or
 * Faulted).
 *
 */
class InvokeDataLossResult {
  /**
   * Create a InvokeDataLossResult.
   * @property {number} [errorCode] If OperationState is Completed, this is 0.
   * If OperationState is Faulted, this is an error code indicating the reason.
   * @property {object} [selectedPartition] This class returns information
   * about the partition that the user-induced operation acted upon.
   * @property {string} [selectedPartition.serviceName] The name of the service
   * the partition belongs to.
   * @property {uuid} [selectedPartition.partitionId] An internal ID used by
   * Service Fabric to uniquely identify a partition. This is a randomly
   * generated GUID when the service was created. The partition ID is unique
   * and does not change for the lifetime of the service. If the same service
   * was deleted and recreated the IDs of its partitions would be different.
   */
  constructor() {
  }

  /**
   * Defines the metadata of InvokeDataLossResult
   *
   * @returns {object} metadata of InvokeDataLossResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'InvokeDataLossResult',
      type: {
        name: 'Composite',
        className: 'InvokeDataLossResult',
        modelProperties: {
          errorCode: {
            required: false,
            serializedName: 'ErrorCode',
            type: {
              name: 'Number'
            }
          },
          selectedPartition: {
            required: false,
            serializedName: 'SelectedPartition',
            type: {
              name: 'Composite',
              className: 'SelectedPartition'
            }
          }
        }
      }
    };
  }
}

module.exports = InvokeDataLossResult;
