/* tslint:disable */ /* eslint-disable */ /** * Sonatype Guide API * REST API into [Sonatype Guide](https://guide.sonatype.com). * * The version of the OpenAPI document: 202607 * * * 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 { RecommendationVulnerableMethod } from './RecommendationVulnerableMethod'; import { RecommendationVulnerableMethodFromJSON, RecommendationVulnerableMethodFromJSONTyped, RecommendationVulnerableMethodToJSON, RecommendationVulnerableMethodToJSONTyped, } from './RecommendationVulnerableMethod'; import type { DtsDimensions } from './DtsDimensions'; import { DtsDimensionsFromJSON, DtsDimensionsFromJSONTyped, DtsDimensionsToJSON, DtsDimensionsToJSONTyped, } from './DtsDimensions'; import type { PolicyCompliance } from './PolicyCompliance'; import { PolicyComplianceFromJSON, PolicyComplianceFromJSONTyped, PolicyComplianceToJSON, PolicyComplianceToJSONTyped, } from './PolicyCompliance'; /** * * @export * @interface FromVersion */ export interface FromVersion { /** * * @type {string} * @memberof FromVersion */ breakingChangesCount?: string; /** * * @type {number} * @memberof FromVersion */ developerTrustScore?: number; /** * * @type {{ [key: string]: number; }} * @memberof FromVersion */ directVulnerabilities?: { [key: string]: number; }; /** * * @type {DtsDimensions} * @memberof FromVersion */ dtsDimensions?: DtsDimensions; /** * * @type {{ [key: string]: number; }} * @memberof FromVersion */ licenseThreatLevels?: { [key: string]: number; }; /** * * @type {number} * @memberof FromVersion */ maxSeverity?: number; /** * * @type {PolicyCompliance} * @memberof FromVersion */ policyCompliance?: PolicyCompliance; /** * * @type {{ [key: string]: number; }} * @memberof FromVersion */ transitiveVulnerabilities?: { [key: string]: number; }; /** * * @type {string} * @memberof FromVersion */ version?: string; /** * * @type {Array} * @memberof FromVersion */ vulnerableMethods?: Array; } /** * Check if a given object implements the FromVersion interface. */ export function instanceOfFromVersion(value: object): value is FromVersion { return true; } export function FromVersionFromJSON(json: any): FromVersion { return FromVersionFromJSONTyped(json, false); } export function FromVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FromVersion { if (json == null) { return json; } return { 'breakingChangesCount': json['breakingChangesCount'] == null ? undefined : json['breakingChangesCount'], 'developerTrustScore': json['developerTrustScore'] == null ? undefined : json['developerTrustScore'], 'directVulnerabilities': json['directVulnerabilities'] == null ? undefined : json['directVulnerabilities'], 'dtsDimensions': json['dtsDimensions'] == null ? undefined : DtsDimensionsFromJSON(json['dtsDimensions']), 'licenseThreatLevels': json['licenseThreatLevels'] == null ? undefined : json['licenseThreatLevels'], 'maxSeverity': json['maxSeverity'] == null ? undefined : json['maxSeverity'], 'policyCompliance': json['policyCompliance'] == null ? undefined : PolicyComplianceFromJSON(json['policyCompliance']), 'transitiveVulnerabilities': json['transitiveVulnerabilities'] == null ? undefined : json['transitiveVulnerabilities'], 'version': json['version'] == null ? undefined : json['version'], 'vulnerableMethods': json['vulnerableMethods'] == null ? undefined : ((json['vulnerableMethods'] as Array).map(RecommendationVulnerableMethodFromJSON)), }; } export function FromVersionToJSON(json: any): FromVersion { return FromVersionToJSONTyped(json, false); } export function FromVersionToJSONTyped(value?: FromVersion | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'breakingChangesCount': value['breakingChangesCount'], 'developerTrustScore': value['developerTrustScore'], 'directVulnerabilities': value['directVulnerabilities'], 'dtsDimensions': DtsDimensionsToJSON(value['dtsDimensions']), 'licenseThreatLevels': value['licenseThreatLevels'], 'maxSeverity': value['maxSeverity'], 'policyCompliance': PolicyComplianceToJSON(value['policyCompliance']), 'transitiveVulnerabilities': value['transitiveVulnerabilities'], 'version': value['version'], 'vulnerableMethods': value['vulnerableMethods'] == null ? undefined : ((value['vulnerableMethods'] as Array).map(RecommendationVulnerableMethodToJSON)), }; }