Skip to content

The platform for continuously improving AI agents.

3.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';
/**
 *
 * @export
 * @interface ConnectorActiveConfig
 */
export interface ConnectorActiveConfig {
    /**
     *
     * @type {string}
     * @memberof ConnectorActiveConfig
     */
    id: string;
    /**
     *
     * @type {number}
     * @memberof ConnectorActiveConfig
     */
    version: number;
    /**
     *
     * @type {string}
     * @memberof ConnectorActiveConfig
     */
    sourceProjectId: string;
    /**
     *
     * @type {string}
     * @memberof ConnectorActiveConfig
     */
    targetProjectId: string | null;
    /**
     *
     * @type {number}
     * @memberof ConnectorActiveConfig
     */
    lookbackDays: number | null;
    /**
     *
     * @type {Date}
     * @memberof ConnectorActiveConfig
     */
    backfillFrom: Date | null;
    /**
     *
     * @type {Date}
     * @memberof ConnectorActiveConfig
     */
    backfillTo: Date | null;
    /**
     *
     * @type {Date}
     * @memberof ConnectorActiveConfig
     */
    effectiveFrom: Date;
}

/**
 * Check if a given object implements the ConnectorActiveConfig interface.
 */
export function instanceOfConnectorActiveConfig(value: object): value is ConnectorActiveConfig {
    if (!('id' in value) || value['id'] === undefined) return false;
    if (!('version' in value) || value['version'] === undefined) return false;
    if (!('sourceProjectId' in value) || value['sourceProjectId'] === undefined) return false;
    if (!('targetProjectId' in value) || value['targetProjectId'] === undefined) return false;
    if (!('lookbackDays' in value) || value['lookbackDays'] === undefined) return false;
    if (!('backfillFrom' in value) || value['backfillFrom'] === undefined) return false;
    if (!('backfillTo' in value) || value['backfillTo'] === undefined) return false;
    if (!('effectiveFrom' in value) || value['effectiveFrom'] === undefined) return false;
    return true;
}

export function ConnectorActiveConfigFromJSON(json: any): ConnectorActiveConfig {
    return ConnectorActiveConfigFromJSONTyped(json, false);
}

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

        'id': json['id'],
        'version': json['version'],
        'sourceProjectId': json['source_project_id'],
        'targetProjectId': json['target_project_id'],
        'lookbackDays': json['lookback_days'],
        'backfillFrom': (json['backfill_from'] == null ? null : new Date(json['backfill_from'])),
        'backfillTo': (json['backfill_to'] == null ? null : new Date(json['backfill_to'])),
        'effectiveFrom': (new Date(json['effective_from'])),
    };
}

export function ConnectorActiveConfigToJSON(json: any): ConnectorActiveConfig {
    return ConnectorActiveConfigToJSONTyped(json, false);
}

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

    return {

        'id': value['id'],
        'version': value['version'],
        'source_project_id': value['sourceProjectId'],
        'target_project_id': value['targetProjectId'],
        'lookback_days': value['lookbackDays'],
        'backfill_from': value['backfillFrom'] == null ? value['backfillFrom'] : value['backfillFrom'].toISOString(),
        'backfill_to': value['backfillTo'] == null ? value['backfillTo'] : value['backfillTo'].toISOString(),
        'effective_from': value['effectiveFrom'].toISOString(),
    };
}