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

/**
 * Policy assignment summary.
 *
 */
class PolicyAssignmentSummary {
  /**
   * Create a PolicyAssignmentSummary.
   * @property {string} [policyAssignmentId] Policy assignment ID.
   * @property {string} [policySetDefinitionId] Policy set definition ID, if
   * the policy assignment is for a policy set.
   * @property {object} [results] Non-compliance summary for the policy
   * assignment.
   * @property {string} [results.queryResultsUri] HTTP POST URI for
   * queryResults action on Microsoft.PolicyInsights to retrieve raw results
   * for the non-compliance summary.
   * @property {number} [results.nonCompliantResources] Number of non-compliant
   * resources.
   * @property {number} [results.nonCompliantPolicies] Number of non-compliant
   * policies.
   * @property {array} [policyDefinitions] Policy definitions summary.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PolicyAssignmentSummary
   *
   * @returns {object} metadata of PolicyAssignmentSummary
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PolicyAssignmentSummary',
      type: {
        name: 'Composite',
        className: 'PolicyAssignmentSummary',
        modelProperties: {
          policyAssignmentId: {
            required: false,
            serializedName: 'policyAssignmentId',
            type: {
              name: 'String'
            }
          },
          policySetDefinitionId: {
            required: false,
            serializedName: 'policySetDefinitionId',
            type: {
              name: 'String'
            }
          },
          results: {
            required: false,
            serializedName: 'results',
            type: {
              name: 'Composite',
              className: 'SummaryResults'
            }
          },
          policyDefinitions: {
            required: false,
            serializedName: 'policyDefinitions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PolicyDefinitionSummaryElementType',
                  type: {
                    name: 'Composite',
                    className: 'PolicyDefinitionSummary'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = PolicyAssignmentSummary;
