Skip to content

The platform for continuously improving AI agents.

3.2 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';
import type { ExperimentTrigger } from './ExperimentTrigger';
import {
    ExperimentTriggerFromJSON,
    ExperimentTriggerFromJSONTyped,
    ExperimentTriggerToJSON,
    ExperimentTriggerToJSONTyped,
} from './ExperimentTrigger';
import type { ExperimentFire } from './ExperimentFire';
import {
    ExperimentFireFromJSON,
    ExperimentFireFromJSONTyped,
    ExperimentFireToJSON,
    ExperimentFireToJSONTyped,
} from './ExperimentFire';

/**
 *
 * @export
 * @interface ExperimentAutomation
 */
export interface ExperimentAutomation {
    /**
     *
     * @type {Array<ExperimentTrigger>}
     * @memberof ExperimentAutomation
     */
    triggers: Array<ExperimentTrigger>;
    /**
     *
     * @type {Array<ExperimentFire>}
     * @memberof ExperimentAutomation
     */
    fires: Array<ExperimentFire>;
    /**
     *
     * @type {string}
     * @memberof ExperimentAutomation
     */
    nextCursor: string | null;
    /**
     *
     * @type {any}
     * @memberof ExperimentAutomation
     */
    evidencePage?: any | null;
    /**
     *
     * @type {any}
     * @memberof ExperimentAutomation
     */
    metrics?: any | null;
}

/**
 * Check if a given object implements the ExperimentAutomation interface.
 */
export function instanceOfExperimentAutomation(value: object): value is ExperimentAutomation {
    if (!('triggers' in value) || value['triggers'] === undefined) return false;
    if (!('fires' in value) || value['fires'] === undefined) return false;
    if (!('nextCursor' in value) || value['nextCursor'] === undefined) return false;
    return true;
}

export function ExperimentAutomationFromJSON(json: any): ExperimentAutomation {
    return ExperimentAutomationFromJSONTyped(json, false);
}

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

        'triggers': ((json['triggers'] as Array<any>).map(ExperimentTriggerFromJSON)),
        'fires': ((json['fires'] as Array<any>).map(ExperimentFireFromJSON)),
        'nextCursor': json['next_cursor'],
        'evidencePage': json['evidence_page'] == null ? undefined : json['evidence_page'],
        'metrics': json['metrics'] == null ? undefined : json['metrics'],
    };
}

export function ExperimentAutomationToJSON(json: any): ExperimentAutomation {
    return ExperimentAutomationToJSONTyped(json, false);
}

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

    return {

        'triggers': ((value['triggers'] as Array<any>).map(ExperimentTriggerToJSON)),
        'fires': ((value['fires'] as Array<any>).map(ExperimentFireToJSON)),
        'next_cursor': value['nextCursor'],
        'evidence_page': value['evidencePage'],
        'metrics': value['metrics'],
    };
}