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 { GraphEdgeKindEnum } from './GraphEdgeKindEnum';
import {
    GraphEdgeKindEnumFromJSON,
    GraphEdgeKindEnumFromJSONTyped,
    GraphEdgeKindEnumToJSON,
    GraphEdgeKindEnumToJSONTyped,
} from './GraphEdgeKindEnum';

/**
 *
 * @export
 * @interface GraphEdge
 */
export interface GraphEdge {
    /**
     *
     * @type {GraphEdgeKindEnum}
     * @memberof GraphEdge
     */
    kind: GraphEdgeKindEnum;
    /**
     *
     * @type {string}
     * @memberof GraphEdge
     */
    source: string;
    /**
     *
     * @type {string}
     * @memberof GraphEdge
     */
    target: string;
    /**
     *
     * @type {string}
     * @memberof GraphEdge
     */
    sourceName?: string;
    /**
     *
     * @type {string}
     * @memberof GraphEdge
     */
    targetName?: string;
    /**
     *
     * @type {Array<string>}
     * @memberof GraphEdge
     */
    via?: Array<string>;
    /**
     *
     * @type {Array<string>}
     * @memberof GraphEdge
     */
    tools?: Array<string>;
    /**
     *
     * @type {number}
     * @memberof GraphEdge
     */
    observed?: number;
}



/**
 * Check if a given object implements the GraphEdge interface.
 */
export function instanceOfGraphEdge(value: object): value is GraphEdge {
    if (!('kind' in value) || value['kind'] === undefined) return false;
    if (!('source' in value) || value['source'] === undefined) return false;
    if (!('target' in value) || value['target'] === undefined) return false;
    return true;
}

export function GraphEdgeFromJSON(json: any): GraphEdge {
    return GraphEdgeFromJSONTyped(json, false);
}

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

        'kind': GraphEdgeKindEnumFromJSON(json['kind']),
        'source': json['source'],
        'target': json['target'],
        'sourceName': json['source_name'] == null ? undefined : json['source_name'],
        'targetName': json['target_name'] == null ? undefined : json['target_name'],
        'via': json['via'] == null ? undefined : json['via'],
        'tools': json['tools'] == null ? undefined : json['tools'],
        'observed': json['observed'] == null ? undefined : json['observed'],
    };
}

export function GraphEdgeToJSON(json: any): GraphEdge {
    return GraphEdgeToJSONTyped(json, false);
}

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

    return {

        'kind': GraphEdgeKindEnumToJSON(value['kind']),
        'source': value['source'],
        'target': value['target'],
        'source_name': value['sourceName'],
        'target_name': value['targetName'],
        'via': value['via'],
        'tools': value['tools'],
        'observed': value['observed'],
    };
}