/*
 * 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 health statistics of an entity, returned as part of the health query
 * result when the query description is configured to include statistics.
 * The statistics include health state counts for all children types of the
 * current entity.
 * For example, for cluster, the health statistics include health state counts
 * for nodes, applications, services, partitions, replicas, deployed
 * applications and deployed service packages.
 * For partition, the health statistics include health counts for replicas.
 *
 */
class HealthStatistics {
  /**
   * Create a HealthStatistics.
   * @property {array} [healthStateCountList] List of health state counts per
   * entity kind, which keeps track of how many children of the queried entity
   * are in Ok, Warning and Error state.
   */
  constructor() {
  }

  /**
   * Defines the metadata of HealthStatistics
   *
   * @returns {object} metadata of HealthStatistics
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HealthStatistics',
      type: {
        name: 'Composite',
        className: 'HealthStatistics',
        modelProperties: {
          healthStateCountList: {
            required: false,
            serializedName: 'HealthStateCountList',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'EntityKindHealthStateCountElementType',
                  type: {
                    name: 'Composite',
                    className: 'EntityKindHealthStateCount'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = HealthStatistics;
