Skip to content

The platform for continuously improving AI agents.

8.5 KB
Raw Blame
/* 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';
/**
 *
 * @export
 * @interface ExperimentPreview
 */
export interface ExperimentPreview {
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    id: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    pipeline: string | null;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    pipelineName: string | null;
    /**
     *
     * @type {number}
     * @memberof ExperimentPreview
     */
    revision: number | null;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    sourceDataset: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    sourceCell: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    sourceFingerprint: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    artifactCell: string | null;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    artifactFingerprint: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    provenance: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    execution: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    mode: string;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof ExperimentPreview
     */
    parameters: { [key: string]: any; };
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    binding: string | null;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof ExperimentPreview
     */
    operation: { [key: string]: any; } | null;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof ExperimentPreview
     */
    runner: { [key: string]: any; } | null;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    outputCell: string | null;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    state: string;
    /**
     *
     * @type {string}
     * @memberof ExperimentPreview
     */
    error: string;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof ExperimentPreview
     */
    result: { [key: string]: any; };
    /**
     *
     * @type {Date}
     * @memberof ExperimentPreview
     */
    createdAt: Date;
    /**
     *
     * @type {Date}
     * @memberof ExperimentPreview
     */
    updatedAt: Date;
    /**
     *
     * @type {Date}
     * @memberof ExperimentPreview
     */
    completedAt: Date | null;
    /**
     *
     * @type {number}
     * @memberof ExperimentPreview
     */
    pollAfterSeconds: number | null;
    /**
     *
     * @type {number}
     * @memberof ExperimentPreview
     */
    queueSeconds: number | null;
    /**
     *
     * @type {{ [key: string]: any; }}
     * @memberof ExperimentPreview
     */
    context?: { [key: string]: any; };
}

/**
 * Check if a given object implements the ExperimentPreview interface.
 */
export function instanceOfExperimentPreview(value: object): value is ExperimentPreview {
    if (!('id' in value) || value['id'] === undefined) return false;
    if (!('pipeline' in value) || value['pipeline'] === undefined) return false;
    if (!('pipelineName' in value) || value['pipelineName'] === undefined) return false;
    if (!('revision' in value) || value['revision'] === undefined) return false;
    if (!('sourceDataset' in value) || value['sourceDataset'] === undefined) return false;
    if (!('sourceCell' in value) || value['sourceCell'] === undefined) return false;
    if (!('sourceFingerprint' in value) || value['sourceFingerprint'] === undefined) return false;
    if (!('artifactCell' in value) || value['artifactCell'] === undefined) return false;
    if (!('artifactFingerprint' in value) || value['artifactFingerprint'] === undefined) return false;
    if (!('provenance' in value) || value['provenance'] === undefined) return false;
    if (!('execution' in value) || value['execution'] === undefined) return false;
    if (!('mode' in value) || value['mode'] === undefined) return false;
    if (!('parameters' in value) || value['parameters'] === undefined) return false;
    if (!('binding' in value) || value['binding'] === undefined) return false;
    if (!('operation' in value) || value['operation'] === undefined) return false;
    if (!('runner' in value) || value['runner'] === undefined) return false;
    if (!('outputCell' in value) || value['outputCell'] === undefined) return false;
    if (!('state' in value) || value['state'] === undefined) return false;
    if (!('error' in value) || value['error'] === undefined) return false;
    if (!('result' in value) || value['result'] === undefined) return false;
    if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
    if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
    if (!('completedAt' in value) || value['completedAt'] === undefined) return false;
    if (!('pollAfterSeconds' in value) || value['pollAfterSeconds'] === undefined) return false;
    if (!('queueSeconds' in value) || value['queueSeconds'] === undefined) return false;
    return true;
}

export function ExperimentPreviewFromJSON(json: any): ExperimentPreview {
    return ExperimentPreviewFromJSONTyped(json, false);
}

export function ExperimentPreviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExperimentPreview {
    if (json == null) {
        return json;
    }
    return {

        'id': json['id'],
        'pipeline': json['pipeline'],
        'pipelineName': json['pipeline_name'],
        'revision': json['revision'],
        'sourceDataset': json['source_dataset'],
        'sourceCell': json['source_cell'],
        'sourceFingerprint': json['source_fingerprint'],
        'artifactCell': json['artifact_cell'],
        'artifactFingerprint': json['artifact_fingerprint'],
        'provenance': json['provenance'],
        'execution': json['execution'],
        'mode': json['mode'],
        'parameters': json['parameters'],
        'binding': json['binding'],
        'operation': json['operation'],
        'runner': json['runner'],
        'outputCell': json['output_cell'],
        'state': json['state'],
        'error': json['error'],
        'result': json['result'],
        'createdAt': (new Date(json['created_at'])),
        'updatedAt': (new Date(json['updated_at'])),
        'completedAt': (json['completed_at'] == null ? null : new Date(json['completed_at'])),
        'pollAfterSeconds': json['poll_after_seconds'],
        'queueSeconds': json['queue_seconds'],
        'context': json['context'] == null ? undefined : json['context'],
    };
}

export function ExperimentPreviewToJSON(json: any): ExperimentPreview {
    return ExperimentPreviewToJSONTyped(json, false);
}

export function ExperimentPreviewToJSONTyped(value?: ExperimentPreview | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {

        'id': value['id'],
        'pipeline': value['pipeline'],
        'pipeline_name': value['pipelineName'],
        'revision': value['revision'],
        'source_dataset': value['sourceDataset'],
        'source_cell': value['sourceCell'],
        'source_fingerprint': value['sourceFingerprint'],
        'artifact_cell': value['artifactCell'],
        'artifact_fingerprint': value['artifactFingerprint'],
        'provenance': value['provenance'],
        'execution': value['execution'],
        'mode': value['mode'],
        'parameters': value['parameters'],
        'binding': value['binding'],
        'operation': value['operation'],
        'runner': value['runner'],
        'output_cell': value['outputCell'],
        'state': value['state'],
        'error': value['error'],
        'result': value['result'],
        'created_at': value['createdAt'].toISOString(),
        'updated_at': value['updatedAt'].toISOString(),
        'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
        'poll_after_seconds': value['pollAfterSeconds'],
        'queue_seconds': value['queueSeconds'],
        'context': value['context'],
    };
}