/* 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 FineTuneJobDto
 */
export interface FineTuneJobDto {
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobDto
     */
    id: string;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobDto
     */
    provider: FineTuneJobDtoProviderEnum;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobDto
     */
    model: string;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobDto
     */
    status: FineTuneJobDtoStatusEnum;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobDto
     */
    startedAt: string | null;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobDto
     */
    endedAt: string | null;
    /**
     * 
     * @type {object}
     * @memberof FineTuneJobDto
     */
    metadata: object | null;
    /**
     * 
     * @type {string}
     * @memberof FineTuneJobDto
     */
    datasetId: string;
}


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

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


/**
 * Check if a given object implements the FineTuneDto interface.
 */
export function instanceOfFineTuneJobDto(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;

    return isInstance;
}

export function FineTuneJobDtoFromJSON(json: any): FineTuneJobDto {
    return FineTuneJobDtoFromJSONTyped(json, false);
}

export function FineTuneJobDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): FineTuneJobDto {
    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'],
    };
}

export function FineTuneJobDtoToJSON(value?: FineTuneJobDto | 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,
    };
}

