Skip to content

The platform for continuously improving AI agents.

2.8 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 { DecisionPerformance } from './DecisionPerformance';
import {
    DecisionPerformanceFromJSON,
    DecisionPerformanceFromJSONTyped,
    DecisionPerformanceToJSON,
    DecisionPerformanceToJSONTyped,
} from './DecisionPerformance';

/**
 *
 * @export
 * @interface PaginatedDecisionPerformanceList
 */
export interface PaginatedDecisionPerformanceList {
    /**
     *
     * @type {number}
     * @memberof PaginatedDecisionPerformanceList
     */
    count: number;
    /**
     *
     * @type {string}
     * @memberof PaginatedDecisionPerformanceList
     */
    next?: string | null;
    /**
     *
     * @type {string}
     * @memberof PaginatedDecisionPerformanceList
     */
    previous?: string | null;
    /**
     *
     * @type {Array<DecisionPerformance>}
     * @memberof PaginatedDecisionPerformanceList
     */
    results: Array<DecisionPerformance>;
}

/**
 * Check if a given object implements the PaginatedDecisionPerformanceList interface.
 */
export function instanceOfPaginatedDecisionPerformanceList(value: object): value is PaginatedDecisionPerformanceList {
    if (!('count' in value) || value['count'] === undefined) return false;
    if (!('results' in value) || value['results'] === undefined) return false;
    return true;
}

export function PaginatedDecisionPerformanceListFromJSON(json: any): PaginatedDecisionPerformanceList {
    return PaginatedDecisionPerformanceListFromJSONTyped(json, false);
}

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

        'count': json['count'],
        'next': json['next'] == null ? undefined : json['next'],
        'previous': json['previous'] == null ? undefined : json['previous'],
        'results': ((json['results'] as Array<any>).map(DecisionPerformanceFromJSON)),
    };
}

export function PaginatedDecisionPerformanceListToJSON(json: any): PaginatedDecisionPerformanceList {
    return PaginatedDecisionPerformanceListToJSONTyped(json, false);
}

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

    return {

        'count': value['count'],
        'next': value['next'],
        'previous': value['previous'],
        'results': ((value['results'] as Array<any>).map(DecisionPerformanceToJSON)),
    };
}