/* 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'; /** * * @export * @interface Agent */ export interface Agent { /** * * @type {string} * @memberof Agent */ id: string; /** * * @type {string} * @memberof Agent */ status: AgentStatusEnum; /** * * @type {string} * @memberof Agent */ statusInfo: string; /** * * @type {string} * @memberof Agent */ credentialUrl: string; /** * * @type {Date} * @memberof Agent */ createdAt: Date; /** * * @type {Date} * @memberof Agent */ updatedAt: Date; /** * * @type {string} * @memberof Agent */ version: string; } /** * @export */ export const AgentStatusEnum = { NotConnected: 'not-connected', WaitingForCredentials: 'waiting-for-credentials', Error: 'error', GatheringInitialInventory: 'gathering-initial-inventory', UpToDate: 'up-to-date', SourceGone: 'source-gone' } as const; export type AgentStatusEnum = typeof AgentStatusEnum[keyof typeof AgentStatusEnum]; /** * Check if a given object implements the Agent interface. */ export function instanceOfAgent(value: object): value is Agent { if (!('id' in value) || value['id'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('statusInfo' in value) || value['statusInfo'] === undefined) return false; if (!('credentialUrl' in value) || value['credentialUrl'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false; if (!('version' in value) || value['version'] === undefined) return false; return true; } export function AgentFromJSON(json: any): Agent { return AgentFromJSONTyped(json, false); } export function AgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Agent { if (json == null) { return json; } return { 'id': json['id'], 'status': json['status'], 'statusInfo': json['statusInfo'], 'credentialUrl': json['credentialUrl'], 'createdAt': (new Date(json['createdAt'])), 'updatedAt': (new Date(json['updatedAt'])), 'version': json['version'], }; } export function AgentToJSON(value?: Agent | null): any { if (value == null) { return value; } return { 'id': value['id'], 'status': value['status'], 'statusInfo': value['statusInfo'], 'credentialUrl': value['credentialUrl'], 'createdAt': ((value['createdAt']).toISOString()), 'updatedAt': ((value['updatedAt']).toISOString()), 'version': value['version'], }; }