/* 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';
import type { DatasetDto } from './DatasetDto';
import {
    DatasetDtoFromJSON,
    DatasetDtoFromJSONTyped,
    DatasetDtoToJSON,
} from './DatasetDto';

/**
 * 
 * @export
 * @interface FineTuneJobWithDatasetDto
 */
export interface FineTuneJobWithDatasetDto {
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobWithDatasetDto
     */
    id: string;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobWithDatasetDto
     */
    provider: FineTuneJobWithDatasetDtoProviderEnum;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobWithDatasetDto
     */
    model: string;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobWithDatasetDto
     */
    status: FineTuneJobWithDatasetDtoStatusEnum;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobWithDatasetDto
     */
    startedAt: string | null;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobWithDatasetDto
     */
    endedAt: string | null;
    /**
     * 
     * @type {object}
     * @memberof FineTuneJobWithDatasetDto
     */
    metadata: object | null;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobWithDatasetDto
     */
    datasetId: string;
    /**
     * 
     * @type {DatasetDto}
     * @memberof FineTuneJobWithDatasetDto
     */
    dataset: DatasetDto;
}


/**
 * @export
 */
export const FineTuneJobWithDatasetDtoProviderEnum = {
    Openai: 'OPENAI',
    Montelo: 'MONTELO'
} as const;
export type FineTuneJobWithDatasetDtoProviderEnum = typeof FineTuneJobWithDatasetDtoProviderEnum[keyof typeof FineTuneJobWithDatasetDtoProviderEnum];

/**
 * @export
 */
export const FineTuneJobWithDatasetDtoStatusEnum = {
    Pending: 'PENDING',
    Running: 'RUNNING',
    Completed: 'COMPLETED',
    Failed: 'FAILED',
    Cancelled: 'CANCELLED'
} as const;
export type FineTuneJobWithDatasetDtoStatusEnum = typeof FineTuneJobWithDatasetDtoStatusEnum[keyof typeof FineTuneJobWithDatasetDtoStatusEnum];


/**
 * Check if a given object implements the FineTuneJobWithDatasetDto interface.
 */
export function instanceOfFineTuneJobWithDatasetDto(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "provider" in value;
    isInstance = isInstance && "model" in value;
    isInstance = isInstance && "status" in value;
    isInstance = isInstance && "startedAt" in value;
    isInstance = isInstance && "endedAt" in value;
    isInstance = isInstance && "metadata" in value;
    isInstance = isInstance && "datasetId" in value;
    isInstance = isInstance && "dataset" in value;

    return isInstance;
}

export function FineTuneJobWithDatasetDtoFromJSON(json: any): FineTuneJobWithDatasetDto {
    return FineTuneJobWithDatasetDtoFromJSONTyped(json, false);
}

export function FineTuneJobWithDatasetDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FineTuneJobWithDatasetDto {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'id': json['id'],
        'provider': json['provider'],
        'model': json['model'],
        'status': json['status'],
        'startedAt': json['startedAt'],
        'endedAt': json['endedAt'],
        'metadata': json['metadata'],
        'datasetId': json['datasetId'],
        'dataset': DatasetDtoFromJSON(json['dataset']),
    };
}

export function FineTuneJobWithDatasetDtoToJSON(value?: FineTuneJobWithDatasetDto | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'id': value.id,
        'provider': value.provider,
        'model': value.model,
        'status': value.status,
        'startedAt': value.startedAt,
        'endedAt': value.endedAt,
        'metadata': value.metadata,
        'datasetId': value.datasetId,
        'dataset': DatasetDtoToJSON(value.dataset),
    };
}

