/* tslint:disable */ /* eslint-disable */ /** * Assisted Migration Agent API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v1 * * * 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.js'; import type { Histogram } from './Histogram.js'; import { HistogramFromJSON, HistogramFromJSONTyped, HistogramToJSON, HistogramToJSONTyped, } from './Histogram.js'; /** * * @export * @interface VMResourceBreakdown */ export interface VMResourceBreakdown { /** * * @type {number} * @memberof VMResourceBreakdown */ total: number; /** * * @type {number} * @memberof VMResourceBreakdown */ totalForMigratable: number; /** * * @type {number} * @memberof VMResourceBreakdown */ totalForMigratableWithWarnings: number; /** * * @type {number} * @memberof VMResourceBreakdown */ totalForNotMigratable: number; /** * * @type {Histogram} * @memberof VMResourceBreakdown * @deprecated */ histogram?: Histogram; } /** * Check if a given object implements the VMResourceBreakdown interface. */ export function instanceOfVMResourceBreakdown(value: object): value is VMResourceBreakdown { if (!('total' in value) || value['total'] === undefined) return false; if (!('totalForMigratable' in value) || value['totalForMigratable'] === undefined) return false; if (!('totalForMigratableWithWarnings' in value) || value['totalForMigratableWithWarnings'] === undefined) return false; if (!('totalForNotMigratable' in value) || value['totalForNotMigratable'] === undefined) return false; return true; } export function VMResourceBreakdownFromJSON(json: any): VMResourceBreakdown { return VMResourceBreakdownFromJSONTyped(json, false); } export function VMResourceBreakdownFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMResourceBreakdown { if (json == null) { return json; } return { 'total': json['total'], 'totalForMigratable': json['totalForMigratable'], 'totalForMigratableWithWarnings': json['totalForMigratableWithWarnings'], 'totalForNotMigratable': json['totalForNotMigratable'], 'histogram': json['histogram'] == null ? undefined : HistogramFromJSON(json['histogram']), }; } export function VMResourceBreakdownToJSON(json: any): VMResourceBreakdown { return VMResourceBreakdownToJSONTyped(json, false); } export function VMResourceBreakdownToJSONTyped(value?: VMResourceBreakdown | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'total': value['total'], 'totalForMigratable': value['totalForMigratable'], 'totalForMigratableWithWarnings': value['totalForMigratableWithWarnings'], 'totalForNotMigratable': value['totalForNotMigratable'], 'histogram': HistogramToJSON(value['histogram']), }; }