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

const models = require('./index');

/**
 * The eligibility result of device, as a failover target device.
 *
 */
class TargetEligibilityResult {
  /**
   * Create a TargetEligibilityResult.
   * @member {string} [eligibilityStatus] The eligibility status of device, as
   * a failover target device. Possible values include: 'NotEligible',
   * 'Eligible'
   * @member {array} [messages] The list of error messages, if a device does
   * not qualify as a failover target device.
   */
  constructor() {
  }

  /**
   * Defines the metadata of TargetEligibilityResult
   *
   * @returns {object} metadata of TargetEligibilityResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TargetEligibilityResult',
      type: {
        name: 'Composite',
        className: 'TargetEligibilityResult',
        modelProperties: {
          eligibilityStatus: {
            required: false,
            serializedName: 'eligibilityStatus',
            type: {
              name: 'Enum',
              allowedValues: [ 'NotEligible', 'Eligible' ]
            }
          },
          messages: {
            required: false,
            serializedName: 'messages',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TargetEligibilityErrorMessageElementType',
                  type: {
                    name: 'Composite',
                    className: 'TargetEligibilityErrorMessage'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = TargetEligibilityResult;
