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 { ConnectorSyncProgress } from './ConnectorSyncProgress';
import {
ConnectorSyncProgressFromJSON,
ConnectorSyncProgressFromJSONTyped,
ConnectorSyncProgressToJSON,
ConnectorSyncProgressToJSONTyped,
} from './ConnectorSyncProgress';
import type { ApiVersionEnum } from './ApiVersionEnum';
import {
ApiVersionEnumFromJSON,
ApiVersionEnumFromJSONTyped,
ApiVersionEnumToJSON,
ApiVersionEnumToJSONTyped,
} from './ApiVersionEnum';
import type { ConnectorActiveConfig } from './ConnectorActiveConfig';
import {
ConnectorActiveConfigFromJSON,
ConnectorActiveConfigFromJSONTyped,
ConnectorActiveConfigToJSON,
ConnectorActiveConfigToJSONTyped,
} from './ConnectorActiveConfig';
import type { ConnectorTypeEnum } from './ConnectorTypeEnum';
import {
ConnectorTypeEnumFromJSON,
ConnectorTypeEnumFromJSONTyped,
ConnectorTypeEnumToJSON,
ConnectorTypeEnumToJSONTyped,
} from './ConnectorTypeEnum';
import type { SyncStatusEnum } from './SyncStatusEnum';
import {
SyncStatusEnumFromJSON,
SyncStatusEnumFromJSONTyped,
SyncStatusEnumToJSON,
SyncStatusEnumToJSONTyped,
} from './SyncStatusEnum';
/**
*
* @export
* @interface ConnectorCredential
*/
export interface ConnectorCredential {
/**
*
* @type {string}
* @memberof ConnectorCredential
*/
readonly id: string;
/**
*
* @type {string}
* @memberof ConnectorCredential
*/
project: string;
/**
*
* @type {string}
* @memberof ConnectorCredential
*/
name: string;
/**
*
* @type {ConnectorTypeEnum}
* @memberof ConnectorCredential
*/
connectorType: ConnectorTypeEnum;
/**
*
* @type {string}
* @memberof ConnectorCredential
*/
baseUrl?: string;
/**
*
* @type {string}
* @memberof ConnectorCredential
*/
readonly apiKeyHint: string;
/**
*
* @type {boolean}
* @memberof ConnectorCredential
*/
readonly isActive: boolean;
/**
*
* @type {boolean}
* @memberof ConnectorCredential
*/
autoSyncEnabled?: boolean;
/**
*
* @type {number}
* @memberof ConnectorCredential
*/
pollIntervalSeconds?: number;
/**
*
* @type {Date}
* @memberof ConnectorCredential
*/
readonly lastSyncedAt: Date | null;
/**
*
* @type {SyncStatusEnum}
* @memberof ConnectorCredential
*/
readonly syncStatus: SyncStatusEnum;
/**
*
* @type {number}
* @memberof ConnectorCredential
*/
readonly backfillImported: number;
/**
*
* @type {number}
* @memberof ConnectorCredential
*/
readonly backfillTotal: number | null;
/**
*
* @type {ConnectorSyncProgress}
* @memberof ConnectorCredential
*/
readonly syncProgress: ConnectorSyncProgress | null;
/**
*
* @type {string}
* @memberof ConnectorCredential
*/
readonly syncError: string;
/**
*
* @type {ApiVersionEnum}
* @memberof ConnectorCredential
*/
readonly apiVersion: ApiVersionEnum;
/**
*
* @type {Date}
* @memberof ConnectorCredential
*/
readonly verifiedAt: Date | null;
/**
*
* @type {number}
* @memberof ConnectorCredential
*/
readonly totalSpansImported: number;
/**
*
* @type {number}
* @memberof ConnectorCredential
*/
readonly totalTracesImported: number;
/**
*
* @type {Date}
* @memberof ConnectorCredential
*/
readonly nextPollAt: Date | null;
/**
*
* @type {any}
* @memberof ConnectorCredential
*/
readonly capabilityMapping: any | null;
/**
*
* @type {ConnectorActiveConfig}
* @memberof ConnectorCredential
*/
readonly activeConfig: ConnectorActiveConfig | null;
/**
*
* @type {Date}
* @memberof ConnectorCredential
*/
readonly createdAt: Date;
/**
*
* @type {Date}
* @memberof ConnectorCredential
*/
readonly updatedAt: Date;
}
/**
* Check if a given object implements the ConnectorCredential interface.
*/
export function instanceOfConnectorCredential(value: object): value is ConnectorCredential {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('project' in value) || value['project'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
if (!('connectorType' in value) || value['connectorType'] === undefined) return false;
if (!('apiKeyHint' in value) || value['apiKeyHint'] === undefined) return false;
if (!('isActive' in value) || value['isActive'] === undefined) return false;
if (!('lastSyncedAt' in value) || value['lastSyncedAt'] === undefined) return false;
if (!('syncStatus' in value) || value['syncStatus'] === undefined) return false;
if (!('backfillImported' in value) || value['backfillImported'] === undefined) return false;
if (!('backfillTotal' in value) || value['backfillTotal'] === undefined) return false;
if (!('syncProgress' in value) || value['syncProgress'] === undefined) return false;
if (!('syncError' in value) || value['syncError'] === undefined) return false;
if (!('apiVersion' in value) || value['apiVersion'] === undefined) return false;
if (!('verifiedAt' in value) || value['verifiedAt'] === undefined) return false;
if (!('totalSpansImported' in value) || value['totalSpansImported'] === undefined) return false;
if (!('totalTracesImported' in value) || value['totalTracesImported'] === undefined) return false;
if (!('nextPollAt' in value) || value['nextPollAt'] === undefined) return false;
if (!('capabilityMapping' in value) || value['capabilityMapping'] === undefined) return false;
if (!('activeConfig' in value) || value['activeConfig'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
return true;
}
export function ConnectorCredentialFromJSON(json: any): ConnectorCredential {
return ConnectorCredentialFromJSONTyped(json, false);
}
export function ConnectorCredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectorCredential {
if (json == null) {
return json;
}
return {
'id': json['id'],
'project': json['project'],
'name': json['name'],
'connectorType': ConnectorTypeEnumFromJSON(json['connector_type']),
'baseUrl': json['base_url'] == null ? undefined : json['base_url'],
'apiKeyHint': json['api_key_hint'],
'isActive': json['is_active'],
'autoSyncEnabled': json['auto_sync_enabled'] == null ? undefined : json['auto_sync_enabled'],
'pollIntervalSeconds': json['poll_interval_seconds'] == null ? undefined : json['poll_interval_seconds'],
'lastSyncedAt': (json['last_synced_at'] == null ? null : new Date(json['last_synced_at'])),
'syncStatus': SyncStatusEnumFromJSON(json['sync_status']),
'backfillImported': json['backfill_imported'],
'backfillTotal': json['backfill_total'],
'syncProgress': ConnectorSyncProgressFromJSON(json['sync_progress']),
'syncError': json['sync_error'],
'apiVersion': ApiVersionEnumFromJSON(json['api_version']),
'verifiedAt': (json['verified_at'] == null ? null : new Date(json['verified_at'])),
'totalSpansImported': json['total_spans_imported'],
'totalTracesImported': json['total_traces_imported'],
'nextPollAt': (json['next_poll_at'] == null ? null : new Date(json['next_poll_at'])),
'capabilityMapping': json['capability_mapping'],
'activeConfig': ConnectorActiveConfigFromJSON(json['active_config']),
'createdAt': (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
};
}
export function ConnectorCredentialToJSON(json: any): ConnectorCredential {
return ConnectorCredentialToJSONTyped(json, false);
}
export function ConnectorCredentialToJSONTyped(value?: Omit<ConnectorCredential, 'id'|'api_key_hint'|'is_active'|'last_synced_at'|'sync_status'|'backfill_imported'|'backfill_total'|'sync_progress'|'sync_error'|'api_version'|'verified_at'|'total_spans_imported'|'total_traces_imported'|'next_poll_at'|'capability_mapping'|'active_config'|'created_at'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'project': value['project'],
'name': value['name'],
'connector_type': ConnectorTypeEnumToJSON(value['connectorType']),
'base_url': value['baseUrl'],
'auto_sync_enabled': value['autoSyncEnabled'],
'poll_interval_seconds': value['pollIntervalSeconds'],
};
}