Skip to content

The platform for continuously improving AI agents.

2.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';
import type { Project } from './Project';
import {
    ProjectFromJSON,
    ProjectFromJSONTyped,
    ProjectToJSON,
    ProjectToJSONTyped,
} from './Project';

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

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

export function PaginatedProjectListFromJSON(json: any): PaginatedProjectList {
    return PaginatedProjectListFromJSONTyped(json, false);
}

export function PaginatedProjectListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedProjectList {
    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(ProjectFromJSON)),
    };
}

export function PaginatedProjectListToJSON(json: any): PaginatedProjectList {
    return PaginatedProjectListToJSONTyped(json, false);
}

export function PaginatedProjectListToJSONTyped(value?: PaginatedProjectList | 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(ProjectToJSON)),
    };
}