/* 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 { InventoryData } from './InventoryData.js'; import { InventoryDataFromJSON, InventoryDataFromJSONTyped, InventoryDataToJSON, InventoryDataToJSONTyped, } from './InventoryData.js'; /** * * @export * @interface Inventory */ export interface Inventory { /** * ID of the vCenter * @type {string} * @memberof Inventory */ vcenterId: string; /** * Map of cluster names to their inventory data * @type {{ [key: string]: InventoryData; }} * @memberof Inventory */ clusters: { [key: string]: InventoryData; }; /** * * @type {InventoryData} * @memberof Inventory */ vcenter?: InventoryData; } /** * Check if a given object implements the Inventory interface. */ export function instanceOfInventory(value: object): value is Inventory { if (!('vcenterId' in value) || value['vcenterId'] === undefined) return false; if (!('clusters' in value) || value['clusters'] === undefined) return false; return true; } export function InventoryFromJSON(json: any): Inventory { return InventoryFromJSONTyped(json, false); } export function InventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inventory { if (json == null) { return json; } return { 'vcenterId': json['vcenter_id'], 'clusters': (mapValues(json['clusters'], InventoryDataFromJSON)), 'vcenter': json['vcenter'] == null ? undefined : InventoryDataFromJSON(json['vcenter']), }; } export function InventoryToJSON(json: any): Inventory { return InventoryToJSONTyped(json, false); } export function InventoryToJSONTyped(value?: Inventory | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'vcenter_id': value['vcenterId'], 'clusters': (mapValues(value['clusters'], InventoryDataToJSON)), 'vcenter': InventoryDataToJSON(value['vcenter']), }; }