/*
 * 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 failover set on a device.
 *
 */
class FailoverSet {
  /**
   * Create a FailoverSet.
   * @member {array} [volumeContainers] The list of meta data of volume
   * containers, which are part of the failover set.
   * @member {object} [eligibilityResult] The eligibility result of the
   * failover set, for failover.
   * @member {boolean} [eligibilityResult.isEligibleForFailover] Represents if
   * this failover set is eligible for failover or not.
   * @member {string} [eligibilityResult.errorMessage] The error message, if
   * the failover set is not eligible for failover.
   */
  constructor() {
  }

  /**
   * Defines the metadata of FailoverSet
   *
   * @returns {object} metadata of FailoverSet
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FailoverSet',
      type: {
        name: 'Composite',
        className: 'FailoverSet',
        modelProperties: {
          volumeContainers: {
            required: false,
            serializedName: 'volumeContainers',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'VolumeContainerFailoverMetadataElementType',
                  type: {
                    name: 'Composite',
                    className: 'VolumeContainerFailoverMetadata'
                  }
              }
            }
          },
          eligibilityResult: {
            required: false,
            serializedName: 'eligibilityResult',
            type: {
              name: 'Composite',
              className: 'FailoverSetEligibilityResult'
            }
          }
        }
      }
    };
  }
}

module.exports = FailoverSet;
