/* 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 { ApiReportConstraintViolationDTOV2 } from './ApiReportConstraintViolationDTOV2'; import { ApiReportConstraintViolationDTOV2FromJSON, ApiReportConstraintViolationDTOV2FromJSONTyped, ApiReportConstraintViolationDTOV2ToJSON, ApiReportConstraintViolationDTOV2ToJSONTyped, } from './ApiReportConstraintViolationDTOV2'; /** * * @export * @interface ApiReportPolicyViolationDTOV2 */ export interface ApiReportPolicyViolationDTOV2 { /** * * @type {Array} * @memberof ApiReportPolicyViolationDTOV2 */ constraints?: Array; /** * * @type {Date} * @memberof ApiReportPolicyViolationDTOV2 */ fixTime?: Date; /** * * @type {boolean} * @memberof ApiReportPolicyViolationDTOV2 */ grandfathered?: boolean; /** * * @type {boolean} * @memberof ApiReportPolicyViolationDTOV2 */ legacyViolation?: boolean; /** * * @type {Date} * @memberof ApiReportPolicyViolationDTOV2 */ legacyViolationTime?: Date; /** * * @type {Date} * @memberof ApiReportPolicyViolationDTOV2 */ openTime?: Date; /** * * @type {string} * @memberof ApiReportPolicyViolationDTOV2 */ policyId?: string; /** * * @type {string} * @memberof ApiReportPolicyViolationDTOV2 */ policyName?: string; /** * * @type {string} * @memberof ApiReportPolicyViolationDTOV2 */ policyThreatCategory?: string; /** * * @type {number} * @memberof ApiReportPolicyViolationDTOV2 */ policyThreatLevel?: number; /** * * @type {string} * @memberof ApiReportPolicyViolationDTOV2 */ policyViolationId?: string; /** * * @type {Date} * @memberof ApiReportPolicyViolationDTOV2 */ waiveTime?: Date; /** * * @type {boolean} * @memberof ApiReportPolicyViolationDTOV2 */ waived?: boolean; /** * * @type {boolean} * @memberof ApiReportPolicyViolationDTOV2 */ waivedWithAutoWaiver?: boolean; } /** * Check if a given object implements the ApiReportPolicyViolationDTOV2 interface. */ export function instanceOfApiReportPolicyViolationDTOV2(value: object): value is ApiReportPolicyViolationDTOV2 { return true; } export function ApiReportPolicyViolationDTOV2FromJSON(json: any): ApiReportPolicyViolationDTOV2 { return ApiReportPolicyViolationDTOV2FromJSONTyped(json, false); } export function ApiReportPolicyViolationDTOV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiReportPolicyViolationDTOV2 { if (json == null) { return json; } return { 'constraints': json['constraints'] == null ? undefined : ((json['constraints'] as Array).map(ApiReportConstraintViolationDTOV2FromJSON)), 'fixTime': json['fixTime'] == null ? undefined : (new Date(json['fixTime'])), 'grandfathered': json['grandfathered'] == null ? undefined : json['grandfathered'], 'legacyViolation': json['legacyViolation'] == null ? undefined : json['legacyViolation'], 'legacyViolationTime': json['legacyViolationTime'] == null ? undefined : (new Date(json['legacyViolationTime'])), 'openTime': json['openTime'] == null ? undefined : (new Date(json['openTime'])), 'policyId': json['policyId'] == null ? undefined : json['policyId'], 'policyName': json['policyName'] == null ? undefined : json['policyName'], 'policyThreatCategory': json['policyThreatCategory'] == null ? undefined : json['policyThreatCategory'], 'policyThreatLevel': json['policyThreatLevel'] == null ? undefined : json['policyThreatLevel'], 'policyViolationId': json['policyViolationId'] == null ? undefined : json['policyViolationId'], 'waiveTime': json['waiveTime'] == null ? undefined : (new Date(json['waiveTime'])), 'waived': json['waived'] == null ? undefined : json['waived'], 'waivedWithAutoWaiver': json['waivedWithAutoWaiver'] == null ? undefined : json['waivedWithAutoWaiver'], }; } export function ApiReportPolicyViolationDTOV2ToJSON(json: any): ApiReportPolicyViolationDTOV2 { return ApiReportPolicyViolationDTOV2ToJSONTyped(json, false); } export function ApiReportPolicyViolationDTOV2ToJSONTyped(value?: ApiReportPolicyViolationDTOV2 | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'constraints': value['constraints'] == null ? undefined : ((value['constraints'] as Array).map(ApiReportConstraintViolationDTOV2ToJSON)), 'fixTime': value['fixTime'] == null ? value['fixTime'] : value['fixTime'].toISOString(), 'grandfathered': value['grandfathered'], 'legacyViolation': value['legacyViolation'], 'legacyViolationTime': value['legacyViolationTime'] == null ? value['legacyViolationTime'] : value['legacyViolationTime'].toISOString(), 'openTime': value['openTime'] == null ? value['openTime'] : value['openTime'].toISOString(), 'policyId': value['policyId'], 'policyName': value['policyName'], 'policyThreatCategory': value['policyThreatCategory'], 'policyThreatLevel': value['policyThreatLevel'], 'policyViolationId': value['policyViolationId'], 'waiveTime': value['waiveTime'] == null ? value['waiveTime'] : value['waiveTime'].toISOString(), 'waived': value['waived'], 'waivedWithAutoWaiver': value['waivedWithAutoWaiver'], }; }