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

/**
 * Represents the eligibility of a device as a failover target device.
 *
 */
class FailoverTarget {
  /**
   * Create a FailoverTarget.
   * @member {string} [deviceId] The path ID of the device.
   * @member {string} [deviceStatus] The status of the device. Possible values
   * include: 'Unknown', 'Online', 'Offline', 'Deactivated',
   * 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning',
   * 'Deactivating', 'Deleted', 'ReadyToSetup'
   * @member {string} [modelDescription] The model number of the device.
   * @member {string} [deviceSoftwareVersion] The software version of the
   * device.
   * @member {number} [dataContainersCount] The count of datacontainers on the
   * device.
   * @member {number} [volumesCount] The count of volumes on the device.
   * @member {number} [availableLocalStorageInBytes] The amount of free local
   * storage available on the device in bytes.
   * @member {number} [availableTieredStorageInBytes] The amount of free tiered
   * storage available for the device in bytes.
   * @member {string} [deviceLocation] The geo location (applicable only for
   * cloud appliances) of the device.
   * @member {string} [friendlyDeviceSoftwareVersion] The friendly name for the
   * current version of software on the device.
   * @member {object} [eligibilityResult] The eligibility result of the device,
   * as a failover target device.
   * @member {string} [eligibilityResult.eligibilityStatus] The eligibility
   * status of device, as a failover target device. Possible values include:
   * 'NotEligible', 'Eligible'
   * @member {array} [eligibilityResult.messages] The list of error messages,
   * if a device does not qualify as a failover target device.
   */
  constructor() {
  }

  /**
   * Defines the metadata of FailoverTarget
   *
   * @returns {object} metadata of FailoverTarget
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FailoverTarget',
      type: {
        name: 'Composite',
        className: 'FailoverTarget',
        modelProperties: {
          deviceId: {
            required: false,
            serializedName: 'deviceId',
            type: {
              name: 'String'
            }
          },
          deviceStatus: {
            required: false,
            serializedName: 'deviceStatus',
            type: {
              name: 'Enum',
              allowedValues: [ 'Unknown', 'Online', 'Offline', 'Deactivated', 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning', 'Deactivating', 'Deleted', 'ReadyToSetup' ]
            }
          },
          modelDescription: {
            required: false,
            serializedName: 'modelDescription',
            type: {
              name: 'String'
            }
          },
          deviceSoftwareVersion: {
            required: false,
            serializedName: 'deviceSoftwareVersion',
            type: {
              name: 'String'
            }
          },
          dataContainersCount: {
            required: false,
            serializedName: 'dataContainersCount',
            type: {
              name: 'Number'
            }
          },
          volumesCount: {
            required: false,
            serializedName: 'volumesCount',
            type: {
              name: 'Number'
            }
          },
          availableLocalStorageInBytes: {
            required: false,
            serializedName: 'availableLocalStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          availableTieredStorageInBytes: {
            required: false,
            serializedName: 'availableTieredStorageInBytes',
            type: {
              name: 'Number'
            }
          },
          deviceLocation: {
            required: false,
            serializedName: 'deviceLocation',
            type: {
              name: 'String'
            }
          },
          friendlyDeviceSoftwareVersion: {
            required: false,
            serializedName: 'friendlyDeviceSoftwareVersion',
            type: {
              name: 'String'
            }
          },
          eligibilityResult: {
            required: false,
            serializedName: 'eligibilityResult',
            type: {
              name: 'Composite',
              className: 'TargetEligibilityResult'
            }
          }
        }
      }
    };
  }
}

module.exports = FailoverTarget;
