/* tslint:disable */ /* eslint-disable */ /** * Migration Planner API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: undefined * * * 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 { MigrationIssuesInner } from './MigrationIssuesInner'; import { MigrationIssuesInnerFromJSON, MigrationIssuesInnerFromJSONTyped, MigrationIssuesInnerToJSON, } from './MigrationIssuesInner'; import type { VMResourceBreakdown } from './VMResourceBreakdown'; import { VMResourceBreakdownFromJSON, VMResourceBreakdownFromJSONTyped, VMResourceBreakdownToJSON, } from './VMResourceBreakdown'; /** * * @export * @interface VMs */ export interface VMs { /** * * @type {number} * @memberof VMs */ total: number; /** * * @type {number} * @memberof VMs */ totalMigratable: number; /** * * @type {number} * @memberof VMs */ totalMigratableWithWarnings?: number; /** * * @type {VMResourceBreakdown} * @memberof VMs */ cpuCores: VMResourceBreakdown; /** * * @type {VMResourceBreakdown} * @memberof VMs */ ramGB: VMResourceBreakdown; /** * * @type {VMResourceBreakdown} * @memberof VMs */ diskGB: VMResourceBreakdown; /** * * @type {VMResourceBreakdown} * @memberof VMs */ diskCount: VMResourceBreakdown; /** * * @type {{ [key: string]: number; }} * @memberof VMs */ powerStates: { [key: string]: number; }; /** * * @type {{ [key: string]: number; }} * @memberof VMs */ os: { [key: string]: number; }; /** * * @type {Array} * @memberof VMs */ notMigratableReasons: Array; /** * * @type {Array} * @memberof VMs */ migrationWarnings: Array; } /** * Check if a given object implements the VMs interface. */ export function instanceOfVMs(value: object): value is VMs { if (!('total' in value) || value['total'] === undefined) return false; if (!('totalMigratable' in value) || value['totalMigratable'] === undefined) return false; if (!('cpuCores' in value) || value['cpuCores'] === undefined) return false; if (!('ramGB' in value) || value['ramGB'] === undefined) return false; if (!('diskGB' in value) || value['diskGB'] === undefined) return false; if (!('diskCount' in value) || value['diskCount'] === undefined) return false; if (!('powerStates' in value) || value['powerStates'] === undefined) return false; if (!('os' in value) || value['os'] === undefined) return false; if (!('notMigratableReasons' in value) || value['notMigratableReasons'] === undefined) return false; if (!('migrationWarnings' in value) || value['migrationWarnings'] === undefined) return false; return true; } export function VMsFromJSON(json: any): VMs { return VMsFromJSONTyped(json, false); } export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs { if (json == null) { return json; } return { 'total': json['total'], 'totalMigratable': json['totalMigratable'], 'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'], 'cpuCores': json['cpuCores'], 'ramGB': json['ramGB'], 'diskGB': json['diskGB'], 'diskCount': json['diskCount'], 'powerStates': json['powerStates'], 'os': json['os'], 'notMigratableReasons': ((json['notMigratableReasons'] as Array).map(MigrationIssuesInnerFromJSON)), 'migrationWarnings': ((json['migrationWarnings'] as Array).map(MigrationIssuesInnerFromJSON)), }; } export function VMsToJSON(value?: VMs | null): any { if (value == null) { return value; } return { 'total': value['total'], 'totalMigratable': value['totalMigratable'], 'totalMigratableWithWarnings': value['totalMigratableWithWarnings'], 'cpuCores': value['cpuCores'], 'ramGB': value['ramGB'], 'diskGB': value['diskGB'], 'diskCount': value['diskCount'], 'powerStates': value['powerStates'], 'os': value['os'], 'notMigratableReasons': ((value['notMigratableReasons'] as Array).map(MigrationIssuesInnerToJSON)), 'migrationWarnings': ((value['migrationWarnings'] as Array).map(MigrationIssuesInnerToJSON)), }; }