/* 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 { ApiComponentDTOV2 } from './ApiComponentDTOV2'; import { ApiComponentDTOV2FromJSON, ApiComponentDTOV2FromJSONTyped, ApiComponentDTOV2ToJSON, ApiComponentDTOV2ToJSONTyped, } from './ApiComponentDTOV2'; import type { ApiWaivedPolicyViolationDTO } from './ApiWaivedPolicyViolationDTO'; import { ApiWaivedPolicyViolationDTOFromJSON, ApiWaivedPolicyViolationDTOFromJSONTyped, ApiWaivedPolicyViolationDTOToJSON, ApiWaivedPolicyViolationDTOToJSONTyped, } from './ApiWaivedPolicyViolationDTO'; /** * * @export * @interface ApiComponentPolicyViolationDTO */ export interface ApiComponentPolicyViolationDTO { /** * * @type {ApiComponentDTOV2} * @memberof ApiComponentPolicyViolationDTO */ component?: ApiComponentDTOV2; /** * * @type {Array} * @memberof ApiComponentPolicyViolationDTO */ waivedPolicyViolations?: Array; } /** * Check if a given object implements the ApiComponentPolicyViolationDTO interface. */ export function instanceOfApiComponentPolicyViolationDTO(value: object): value is ApiComponentPolicyViolationDTO { return true; } export function ApiComponentPolicyViolationDTOFromJSON(json: any): ApiComponentPolicyViolationDTO { return ApiComponentPolicyViolationDTOFromJSONTyped(json, false); } export function ApiComponentPolicyViolationDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiComponentPolicyViolationDTO { if (json == null) { return json; } return { 'component': json['component'] == null ? undefined : ApiComponentDTOV2FromJSON(json['component']), 'waivedPolicyViolations': json['waivedPolicyViolations'] == null ? undefined : ((json['waivedPolicyViolations'] as Array).map(ApiWaivedPolicyViolationDTOFromJSON)), }; } export function ApiComponentPolicyViolationDTOToJSON(json: any): ApiComponentPolicyViolationDTO { return ApiComponentPolicyViolationDTOToJSONTyped(json, false); } export function ApiComponentPolicyViolationDTOToJSONTyped(value?: ApiComponentPolicyViolationDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'component': ApiComponentDTOV2ToJSON(value['component']), 'waivedPolicyViolations': value['waivedPolicyViolations'] == null ? undefined : ((value['waivedPolicyViolations'] as Array).map(ApiWaivedPolicyViolationDTOToJSON)), }; }