/* 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 { ApiRepositoryComponentEvaluationRequest } from './ApiRepositoryComponentEvaluationRequest'; import { ApiRepositoryComponentEvaluationRequestFromJSON, ApiRepositoryComponentEvaluationRequestFromJSONTyped, ApiRepositoryComponentEvaluationRequestToJSON, ApiRepositoryComponentEvaluationRequestToJSONTyped, } from './ApiRepositoryComponentEvaluationRequest'; import type { ApiPolicyViolationDTOV2 } from './ApiPolicyViolationDTOV2'; import { ApiPolicyViolationDTOV2FromJSON, ApiPolicyViolationDTOV2FromJSONTyped, ApiPolicyViolationDTOV2ToJSON, ApiPolicyViolationDTOV2ToJSONTyped, } from './ApiPolicyViolationDTOV2'; /** * * @export * @interface ApiRepositoryComponentEvaluationResult */ export interface ApiRepositoryComponentEvaluationResult { /** * * @type {Date} * @memberof ApiRepositoryComponentEvaluationResult */ catalogDate?: Date; /** * * @type {ApiRepositoryComponentEvaluationRequest} * @memberof ApiRepositoryComponentEvaluationResult */ component?: ApiRepositoryComponentEvaluationRequest; /** * * @type {Array} * @memberof ApiRepositoryComponentEvaluationResult */ policyViolations?: Array; /** * * @type {Date} * @memberof ApiRepositoryComponentEvaluationResult */ quarantineDate?: Date; /** * * @type {boolean} * @memberof ApiRepositoryComponentEvaluationResult */ quarantined?: boolean; } /** * Check if a given object implements the ApiRepositoryComponentEvaluationResult interface. */ export function instanceOfApiRepositoryComponentEvaluationResult(value: object): value is ApiRepositoryComponentEvaluationResult { return true; } export function ApiRepositoryComponentEvaluationResultFromJSON(json: any): ApiRepositoryComponentEvaluationResult { return ApiRepositoryComponentEvaluationResultFromJSONTyped(json, false); } export function ApiRepositoryComponentEvaluationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiRepositoryComponentEvaluationResult { if (json == null) { return json; } return { 'catalogDate': json['catalogDate'] == null ? undefined : (new Date(json['catalogDate'])), 'component': json['component'] == null ? undefined : ApiRepositoryComponentEvaluationRequestFromJSON(json['component']), 'policyViolations': json['policyViolations'] == null ? undefined : ((json['policyViolations'] as Array).map(ApiPolicyViolationDTOV2FromJSON)), 'quarantineDate': json['quarantineDate'] == null ? undefined : (new Date(json['quarantineDate'])), 'quarantined': json['quarantined'] == null ? undefined : json['quarantined'], }; } export function ApiRepositoryComponentEvaluationResultToJSON(json: any): ApiRepositoryComponentEvaluationResult { return ApiRepositoryComponentEvaluationResultToJSONTyped(json, false); } export function ApiRepositoryComponentEvaluationResultToJSONTyped(value?: ApiRepositoryComponentEvaluationResult | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'catalogDate': value['catalogDate'] == null ? value['catalogDate'] : value['catalogDate'].toISOString(), 'component': ApiRepositoryComponentEvaluationRequestToJSON(value['component']), 'policyViolations': value['policyViolations'] == null ? undefined : ((value['policyViolations'] as Array).map(ApiPolicyViolationDTOV2ToJSON)), 'quarantineDate': value['quarantineDate'] == null ? value['quarantineDate'] : value['quarantineDate'].toISOString(), 'quarantined': value['quarantined'], }; }