Skip to content

The platform for continuously improving AI agents.

4.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 { DedicatedStartupLog } from './DedicatedStartupLog';
import {
    DedicatedStartupLogFromJSON,
    DedicatedStartupLogFromJSONTyped,
    DedicatedStartupLogToJSON,
    DedicatedStartupLogToJSONTyped,
} from './DedicatedStartupLog';

/**
 *
 * @export
 * @interface DedicatedStartup
 */
export interface DedicatedStartup {
    /**
     *
     * @type {string}
     * @memberof DedicatedStartup
     */
    operationId: string;
    /**
     *
     * @type {string}
     * @memberof DedicatedStartup
     */
    stage: string;
    /**
     *
     * @type {string}
     * @memberof DedicatedStartup
     */
    label: string;
    /**
     *
     * @type {number}
     * @memberof DedicatedStartup
     */
    completed: number | null;
    /**
     *
     * @type {number}
     * @memberof DedicatedStartup
     */
    total: number | null;
    /**
     *
     * @type {string}
     * @memberof DedicatedStartup
     */
    unit: string | null;
    /**
     *
     * @type {boolean}
     * @memberof DedicatedStartup
     */
    available: boolean;
    /**
     *
     * @type {Date}
     * @memberof DedicatedStartup
     */
    observedAt: Date | null;
    /**
     *
     * @type {Array<DedicatedStartupLog>}
     * @memberof DedicatedStartup
     */
    logs: Array<DedicatedStartupLog>;
    /**
     *
     * @type {boolean}
     * @memberof DedicatedStartup
     */
    truncated: boolean;
}

/**
 * Check if a given object implements the DedicatedStartup interface.
 */
export function instanceOfDedicatedStartup(value: object): value is DedicatedStartup {
    if (!('operationId' in value) || value['operationId'] === undefined) return false;
    if (!('stage' in value) || value['stage'] === undefined) return false;
    if (!('label' in value) || value['label'] === undefined) return false;
    if (!('completed' in value) || value['completed'] === undefined) return false;
    if (!('total' in value) || value['total'] === undefined) return false;
    if (!('unit' in value) || value['unit'] === undefined) return false;
    if (!('available' in value) || value['available'] === undefined) return false;
    if (!('observedAt' in value) || value['observedAt'] === undefined) return false;
    if (!('logs' in value) || value['logs'] === undefined) return false;
    if (!('truncated' in value) || value['truncated'] === undefined) return false;
    return true;
}

export function DedicatedStartupFromJSON(json: any): DedicatedStartup {
    return DedicatedStartupFromJSONTyped(json, false);
}

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

        'operationId': json['operation_id'],
        'stage': json['stage'],
        'label': json['label'],
        'completed': json['completed'],
        'total': json['total'],
        'unit': json['unit'],
        'available': json['available'],
        'observedAt': (json['observed_at'] == null ? null : new Date(json['observed_at'])),
        'logs': ((json['logs'] as Array<any>).map(DedicatedStartupLogFromJSON)),
        'truncated': json['truncated'],
    };
}

export function DedicatedStartupToJSON(json: any): DedicatedStartup {
    return DedicatedStartupToJSONTyped(json, false);
}

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

    return {

        'operation_id': value['operationId'],
        'stage': value['stage'],
        'label': value['label'],
        'completed': value['completed'],
        'total': value['total'],
        'unit': value['unit'],
        'available': value['available'],
        'observed_at': value['observedAt'] == null ? value['observedAt'] : value['observedAt'].toISOString(),
        'logs': ((value['logs'] as Array<any>).map(DedicatedStartupLogToJSON)),
        'truncated': value['truncated'],
    };
}