Skip to content

The platform for continuously improving AI agents.

3.3 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 { EventEnum } from './EventEnum';
import {
    EventEnumFromJSON,
    EventEnumFromJSONTyped,
    EventEnumToJSON,
    EventEnumToJSONTyped,
} from './EventEnum';
import type { IntegrationConditionRequest } from './IntegrationConditionRequest';
import {
    IntegrationConditionRequestFromJSON,
    IntegrationConditionRequestFromJSONTyped,
    IntegrationConditionRequestToJSON,
    IntegrationConditionRequestToJSONTyped,
} from './IntegrationConditionRequest';
import type { PartnerEnum } from './PartnerEnum';
import {
    PartnerEnumFromJSON,
    PartnerEnumFromJSONTyped,
    PartnerEnumToJSON,
    PartnerEnumToJSONTyped,
} from './PartnerEnum';

/**
 *
 * @export
 * @interface IntegrationRuleRequest
 */
export interface IntegrationRuleRequest {
    /**
     *
     * @type {PartnerEnum}
     * @memberof IntegrationRuleRequest
     */
    partner: PartnerEnum;
    /**
     *
     * @type {EventEnum}
     * @memberof IntegrationRuleRequest
     */
    event: EventEnum;
    /**
     *
     * @type {Array<IntegrationConditionRequest>}
     * @memberof IntegrationRuleRequest
     */
    conditions?: Array<IntegrationConditionRequest>;
    /**
     *
     * @type {boolean}
     * @memberof IntegrationRuleRequest
     */
    includeExisting?: boolean;
}



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

export function IntegrationRuleRequestFromJSON(json: any): IntegrationRuleRequest {
    return IntegrationRuleRequestFromJSONTyped(json, false);
}

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

        'partner': PartnerEnumFromJSON(json['partner']),
        'event': EventEnumFromJSON(json['event']),
        'conditions': json['conditions'] == null ? undefined : ((json['conditions'] as Array<any>).map(IntegrationConditionRequestFromJSON)),
        'includeExisting': json['include_existing'] == null ? undefined : json['include_existing'],
    };
}

export function IntegrationRuleRequestToJSON(json: any): IntegrationRuleRequest {
    return IntegrationRuleRequestToJSONTyped(json, false);
}

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

    return {

        'partner': PartnerEnumToJSON(value['partner']),
        'event': EventEnumToJSON(value['event']),
        'conditions': value['conditions'] == null ? undefined : ((value['conditions'] as Array<any>).map(IntegrationConditionRequestToJSON)),
        'include_existing': value['includeExisting'],
    };
}