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 { ConnectorSyncProgressStateEnum } from './ConnectorSyncProgressStateEnum';
import {
ConnectorSyncProgressStateEnumFromJSON,
ConnectorSyncProgressStateEnumFromJSONTyped,
ConnectorSyncProgressStateEnumToJSON,
ConnectorSyncProgressStateEnumToJSONTyped,
} from './ConnectorSyncProgressStateEnum';
/**
*
* @export
* @interface ConnectorSyncProgress
*/
export interface ConnectorSyncProgress {
/**
*
* @type {ConnectorSyncProgressStateEnum}
* @memberof ConnectorSyncProgress
*/
state: ConnectorSyncProgressStateEnum;
/**
*
* @type {number}
* @memberof ConnectorSyncProgress
*/
totalEstimate: number | null;
/**
*
* @type {number}
* @memberof ConnectorSyncProgress
*/
observationsTotal: number | null;
/**
*
* @type {number}
* @memberof ConnectorSyncProgress
*/
imported: number;
/**
*
* @type {string}
* @memberof ConnectorSyncProgress
*/
countBasis: string;
/**
*
* @type {number}
* @memberof ConnectorSyncProgress
*/
tracesPerSecond: number | null;
/**
*
* @type {number}
* @memberof ConnectorSyncProgress
*/
estimatedSecondsRemaining: number | null;
/**
*
* @type {Date}
* @memberof ConnectorSyncProgress
*/
countedAt: Date | null;
/**
*
* @type {Date}
* @memberof ConnectorSyncProgress
*/
lastProgressAt: Date | null;
/**
*
* @type {Date}
* @memberof ConnectorSyncProgress
*/
retryAt: Date | null;
}
/**
* Check if a given object implements the ConnectorSyncProgress interface.
*/
export function instanceOfConnectorSyncProgress(value: object): value is ConnectorSyncProgress {
if (!('state' in value) || value['state'] === undefined) return false;
if (!('totalEstimate' in value) || value['totalEstimate'] === undefined) return false;
if (!('observationsTotal' in value) || value['observationsTotal'] === undefined) return false;
if (!('imported' in value) || value['imported'] === undefined) return false;
if (!('countBasis' in value) || value['countBasis'] === undefined) return false;
if (!('tracesPerSecond' in value) || value['tracesPerSecond'] === undefined) return false;
if (!('estimatedSecondsRemaining' in value) || value['estimatedSecondsRemaining'] === undefined) return false;
if (!('countedAt' in value) || value['countedAt'] === undefined) return false;
if (!('lastProgressAt' in value) || value['lastProgressAt'] === undefined) return false;
if (!('retryAt' in value) || value['retryAt'] === undefined) return false;
return true;
}
export function ConnectorSyncProgressFromJSON(json: any): ConnectorSyncProgress {
return ConnectorSyncProgressFromJSONTyped(json, false);
}
export function ConnectorSyncProgressFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectorSyncProgress {
if (json == null) {
return json;
}
return {
'state': ConnectorSyncProgressStateEnumFromJSON(json['state']),
'totalEstimate': json['total_estimate'],
'observationsTotal': json['observations_total'],
'imported': json['imported'],
'countBasis': json['count_basis'],
'tracesPerSecond': json['traces_per_second'],
'estimatedSecondsRemaining': json['estimated_seconds_remaining'],
'countedAt': (json['counted_at'] == null ? null : new Date(json['counted_at'])),
'lastProgressAt': (json['last_progress_at'] == null ? null : new Date(json['last_progress_at'])),
'retryAt': (json['retry_at'] == null ? null : new Date(json['retry_at'])),
};
}
export function ConnectorSyncProgressToJSON(json: any): ConnectorSyncProgress {
return ConnectorSyncProgressToJSONTyped(json, false);
}
export function ConnectorSyncProgressToJSONTyped(value?: ConnectorSyncProgress | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'state': ConnectorSyncProgressStateEnumToJSON(value['state']),
'total_estimate': value['totalEstimate'],
'observations_total': value['observationsTotal'],
'imported': value['imported'],
'count_basis': value['countBasis'],
'traces_per_second': value['tracesPerSecond'],
'estimated_seconds_remaining': value['estimatedSecondsRemaining'],
'counted_at': value['countedAt'] == null ? value['countedAt'] : value['countedAt'].toISOString(),
'last_progress_at': value['lastProgressAt'] == null ? value['lastProgressAt'] : value['lastProgressAt'].toISOString(),
'retry_at': value['retryAt'] == null ? value['retryAt'] : value['retryAt'].toISOString(),
};
}