/*
 * 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 health state chunk of a application.
 * The application health state chunk contains the application name, its
 * aggregated health state and any children services and deployed applications
 * that respect the filters in cluster health chunk query description.
 *
 * @extends models['EntityHealthStateChunk']
 */
class ApplicationHealthStateChunk extends models['EntityHealthStateChunk'] {
  /**
   * Create a ApplicationHealthStateChunk.
   * @property {string} [applicationName] The name of the application,
   * including the 'fabric:' URI scheme.
   * @property {string} [applicationTypeName] The application type name as
   * defined in the application manifest.
   * @property {object} [serviceHealthStateChunks] The list of service health
   * state chunks in the cluster that respect the filters in the cluster health
   * chunk query description.
   * @property {array} [serviceHealthStateChunks.items] The list of service
   * health state chunks that respect the input filters in the chunk query.
   * @property {object} [deployedApplicationHealthStateChunks] The list of
   * deployed application health state chunks in the cluster that respect the
   * filters in the cluster health chunk query description.
   * @property {array} [deployedApplicationHealthStateChunks.items] The list of
   * deployed application health state chunks that respect the input filters in
   * the chunk query.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ApplicationHealthStateChunk
   *
   * @returns {object} metadata of ApplicationHealthStateChunk
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationHealthStateChunk',
      type: {
        name: 'Composite',
        className: 'ApplicationHealthStateChunk',
        modelProperties: {
          healthState: {
            required: false,
            serializedName: 'HealthState',
            type: {
              name: 'String'
            }
          },
          applicationName: {
            required: false,
            serializedName: 'ApplicationName',
            type: {
              name: 'String'
            }
          },
          applicationTypeName: {
            required: false,
            serializedName: 'ApplicationTypeName',
            type: {
              name: 'String'
            }
          },
          serviceHealthStateChunks: {
            required: false,
            serializedName: 'ServiceHealthStateChunks',
            type: {
              name: 'Composite',
              className: 'ServiceHealthStateChunkList'
            }
          },
          deployedApplicationHealthStateChunks: {
            required: false,
            serializedName: 'DeployedApplicationHealthStateChunks',
            type: {
              name: 'Composite',
              className: 'DeployedApplicationHealthStateChunkList'
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationHealthStateChunk;
