/* 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 { FromVersion } from './FromVersion'; import { FromVersionFromJSON, FromVersionFromJSONTyped, FromVersionToJSON, FromVersionToJSONTyped, } from './FromVersion'; import type { RecommendedVersion } from './RecommendedVersion'; import { RecommendedVersionFromJSON, RecommendedVersionFromJSONTyped, RecommendedVersionToJSON, RecommendedVersionToJSONTyped, } from './RecommendedVersion'; /** * * @export * @interface RecommendationResponse */ export interface RecommendationResponse { /** * * @type {FromVersion} * @memberof RecommendationResponse */ fromVersion?: FromVersion; /** * * @type {string} * @memberof RecommendationResponse */ outcome?: RecommendationResponseOutcomeEnum; /** * * @type {Array} * @memberof RecommendationResponse */ toVersions?: Array; } /** * @export */ export const RecommendationResponseOutcomeEnum = { FoundRecommendations: 'FOUND_RECOMMENDATIONS', NoUpgradeNeeded: 'NO_UPGRADE_NEEDED', NoDataForVersion: 'NO_DATA_FOR_VERSION', BlockedByPolicy: 'BLOCKED_BY_POLICY' } as const; export type RecommendationResponseOutcomeEnum = typeof RecommendationResponseOutcomeEnum[keyof typeof RecommendationResponseOutcomeEnum]; /** * Check if a given object implements the RecommendationResponse interface. */ export function instanceOfRecommendationResponse(value: object): value is RecommendationResponse { return true; } export function RecommendationResponseFromJSON(json: any): RecommendationResponse { return RecommendationResponseFromJSONTyped(json, false); } export function RecommendationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecommendationResponse { if (json == null) { return json; } return { 'fromVersion': json['fromVersion'] == null ? undefined : FromVersionFromJSON(json['fromVersion']), 'outcome': json['outcome'] == null ? undefined : json['outcome'], 'toVersions': json['toVersions'] == null ? undefined : ((json['toVersions'] as Array).map(RecommendedVersionFromJSON)), }; } export function RecommendationResponseToJSON(json: any): RecommendationResponse { return RecommendationResponseToJSONTyped(json, false); } export function RecommendationResponseToJSONTyped(value?: RecommendationResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'fromVersion': FromVersionToJSON(value['fromVersion']), 'outcome': value['outcome'], 'toVersions': value['toVersions'] == null ? undefined : ((value['toVersions'] as Array).map(RecommendedVersionToJSON)), }; }