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

/**
 * Describes the expected impact of a repair on a set of nodes.
 *
 * This type supports the Service Fabric platform; it is not meant to be used
 * directly from your code.
 *
 * @extends models['RepairImpactDescriptionBase']
 */
class NodeRepairImpactDescription extends models['RepairImpactDescriptionBase'] {
  /**
   * Create a NodeRepairImpactDescription.
   * @property {array} [nodeImpactList] The list of nodes impacted by a repair
   * action and their respective expected impact.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of NodeRepairImpactDescription
   *
   * @returns {object} metadata of NodeRepairImpactDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Node',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'Kind',
          clientName: 'kind'
        },
        uberParent: 'RepairImpactDescriptionBase',
        className: 'NodeRepairImpactDescription',
        modelProperties: {
          kind: {
            required: true,
            serializedName: 'Kind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          nodeImpactList: {
            required: false,
            serializedName: 'NodeImpactList',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NodeImpactElementType',
                  type: {
                    name: 'Composite',
                    className: 'NodeImpact'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = NodeRepairImpactDescription;
