/* tslint:disable */
/* eslint-disable */
/**
 * Montelo
 * Documentation for the Montelo API.
 *
 * The version of the OpenAPI document: 1.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 { exists, mapValues } from '../runtime';
/**
 * 
 * @export
 * @interface AddToDatasetInput
 */
export interface AddToDatasetInput {
    /**
     * 
     * @type {object}
     * @memberof AddToDatasetInput
     */
    input: object;
    /**
     * 
     * @type {object}
     * @memberof AddToDatasetInput
     */
    expectedOutput: object;
    /**
     * 
     * @type {string}
     * @memberof AddToDatasetInput
     */
    source: AddToDatasetInputSourceEnum;
    /**
     * 
     * @type {string}
     * @memberof AddToDatasetInput
     */
    sourceId: string | null;
    /**
     * 
     * @type {string}
     * @memberof AddToDatasetInput
     */
    split?: AddToDatasetInputSplitEnum;
    /**
     * 
     * @type {object}
     * @memberof AddToDatasetInput
     */
    metadata?: object;
}


/**
 * @export
 */
export const AddToDatasetInputSourceEnum = {
    Trace: 'TRACE',
    Log: 'LOG',
    Api: 'API'
} as const;
export type AddToDatasetInputSourceEnum = typeof AddToDatasetInputSourceEnum[keyof typeof AddToDatasetInputSourceEnum];

/**
 * @export
 */
export const AddToDatasetInputSplitEnum = {
    Train: 'TRAIN',
    Test: 'TEST'
} as const;
export type AddToDatasetInputSplitEnum = typeof AddToDatasetInputSplitEnum[keyof typeof AddToDatasetInputSplitEnum];


/**
 * Check if a given object implements the AddToDatasetInput interface.
 */
export function instanceOfAddToDatasetInput(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "input" in value;
    isInstance = isInstance && "expectedOutput" in value;
    isInstance = isInstance && "source" in value;
    isInstance = isInstance && "sourceId" in value;

    return isInstance;
}

export function AddToDatasetInputFromJSON(json: any): AddToDatasetInput {
    return AddToDatasetInputFromJSONTyped(json, false);
}

export function AddToDatasetInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddToDatasetInput {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'input': json['input'],
        'expectedOutput': json['expectedOutput'],
        'source': json['source'],
        'sourceId': json['sourceId'],
        'split': !exists(json, 'split') ? undefined : json['split'],
        'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
    };
}

export function AddToDatasetInputToJSON(value?: AddToDatasetInput | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'input': value.input,
        'expectedOutput': value.expectedOutput,
        'source': value.source,
        'sourceId': value.sourceId,
        'split': value.split,
        'metadata': value.metadata,
    };
}

