/* 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 { Agent } from './Agent'; import { AgentFromJSON, AgentFromJSONTyped, AgentToJSON, } from './Agent'; import type { Inventory } from './Inventory'; import { InventoryFromJSON, InventoryFromJSONTyped, InventoryToJSON, } from './Inventory'; /** * * @export * @interface Source */ export interface Source { /** * * @type {string} * @memberof Source */ id: string; /** * * @type {string} * @memberof Source */ name: string; /** * * @type {Inventory} * @memberof Source */ inventory?: Inventory; /** * * @type {Date} * @memberof Source */ createdAt: Date; /** * * @type {Date} * @memberof Source */ updatedAt: Date; /** * * @type {boolean} * @memberof Source */ onPremises: boolean; /** * * @type {Agent} * @memberof Source */ agent?: Agent; } /** * Check if a given object implements the Source interface. */ export function instanceOfSource(value: object): value is Source { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false; if (!('onPremises' in value) || value['onPremises'] === undefined) return false; return true; } export function SourceFromJSON(json: any): Source { return SourceFromJSONTyped(json, false); } export function SourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Source { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'inventory': json['inventory'] == null ? undefined : InventoryFromJSON(json['inventory']), 'createdAt': (new Date(json['createdAt'])), 'updatedAt': (new Date(json['updatedAt'])), 'onPremises': json['onPremises'], 'agent': json['agent'] == null ? undefined : AgentFromJSON(json['agent']), }; } export function SourceToJSON(value?: Source | null): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'inventory': InventoryToJSON(value['inventory']), 'createdAt': ((value['createdAt']).toISOString()), 'updatedAt': ((value['updatedAt']).toISOString()), 'onPremises': value['onPremises'], 'agent': AgentToJSON(value['agent']), }; }