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

/**
 * Vault health details definition.
 *
 * @extends models['Resource']
 */
class VaultHealthDetails extends models['Resource'] {
  /**
   * Create a VaultHealthDetails.
   * @member {object} [properties] The vault health related data.
   * @member {array} [properties.vaultErrors] The list of errors on the vault.
   * @member {object} [properties.protectedItemsHealth] The list of the health
   * detail of the protected items in the vault.
   * @member {number} [properties.protectedItemsHealth.resourceCount] The count
   * of total resources umder the container.
   * @member {array} [properties.protectedItemsHealth.issues] The list of
   * summary of health errors across the resources under the container.
   * @member {object} [properties.fabricsHealth] The list of the health detail
   * of the fabrics in the vault.
   * @member {number} [properties.fabricsHealth.resourceCount] The count of
   * total resources umder the container.
   * @member {array} [properties.fabricsHealth.issues] The list of summary of
   * health errors across the resources under the container.
   * @member {object} [properties.containersHealth] The list of the health
   * detail of the containers in the vault.
   * @member {number} [properties.containersHealth.resourceCount] The count of
   * total resources umder the container.
   * @member {array} [properties.containersHealth.issues] The list of summary
   * of health errors across the resources under the container.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VaultHealthDetails
   *
   * @returns {object} metadata of VaultHealthDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VaultHealthDetails',
      type: {
        name: 'Composite',
        className: 'VaultHealthDetails',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'VaultHealthProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = VaultHealthDetails;
