/* tslint:disable */ /* eslint-disable */ /** * Sonatype Lifecycle Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.207.0-01 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { PolicyAlert } from './PolicyAlert'; import { PolicyAlertFromJSON, PolicyAlertFromJSONTyped, PolicyAlertToJSON, PolicyAlertToJSONTyped, } from './PolicyAlert'; /** * * @export * @interface PolicyEvaluationResult */ export interface PolicyEvaluationResult { /** * * @type {number} * @memberof PolicyEvaluationResult */ affectedComponentCount?: number; /** * * @type {Array} * @memberof PolicyEvaluationResult */ alerts?: Array; /** * * @type {number} * @memberof PolicyEvaluationResult */ criticalComponentCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ criticalPolicyViolationCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ criticalSastPolicyViolationCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ grandfatheredPolicyViolationCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ legacyViolationCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ moderateComponentCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ moderatePolicyViolationCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ moderateSastPolicyViolationCount?: number; /** * * @type {Array} * @memberof PolicyEvaluationResult */ sastAlerts?: Array; /** * * @type {number} * @memberof PolicyEvaluationResult */ severeComponentCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ severePolicyViolationCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ severeSastPolicyViolationCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ totalComponentCount?: number; /** * * @type {number} * @memberof PolicyEvaluationResult */ totalSastFindingCount?: number; } /** * Check if a given object implements the PolicyEvaluationResult interface. */ export function instanceOfPolicyEvaluationResult(value: object): value is PolicyEvaluationResult { return true; } export function PolicyEvaluationResultFromJSON(json: any): PolicyEvaluationResult { return PolicyEvaluationResultFromJSONTyped(json, false); } export function PolicyEvaluationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyEvaluationResult { if (json == null) { return json; } return { 'affectedComponentCount': json['affectedComponentCount'] == null ? undefined : json['affectedComponentCount'], 'alerts': json['alerts'] == null ? undefined : ((json['alerts'] as Array).map(PolicyAlertFromJSON)), 'criticalComponentCount': json['criticalComponentCount'] == null ? undefined : json['criticalComponentCount'], 'criticalPolicyViolationCount': json['criticalPolicyViolationCount'] == null ? undefined : json['criticalPolicyViolationCount'], 'criticalSastPolicyViolationCount': json['criticalSastPolicyViolationCount'] == null ? undefined : json['criticalSastPolicyViolationCount'], 'grandfatheredPolicyViolationCount': json['grandfatheredPolicyViolationCount'] == null ? undefined : json['grandfatheredPolicyViolationCount'], 'legacyViolationCount': json['legacyViolationCount'] == null ? undefined : json['legacyViolationCount'], 'moderateComponentCount': json['moderateComponentCount'] == null ? undefined : json['moderateComponentCount'], 'moderatePolicyViolationCount': json['moderatePolicyViolationCount'] == null ? undefined : json['moderatePolicyViolationCount'], 'moderateSastPolicyViolationCount': json['moderateSastPolicyViolationCount'] == null ? undefined : json['moderateSastPolicyViolationCount'], 'sastAlerts': json['sastAlerts'] == null ? undefined : ((json['sastAlerts'] as Array).map(PolicyAlertFromJSON)), 'severeComponentCount': json['severeComponentCount'] == null ? undefined : json['severeComponentCount'], 'severePolicyViolationCount': json['severePolicyViolationCount'] == null ? undefined : json['severePolicyViolationCount'], 'severeSastPolicyViolationCount': json['severeSastPolicyViolationCount'] == null ? undefined : json['severeSastPolicyViolationCount'], 'totalComponentCount': json['totalComponentCount'] == null ? undefined : json['totalComponentCount'], 'totalSastFindingCount': json['totalSastFindingCount'] == null ? undefined : json['totalSastFindingCount'], }; } export function PolicyEvaluationResultToJSON(json: any): PolicyEvaluationResult { return PolicyEvaluationResultToJSONTyped(json, false); } export function PolicyEvaluationResultToJSONTyped(value?: PolicyEvaluationResult | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'affectedComponentCount': value['affectedComponentCount'], 'alerts': value['alerts'] == null ? undefined : ((value['alerts'] as Array).map(PolicyAlertToJSON)), 'criticalComponentCount': value['criticalComponentCount'], 'criticalPolicyViolationCount': value['criticalPolicyViolationCount'], 'criticalSastPolicyViolationCount': value['criticalSastPolicyViolationCount'], 'grandfatheredPolicyViolationCount': value['grandfatheredPolicyViolationCount'], 'legacyViolationCount': value['legacyViolationCount'], 'moderateComponentCount': value['moderateComponentCount'], 'moderatePolicyViolationCount': value['moderatePolicyViolationCount'], 'moderateSastPolicyViolationCount': value['moderateSastPolicyViolationCount'], 'sastAlerts': value['sastAlerts'] == null ? undefined : ((value['sastAlerts'] as Array).map(PolicyAlertToJSON)), 'severeComponentCount': value['severeComponentCount'], 'severePolicyViolationCount': value['severePolicyViolationCount'], 'severeSastPolicyViolationCount': value['severeSastPolicyViolationCount'], 'totalComponentCount': value['totalComponentCount'], 'totalSastFindingCount': value['totalSastFindingCount'], }; }