/* 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 { InfraNetworksInner } from './InfraNetworksInner'; import { InfraNetworksInnerFromJSON, InfraNetworksInnerFromJSONTyped, InfraNetworksInnerToJSON, } from './InfraNetworksInner'; import type { InfraDatastoresInner } from './InfraDatastoresInner'; import { InfraDatastoresInnerFromJSON, InfraDatastoresInnerFromJSONTyped, InfraDatastoresInnerToJSON, } from './InfraDatastoresInner'; /** * * @export * @interface Infra */ export interface Infra { /** * * @type {number} * @memberof Infra */ totalHosts: number; /** * * @type {number} * @memberof Infra */ totalClusters: number; /** * * @type {Array} * @memberof Infra */ hostsPerCluster: Array; /** * * @type {{ [key: string]: number; }} * @memberof Infra */ hostPowerStates: { [key: string]: number; }; /** * * @type {Array} * @memberof Infra */ networks: Array; /** * * @type {Array} * @memberof Infra */ datastores: Array; } /** * Check if a given object implements the Infra interface. */ export function instanceOfInfra(value: object): value is Infra { if (!('totalHosts' in value) || value['totalHosts'] === undefined) return false; if (!('totalClusters' in value) || value['totalClusters'] === undefined) return false; if (!('hostsPerCluster' in value) || value['hostsPerCluster'] === undefined) return false; if (!('hostPowerStates' in value) || value['hostPowerStates'] === undefined) return false; if (!('networks' in value) || value['networks'] === undefined) return false; if (!('datastores' in value) || value['datastores'] === undefined) return false; return true; } export function InfraFromJSON(json: any): Infra { return InfraFromJSONTyped(json, false); } export function InfraFromJSONTyped(json: any, ignoreDiscriminator: boolean): Infra { if (json == null) { return json; } return { 'totalHosts': json['totalHosts'], 'totalClusters': json['totalClusters'], 'hostsPerCluster': json['hostsPerCluster'], 'hostPowerStates': json['hostPowerStates'], 'networks': ((json['networks'] as Array).map(InfraNetworksInnerFromJSON)), 'datastores': ((json['datastores'] as Array).map(InfraDatastoresInnerFromJSON)), }; } export function InfraToJSON(value?: Infra | null): any { if (value == null) { return value; } return { 'totalHosts': value['totalHosts'], 'totalClusters': value['totalClusters'], 'hostsPerCluster': value['hostsPerCluster'], 'hostPowerStates': value['hostPowerStates'], 'networks': ((value['networks'] as Array).map(InfraNetworksInnerToJSON)), 'datastores': ((value['datastores'] as Array).map(InfraDatastoresInnerToJSON)), }; }