/*
 * 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 deployed application, which contains
 * the node where the application is deployed, the aggregated health state and
 * any deployed service packages that respect the chunk query description
 * filters.
 *
 * @extends models['EntityHealthStateChunk']
 */
class DeployedApplicationHealthStateChunk extends models['EntityHealthStateChunk'] {
  /**
   * Create a DeployedApplicationHealthStateChunk.
   * @property {string} [nodeName] The name of node where the application is
   * deployed.
   * @property {object} [deployedServicePackageHealthStateChunks] The list of
   * deployed service package health state chunks belonging to the deployed
   * application that respect the filters in the cluster health chunk query
   * description.
   * @property {array} [deployedServicePackageHealthStateChunks.items] The list
   * of deployed service package health state chunks that respect the input
   * filters in the chunk query.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DeployedApplicationHealthStateChunk
   *
   * @returns {object} metadata of DeployedApplicationHealthStateChunk
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DeployedApplicationHealthStateChunk',
      type: {
        name: 'Composite',
        className: 'DeployedApplicationHealthStateChunk',
        modelProperties: {
          healthState: {
            required: false,
            serializedName: 'HealthState',
            type: {
              name: 'String'
            }
          },
          nodeName: {
            required: false,
            serializedName: 'NodeName',
            type: {
              name: 'String'
            }
          },
          deployedServicePackageHealthStateChunks: {
            required: false,
            serializedName: 'DeployedServicePackageHealthStateChunks',
            type: {
              name: 'Composite',
              className: 'DeployedServicePackageHealthStateChunkList'
            }
          }
        }
      }
    };
  }
}

module.exports = DeployedApplicationHealthStateChunk;
