/*
 * 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 error/warning message due to which the device is ineligible as a
 * failover target device.
 *
 */
class TargetEligibilityErrorMessage {
  /**
   * Create a TargetEligibilityErrorMessage.
   * @member {string} [message] The localized error message stating the reason
   * why the device is not eligible as a target device.
   * @member {string} [resolution] The localized resolution message for the
   * error.
   * @member {string} [resultCode] The result code for the error, due to which
   * the device does not qualify as a failover target device. Possible values
   * include: 'TargetAndSourceCannotBeSameError', 'TargetIsNotOnlineError',
   * 'TargetSourceIncompatibleVersionError',
   * 'LocalToTieredVolumesConversionWarning',
   * 'TargetInsufficientCapacityError',
   * 'TargetInsufficientLocalVolumeMemoryError',
   * 'TargetInsufficientTieredVolumeMemoryError'
   */
  constructor() {
  }

  /**
   * Defines the metadata of TargetEligibilityErrorMessage
   *
   * @returns {object} metadata of TargetEligibilityErrorMessage
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TargetEligibilityErrorMessage',
      type: {
        name: 'Composite',
        className: 'TargetEligibilityErrorMessage',
        modelProperties: {
          message: {
            required: false,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          resolution: {
            required: false,
            serializedName: 'resolution',
            type: {
              name: 'String'
            }
          },
          resultCode: {
            required: false,
            serializedName: 'resultCode',
            type: {
              name: 'Enum',
              allowedValues: [ 'TargetAndSourceCannotBeSameError', 'TargetIsNotOnlineError', 'TargetSourceIncompatibleVersionError', 'LocalToTieredVolumesConversionWarning', 'TargetInsufficientCapacityError', 'TargetInsufficientLocalVolumeMemoryError', 'TargetInsufficientTieredVolumeMemoryError' ]
            }
          }
        }
      }
    };
  }
}

module.exports = TargetEligibilityErrorMessage;
