/* 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 { MigrationIssue } from './MigrationIssue.js'; import { MigrationIssueFromJSON, MigrationIssueFromJSONTyped, MigrationIssueToJSON, MigrationIssueToJSONTyped, } from './MigrationIssue.js'; import type { OsInfo } from './OsInfo.js'; import { OsInfoFromJSON, OsInfoFromJSONTyped, OsInfoToJSON, OsInfoToJSONTyped, } from './OsInfo.js'; import type { DiskSizeTierSummary } from './DiskSizeTierSummary.js'; import { DiskSizeTierSummaryFromJSON, DiskSizeTierSummaryFromJSONTyped, DiskSizeTierSummaryToJSON, DiskSizeTierSummaryToJSONTyped, } from './DiskSizeTierSummary.js'; import type { DiskTypeSummary } from './DiskTypeSummary.js'; import { DiskTypeSummaryFromJSON, DiskTypeSummaryFromJSONTyped, DiskTypeSummaryToJSON, DiskTypeSummaryToJSONTyped, } from './DiskTypeSummary.js'; import type { VMResourceBreakdown } from './VMResourceBreakdown.js'; import { VMResourceBreakdownFromJSON, VMResourceBreakdownFromJSONTyped, VMResourceBreakdownToJSON, VMResourceBreakdownToJSONTyped, } from './VMResourceBreakdown.js'; /** * * @export * @interface VMs */ export interface VMs { /** * * @type {number} * @memberof VMs */ total: number; /** * * @type {number} * @memberof VMs */ totalMigratable: number; /** * * @type {number} * @memberof VMs */ totalMigratableWithWarnings?: number; /** * Number of VMs that have at least one shared disk * @type {number} * @memberof VMs */ totalWithSharedDisks?: number; /** * * @type {VMResourceBreakdown} * @memberof VMs */ cpuCores: VMResourceBreakdown; /** * * @type {{ [key: string]: DiskSizeTierSummary; }} * @memberof VMs */ diskSizeTier?: { [key: string]: DiskSizeTierSummary; }; /** * Distribution of VMs across disk-complexity tiers used by the estimation engine (0-10TiB, 10-20TiB, 20-50TiB, 50+TiB). * * @type {{ [key: string]: DiskSizeTierSummary; }} * @memberof VMs */ diskComplexityTier?: { [key: string]: DiskSizeTierSummary; }; /** * * @type {{ [key: string]: DiskTypeSummary; }} * @memberof VMs */ diskTypes?: { [key: string]: DiskTypeSummary; }; /** * Distribution of VMs across CPU tier buckets (e.g., "0-4", "5-8", "9-16", "17-32", "32+") * @type {{ [key: string]: number; }} * @memberof VMs */ distributionByCpuTier?: { [key: string]: number; }; /** * Distribution of VMs across Memory tier buckets (e.g., "0-4", "5-16", "17-32", "33-64", "65-128", "129-256", "256+") * @type {{ [key: string]: number; }} * @memberof VMs */ distributionByMemoryTier?: { [key: string]: number; }; /** * Distribution of VMs by NIC count (e.g., "0", "1", "2", "3", "4+") * @type {{ [key: string]: number; }} * @memberof VMs */ distributionByNicCount?: { [key: string]: number; }; /** * Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove) * @type {{ [key: string]: number; }} * @memberof VMs * @deprecated */ distributionByComplexity?: { [key: string]: number; }; /** * Distribution of VMs by migration complexity level, enriched with total disk size per level. Supersedes distributionByComplexity. * @type {{ [key: string]: DiskSizeTierSummary; }} * @memberof VMs */ complexityDistribution?: { [key: string]: DiskSizeTierSummary; }; /** * * @type {VMResourceBreakdown} * @memberof VMs */ ramGB: VMResourceBreakdown; /** * * @type {VMResourceBreakdown} * @memberof VMs */ diskGB: VMResourceBreakdown; /** * * @type {VMResourceBreakdown} * @memberof VMs */ diskCount: VMResourceBreakdown; /** * * @type {VMResourceBreakdown} * @memberof VMs */ nicCount?: VMResourceBreakdown; /** * * @type {{ [key: string]: number; }} * @memberof VMs */ powerStates: { [key: string]: number; }; /** * * @type {{ [key: string]: number; }} * @memberof VMs * @deprecated */ os?: { [key: string]: number; }; /** * * @type {{ [key: string]: OsInfo; }} * @memberof VMs */ osInfo?: { [key: string]: OsInfo; }; /** * * @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 (!('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'], 'totalWithSharedDisks': json['totalWithSharedDisks'] == null ? undefined : json['totalWithSharedDisks'], 'cpuCores': VMResourceBreakdownFromJSON(json['cpuCores']), 'diskSizeTier': json['diskSizeTier'] == null ? undefined : (mapValues(json['diskSizeTier'], DiskSizeTierSummaryFromJSON)), 'diskComplexityTier': json['diskComplexityTier'] == null ? undefined : (mapValues(json['diskComplexityTier'], DiskSizeTierSummaryFromJSON)), 'diskTypes': json['diskTypes'] == null ? undefined : (mapValues(json['diskTypes'], DiskTypeSummaryFromJSON)), 'distributionByCpuTier': json['distributionByCpuTier'] == null ? undefined : json['distributionByCpuTier'], 'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'], 'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'], 'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'], 'complexityDistribution': json['complexityDistribution'] == null ? undefined : (mapValues(json['complexityDistribution'], DiskSizeTierSummaryFromJSON)), 'ramGB': VMResourceBreakdownFromJSON(json['ramGB']), 'diskGB': VMResourceBreakdownFromJSON(json['diskGB']), 'diskCount': VMResourceBreakdownFromJSON(json['diskCount']), 'nicCount': json['nicCount'] == null ? undefined : VMResourceBreakdownFromJSON(json['nicCount']), 'powerStates': json['powerStates'], 'os': json['os'] == null ? undefined : json['os'], 'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)), 'notMigratableReasons': ((json['notMigratableReasons'] as Array).map(MigrationIssueFromJSON)), 'migrationWarnings': ((json['migrationWarnings'] as Array).map(MigrationIssueFromJSON)), }; } export function VMsToJSON(json: any): VMs { return VMsToJSONTyped(json, false); } export function VMsToJSONTyped(value?: VMs | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'total': value['total'], 'totalMigratable': value['totalMigratable'], 'totalMigratableWithWarnings': value['totalMigratableWithWarnings'], 'totalWithSharedDisks': value['totalWithSharedDisks'], 'cpuCores': VMResourceBreakdownToJSON(value['cpuCores']), 'diskSizeTier': value['diskSizeTier'] == null ? undefined : (mapValues(value['diskSizeTier'], DiskSizeTierSummaryToJSON)), 'diskComplexityTier': value['diskComplexityTier'] == null ? undefined : (mapValues(value['diskComplexityTier'], DiskSizeTierSummaryToJSON)), 'diskTypes': value['diskTypes'] == null ? undefined : (mapValues(value['diskTypes'], DiskTypeSummaryToJSON)), 'distributionByCpuTier': value['distributionByCpuTier'], 'distributionByMemoryTier': value['distributionByMemoryTier'], 'distributionByNicCount': value['distributionByNicCount'], 'distributionByComplexity': value['distributionByComplexity'], 'complexityDistribution': value['complexityDistribution'] == null ? undefined : (mapValues(value['complexityDistribution'], DiskSizeTierSummaryToJSON)), 'ramGB': VMResourceBreakdownToJSON(value['ramGB']), 'diskGB': VMResourceBreakdownToJSON(value['diskGB']), 'diskCount': VMResourceBreakdownToJSON(value['diskCount']), 'nicCount': VMResourceBreakdownToJSON(value['nicCount']), 'powerStates': value['powerStates'], 'os': value['os'], 'osInfo': value['osInfo'] == null ? undefined : (mapValues(value['osInfo'], OsInfoToJSON)), 'notMigratableReasons': ((value['notMigratableReasons'] as Array).map(MigrationIssueToJSON)), 'migrationWarnings': ((value['migrationWarnings'] as Array).map(MigrationIssueToJSON)), }; }