/* 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 { ApiConstraintViolationDTO } from './ApiConstraintViolationDTO'; import { ApiConstraintViolationDTOFromJSON, ApiConstraintViolationDTOFromJSONTyped, ApiConstraintViolationDTOToJSON, ApiConstraintViolationDTOToJSONTyped, } from './ApiConstraintViolationDTO'; import type { ApiComponentDTOV2 } from './ApiComponentDTOV2'; import { ApiComponentDTOV2FromJSON, ApiComponentDTOV2FromJSONTyped, ApiComponentDTOV2ToJSON, ApiComponentDTOV2ToJSONTyped, } from './ApiComponentDTOV2'; /** * * @export * @interface ApiPolicyViolationForDiffDTO */ export interface ApiPolicyViolationForDiffDTO { /** * * @type {ApiComponentDTOV2} * @memberof ApiPolicyViolationForDiffDTO */ component?: ApiComponentDTOV2; /** * * @type {Array} * @memberof ApiPolicyViolationForDiffDTO */ constraintViolations?: Array; /** * * @type {Date} * @memberof ApiPolicyViolationForDiffDTO */ fixTime?: Date; /** * * @type {Date} * @memberof ApiPolicyViolationForDiffDTO */ legacyViolationTime?: Date; /** * * @type {Date} * @memberof ApiPolicyViolationForDiffDTO */ openTime?: Date; /** * * @type {string} * @memberof ApiPolicyViolationForDiffDTO */ policyId?: string; /** * * @type {string} * @memberof ApiPolicyViolationForDiffDTO */ policyName?: string; /** * * @type {string} * @memberof ApiPolicyViolationForDiffDTO */ policyViolationId?: string; /** * * @type {number} * @memberof ApiPolicyViolationForDiffDTO */ threatLevel?: number; /** * * @type {Date} * @memberof ApiPolicyViolationForDiffDTO */ waiveTime?: Date; } /** * Check if a given object implements the ApiPolicyViolationForDiffDTO interface. */ export function instanceOfApiPolicyViolationForDiffDTO(value: object): value is ApiPolicyViolationForDiffDTO { return true; } export function ApiPolicyViolationForDiffDTOFromJSON(json: any): ApiPolicyViolationForDiffDTO { return ApiPolicyViolationForDiffDTOFromJSONTyped(json, false); } export function ApiPolicyViolationForDiffDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiPolicyViolationForDiffDTO { if (json == null) { return json; } return { 'component': json['component'] == null ? undefined : ApiComponentDTOV2FromJSON(json['component']), 'constraintViolations': json['constraintViolations'] == null ? undefined : ((json['constraintViolations'] as Array).map(ApiConstraintViolationDTOFromJSON)), 'fixTime': json['fixTime'] == null ? undefined : (new Date(json['fixTime'])), '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'], 'policyViolationId': json['policyViolationId'] == null ? undefined : json['policyViolationId'], 'threatLevel': json['threatLevel'] == null ? undefined : json['threatLevel'], 'waiveTime': json['waiveTime'] == null ? undefined : (new Date(json['waiveTime'])), }; } export function ApiPolicyViolationForDiffDTOToJSON(json: any): ApiPolicyViolationForDiffDTO { return ApiPolicyViolationForDiffDTOToJSONTyped(json, false); } export function ApiPolicyViolationForDiffDTOToJSONTyped(value?: ApiPolicyViolationForDiffDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'component': ApiComponentDTOV2ToJSON(value['component']), 'constraintViolations': value['constraintViolations'] == null ? undefined : ((value['constraintViolations'] as Array).map(ApiConstraintViolationDTOToJSON)), 'fixTime': value['fixTime'] == null ? value['fixTime'] : value['fixTime'].toISOString(), 'legacyViolationTime': value['legacyViolationTime'] == null ? value['legacyViolationTime'] : value['legacyViolationTime'].toISOString(), 'openTime': value['openTime'] == null ? value['openTime'] : value['openTime'].toISOString(), 'policyId': value['policyId'], 'policyName': value['policyName'], 'policyViolationId': value['policyViolationId'], 'threatLevel': value['threatLevel'], 'waiveTime': value['waiveTime'] == null ? value['waiveTime'] : value['waiveTime'].toISOString(), }; }