/* 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 { VirtualMachine } from './VirtualMachine.js'; import { VirtualMachineFromJSON, VirtualMachineFromJSONTyped, VirtualMachineToJSON, VirtualMachineToJSONTyped, } from './VirtualMachine.js'; /** * * @export * @interface VirtualMachineListResponse */ export interface VirtualMachineListResponse { /** * * @type {Array} * @memberof VirtualMachineListResponse */ vms: Array; /** * Total number of VMs matching the filter * @type {number} * @memberof VirtualMachineListResponse */ total: number; /** * Current page number * @type {number} * @memberof VirtualMachineListResponse */ page: number; /** * Total number of pages * @type {number} * @memberof VirtualMachineListResponse */ pageCount: number; } /** * Check if a given object implements the VirtualMachineListResponse interface. */ export function instanceOfVirtualMachineListResponse(value: object): value is VirtualMachineListResponse { if (!('vms' in value) || value['vms'] === undefined) return false; if (!('total' in value) || value['total'] === undefined) return false; if (!('page' in value) || value['page'] === undefined) return false; if (!('pageCount' in value) || value['pageCount'] === undefined) return false; return true; } export function VirtualMachineListResponseFromJSON(json: any): VirtualMachineListResponse { return VirtualMachineListResponseFromJSONTyped(json, false); } export function VirtualMachineListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VirtualMachineListResponse { if (json == null) { return json; } return { 'vms': ((json['vms'] as Array).map(VirtualMachineFromJSON)), 'total': json['total'], 'page': json['page'], 'pageCount': json['pageCount'], }; } export function VirtualMachineListResponseToJSON(json: any): VirtualMachineListResponse { return VirtualMachineListResponseToJSONTyped(json, false); } export function VirtualMachineListResponseToJSONTyped(value?: VirtualMachineListResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'vms': ((value['vms'] as Array).map(VirtualMachineToJSON)), 'total': value['total'], 'page': value['page'], 'pageCount': value['pageCount'], }; }