The platform for continuously improving AI agents.
/* tslint:disable */
/* eslint-disable */
/**
* Overbae API
* Backend API for the Overclaw / Overmind platform.
*
* The version of the OpenAPI document: 2.0.0
*
*
* 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 { AuthorEnum } from './AuthorEnum';
import {
AuthorEnumFromJSON,
AuthorEnumFromJSONTyped,
AuthorEnumToJSON,
AuthorEnumToJSONTyped,
} from './AuthorEnum';
import type { TrainingControlStateEnum } from './TrainingControlStateEnum';
import {
TrainingControlStateEnumFromJSON,
TrainingControlStateEnumFromJSONTyped,
TrainingControlStateEnumToJSON,
TrainingControlStateEnumToJSONTyped,
} from './TrainingControlStateEnum';
/**
*
* @export
* @interface TrainingControl
*/
export interface TrainingControl {
/**
*
* @type {string}
* @memberof TrainingControl
*/
readonly id: string;
/**
*
* @type {string}
* @memberof TrainingControl
*/
operation: string;
/**
*
* @type {any}
* @memberof TrainingControl
*/
arguments?: any | null;
/**
*
* @type {AuthorEnum}
* @memberof TrainingControl
*/
author: AuthorEnum;
/**
*
* @type {string}
* @memberof TrainingControl
*/
userEmail?: string | null;
/**
*
* @type {string}
* @memberof TrainingControl
*/
reason?: string;
/**
*
* @type {TrainingControlStateEnum}
* @memberof TrainingControl
*/
state?: TrainingControlStateEnum;
/**
*
* @type {number}
* @memberof TrainingControl
*/
step?: number | null;
/**
*
* @type {any}
* @memberof TrainingControl
*/
result?: any | null;
/**
*
* @type {Date}
* @memberof TrainingControl
*/
readonly createdAt: Date;
/**
*
* @type {Date}
* @memberof TrainingControl
*/
resolvedAt?: Date | null;
}
/**
* Check if a given object implements the TrainingControl interface.
*/
export function instanceOfTrainingControl(value: object): value is TrainingControl {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('operation' in value) || value['operation'] === undefined) return false;
if (!('author' in value) || value['author'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
return true;
}
export function TrainingControlFromJSON(json: any): TrainingControl {
return TrainingControlFromJSONTyped(json, false);
}
export function TrainingControlFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrainingControl {
if (json == null) {
return json;
}
return {
'id': json['id'],
'operation': json['operation'],
'arguments': json['arguments'] == null ? undefined : json['arguments'],
'author': AuthorEnumFromJSON(json['author']),
'userEmail': json['user_email'] == null ? undefined : json['user_email'],
'reason': json['reason'] == null ? undefined : json['reason'],
'state': json['state'] == null ? undefined : TrainingControlStateEnumFromJSON(json['state']),
'step': json['step'] == null ? undefined : json['step'],
'result': json['result'] == null ? undefined : json['result'],
'createdAt': (new Date(json['created_at'])),
'resolvedAt': json['resolved_at'] == null ? undefined : (new Date(json['resolved_at'])),
};
}
export function TrainingControlToJSON(json: any): TrainingControl {
return TrainingControlToJSONTyped(json, false);
}
export function TrainingControlToJSONTyped(value?: Omit<TrainingControl, 'id'|'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'operation': value['operation'],
'arguments': value['arguments'],
'author': AuthorEnumToJSON(value['author']),
'user_email': value['userEmail'],
'reason': value['reason'],
'state': TrainingControlStateEnumToJSON(value['state']),
'step': value['step'],
'result': value['result'],
'resolved_at': value['resolvedAt'] == null ? value['resolvedAt'] : value['resolvedAt'].toISOString(),
};
}