/* 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 { ComponentObligationAttributionDTO } from './ComponentObligationAttributionDTO'; import { ComponentObligationAttributionDTOFromJSON, ComponentObligationAttributionDTOFromJSONTyped, ComponentObligationAttributionDTOToJSON, ComponentObligationAttributionDTOToJSONTyped, } from './ComponentObligationAttributionDTO'; import type { ApiLicenseLegalObligationDTO } from './ApiLicenseLegalObligationDTO'; import { ApiLicenseLegalObligationDTOFromJSON, ApiLicenseLegalObligationDTOFromJSONTyped, ApiLicenseLegalObligationDTOToJSON, ApiLicenseLegalObligationDTOToJSONTyped, } from './ApiLicenseLegalObligationDTO'; import type { ApiLicenseThreatDTOV2 } from './ApiLicenseThreatDTOV2'; import { ApiLicenseThreatDTOV2FromJSON, ApiLicenseThreatDTOV2FromJSONTyped, ApiLicenseThreatDTOV2ToJSON, ApiLicenseThreatDTOV2ToJSONTyped, } from './ApiLicenseThreatDTOV2'; import type { ApiLicenseLegalFileDTO } from './ApiLicenseLegalFileDTO'; import { ApiLicenseLegalFileDTOFromJSON, ApiLicenseLegalFileDTOFromJSONTyped, ApiLicenseLegalFileDTOToJSON, ApiLicenseLegalFileDTOToJSONTyped, } from './ApiLicenseLegalFileDTO'; import type { LegalSourceLinkDTO } from './LegalSourceLinkDTO'; import { LegalSourceLinkDTOFromJSON, LegalSourceLinkDTOFromJSONTyped, LegalSourceLinkDTOToJSON, LegalSourceLinkDTOToJSONTyped, } from './LegalSourceLinkDTO'; import type { ApiLicenseLegalCopyrightDTO } from './ApiLicenseLegalCopyrightDTO'; import { ApiLicenseLegalCopyrightDTOFromJSON, ApiLicenseLegalCopyrightDTOFromJSONTyped, ApiLicenseLegalCopyrightDTOToJSON, ApiLicenseLegalCopyrightDTOToJSONTyped, } from './ApiLicenseLegalCopyrightDTO'; /** * * @export * @interface ApiLicenseLegalDataDTO */ export interface ApiLicenseLegalDataDTO { /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ attributions?: Array; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentCopyrightId?: string; /** * * @type {Date} * @memberof ApiLicenseLegalDataDTO */ componentCopyrightLastUpdatedAt?: Date; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentCopyrightLastUpdatedByUsername?: string; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentCopyrightScopeOwnerId?: string; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentLicensesId?: string; /** * * @type {Date} * @memberof ApiLicenseLegalDataDTO */ componentLicensesLastUpdatedAt?: Date; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentLicensesLastUpdatedByUsername?: string; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentLicensesScopeOwnerId?: string; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentNoticesId?: string; /** * * @type {Date} * @memberof ApiLicenseLegalDataDTO */ componentNoticesLastUpdatedAt?: Date; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentNoticesLastUpdatedByUsername?: string; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ componentNoticesScopeOwnerId?: string; /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ copyrights?: Array; /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ declaredLicenses?: Array; /** * * @type {string} * @memberof ApiLicenseLegalDataDTO */ effectiveLicenseStatus?: string; /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ effectiveLicenses?: Array; /** * * @type {ApiLicenseThreatDTOV2} * @memberof ApiLicenseLegalDataDTO */ highestEffectiveLicenseThreatGroup?: ApiLicenseThreatDTOV2; /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ licenseFiles?: Array; /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ noticeFiles?: Array; /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ obligations?: Array; /** * * @type {Array} * @memberof ApiLicenseLegalDataDTO */ observedLicenses?: Array; /** * * @type {Set} * @memberof ApiLicenseLegalDataDTO */ sourceLinks?: Set; } /** * Check if a given object implements the ApiLicenseLegalDataDTO interface. */ export function instanceOfApiLicenseLegalDataDTO(value: object): value is ApiLicenseLegalDataDTO { return true; } export function ApiLicenseLegalDataDTOFromJSON(json: any): ApiLicenseLegalDataDTO { return ApiLicenseLegalDataDTOFromJSONTyped(json, false); } export function ApiLicenseLegalDataDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiLicenseLegalDataDTO { if (json == null) { return json; } return { 'attributions': json['attributions'] == null ? undefined : ((json['attributions'] as Array).map(ComponentObligationAttributionDTOFromJSON)), 'componentCopyrightId': json['componentCopyrightId'] == null ? undefined : json['componentCopyrightId'], 'componentCopyrightLastUpdatedAt': json['componentCopyrightLastUpdatedAt'] == null ? undefined : (new Date(json['componentCopyrightLastUpdatedAt'])), 'componentCopyrightLastUpdatedByUsername': json['componentCopyrightLastUpdatedByUsername'] == null ? undefined : json['componentCopyrightLastUpdatedByUsername'], 'componentCopyrightScopeOwnerId': json['componentCopyrightScopeOwnerId'] == null ? undefined : json['componentCopyrightScopeOwnerId'], 'componentLicensesId': json['componentLicensesId'] == null ? undefined : json['componentLicensesId'], 'componentLicensesLastUpdatedAt': json['componentLicensesLastUpdatedAt'] == null ? undefined : (new Date(json['componentLicensesLastUpdatedAt'])), 'componentLicensesLastUpdatedByUsername': json['componentLicensesLastUpdatedByUsername'] == null ? undefined : json['componentLicensesLastUpdatedByUsername'], 'componentLicensesScopeOwnerId': json['componentLicensesScopeOwnerId'] == null ? undefined : json['componentLicensesScopeOwnerId'], 'componentNoticesId': json['componentNoticesId'] == null ? undefined : json['componentNoticesId'], 'componentNoticesLastUpdatedAt': json['componentNoticesLastUpdatedAt'] == null ? undefined : (new Date(json['componentNoticesLastUpdatedAt'])), 'componentNoticesLastUpdatedByUsername': json['componentNoticesLastUpdatedByUsername'] == null ? undefined : json['componentNoticesLastUpdatedByUsername'], 'componentNoticesScopeOwnerId': json['componentNoticesScopeOwnerId'] == null ? undefined : json['componentNoticesScopeOwnerId'], 'copyrights': json['copyrights'] == null ? undefined : ((json['copyrights'] as Array).map(ApiLicenseLegalCopyrightDTOFromJSON)), 'declaredLicenses': json['declaredLicenses'] == null ? undefined : json['declaredLicenses'], 'effectiveLicenseStatus': json['effectiveLicenseStatus'] == null ? undefined : json['effectiveLicenseStatus'], 'effectiveLicenses': json['effectiveLicenses'] == null ? undefined : json['effectiveLicenses'], 'highestEffectiveLicenseThreatGroup': json['highestEffectiveLicenseThreatGroup'] == null ? undefined : ApiLicenseThreatDTOV2FromJSON(json['highestEffectiveLicenseThreatGroup']), 'licenseFiles': json['licenseFiles'] == null ? undefined : ((json['licenseFiles'] as Array).map(ApiLicenseLegalFileDTOFromJSON)), 'noticeFiles': json['noticeFiles'] == null ? undefined : ((json['noticeFiles'] as Array).map(ApiLicenseLegalFileDTOFromJSON)), 'obligations': json['obligations'] == null ? undefined : ((json['obligations'] as Array).map(ApiLicenseLegalObligationDTOFromJSON)), 'observedLicenses': json['observedLicenses'] == null ? undefined : json['observedLicenses'], 'sourceLinks': json['sourceLinks'] == null ? undefined : (new Set((json['sourceLinks'] as Array).map(LegalSourceLinkDTOFromJSON))), }; } export function ApiLicenseLegalDataDTOToJSON(json: any): ApiLicenseLegalDataDTO { return ApiLicenseLegalDataDTOToJSONTyped(json, false); } export function ApiLicenseLegalDataDTOToJSONTyped(value?: ApiLicenseLegalDataDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'attributions': value['attributions'] == null ? undefined : ((value['attributions'] as Array).map(ComponentObligationAttributionDTOToJSON)), 'componentCopyrightId': value['componentCopyrightId'], 'componentCopyrightLastUpdatedAt': value['componentCopyrightLastUpdatedAt'] == null ? value['componentCopyrightLastUpdatedAt'] : value['componentCopyrightLastUpdatedAt'].toISOString(), 'componentCopyrightLastUpdatedByUsername': value['componentCopyrightLastUpdatedByUsername'], 'componentCopyrightScopeOwnerId': value['componentCopyrightScopeOwnerId'], 'componentLicensesId': value['componentLicensesId'], 'componentLicensesLastUpdatedAt': value['componentLicensesLastUpdatedAt'] == null ? value['componentLicensesLastUpdatedAt'] : value['componentLicensesLastUpdatedAt'].toISOString(), 'componentLicensesLastUpdatedByUsername': value['componentLicensesLastUpdatedByUsername'], 'componentLicensesScopeOwnerId': value['componentLicensesScopeOwnerId'], 'componentNoticesId': value['componentNoticesId'], 'componentNoticesLastUpdatedAt': value['componentNoticesLastUpdatedAt'] == null ? value['componentNoticesLastUpdatedAt'] : value['componentNoticesLastUpdatedAt'].toISOString(), 'componentNoticesLastUpdatedByUsername': value['componentNoticesLastUpdatedByUsername'], 'componentNoticesScopeOwnerId': value['componentNoticesScopeOwnerId'], 'copyrights': value['copyrights'] == null ? undefined : ((value['copyrights'] as Array).map(ApiLicenseLegalCopyrightDTOToJSON)), 'declaredLicenses': value['declaredLicenses'], 'effectiveLicenseStatus': value['effectiveLicenseStatus'], 'effectiveLicenses': value['effectiveLicenses'], 'highestEffectiveLicenseThreatGroup': ApiLicenseThreatDTOV2ToJSON(value['highestEffectiveLicenseThreatGroup']), 'licenseFiles': value['licenseFiles'] == null ? undefined : ((value['licenseFiles'] as Array).map(ApiLicenseLegalFileDTOToJSON)), 'noticeFiles': value['noticeFiles'] == null ? undefined : ((value['noticeFiles'] as Array).map(ApiLicenseLegalFileDTOToJSON)), 'obligations': value['obligations'] == null ? undefined : ((value['obligations'] as Array).map(ApiLicenseLegalObligationDTOToJSON)), 'observedLicenses': value['observedLicenses'], 'sourceLinks': value['sourceLinks'] == null ? undefined : (Array.from(value['sourceLinks'] as Set).map(LegalSourceLinkDTOToJSON)), }; }