/* 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 { OssiUsageSummary } from './OssiUsageSummary'; import { OssiUsageSummaryFromJSON, OssiUsageSummaryFromJSONTyped, OssiUsageSummaryToJSON, OssiUsageSummaryToJSONTyped, } from './OssiUsageSummary'; import type { OssiMonthlyUsage } from './OssiMonthlyUsage'; import { OssiMonthlyUsageFromJSON, OssiMonthlyUsageFromJSONTyped, OssiMonthlyUsageToJSON, OssiMonthlyUsageToJSONTyped, } from './OssiMonthlyUsage'; /** * * @export * @interface OssiUsageHistoryDTO */ export interface OssiUsageHistoryDTO { /** * * @type {boolean} * @memberof OssiUsageHistoryDTO */ isEstimate?: boolean; /** * * @type {Array} * @memberof OssiUsageHistoryDTO */ months?: Array; /** * * @type {OssiUsageSummary} * @memberof OssiUsageHistoryDTO */ summary?: OssiUsageSummary; } /** * Check if a given object implements the OssiUsageHistoryDTO interface. */ export function instanceOfOssiUsageHistoryDTO(value: object): value is OssiUsageHistoryDTO { return true; } export function OssiUsageHistoryDTOFromJSON(json: any): OssiUsageHistoryDTO { return OssiUsageHistoryDTOFromJSONTyped(json, false); } export function OssiUsageHistoryDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OssiUsageHistoryDTO { if (json == null) { return json; } return { 'isEstimate': json['isEstimate'] == null ? undefined : json['isEstimate'], 'months': json['months'] == null ? undefined : ((json['months'] as Array).map(OssiMonthlyUsageFromJSON)), 'summary': json['summary'] == null ? undefined : OssiUsageSummaryFromJSON(json['summary']), }; } export function OssiUsageHistoryDTOToJSON(json: any): OssiUsageHistoryDTO { return OssiUsageHistoryDTOToJSONTyped(json, false); } export function OssiUsageHistoryDTOToJSONTyped(value?: OssiUsageHistoryDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'isEstimate': value['isEstimate'], 'months': value['months'] == null ? undefined : ((value['months'] as Array).map(OssiMonthlyUsageToJSON)), 'summary': OssiUsageSummaryToJSON(value['summary']), }; }