mistral-openapi-client 0.1.0

Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
Documentation
/*
 * Mistral AI API
 *
 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClassifierDetailedJobOut {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "auto_start")]
    pub auto_start: bool,
    #[serde(rename = "model")]
    pub model: String,
    #[serde(rename = "status")]
    pub status: Status,
    #[serde(rename = "created_at")]
    pub created_at: i32,
    #[serde(rename = "modified_at")]
    pub modified_at: i32,
    #[serde(rename = "training_files")]
    pub training_files: Vec<uuid::Uuid>,
    #[serde(rename = "validation_files", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub validation_files: Option<Option<Vec<uuid::Uuid>>>,
    #[serde(rename = "object", skip_serializing_if = "Option::is_none")]
    pub object: Option<Object>,
    #[serde(rename = "fine_tuned_model", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub fine_tuned_model: Option<Option<String>>,
    #[serde(rename = "suffix", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub suffix: Option<Option<String>>,
    #[serde(rename = "integrations", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub integrations: Option<Option<Vec<models::WandbIntegrationOut>>>,
    #[serde(rename = "trained_tokens", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub trained_tokens: Option<Option<i32>>,
    #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<Option<Box<models::JobMetadataOut>>>,
    #[serde(rename = "job_type", skip_serializing_if = "Option::is_none")]
    pub job_type: Option<JobType>,
    #[serde(rename = "hyperparameters")]
    pub hyperparameters: Box<models::ClassifierTrainingParameters>,
    /// Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here.
    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
    pub events: Option<Vec<models::EventOut>>,
    #[serde(rename = "checkpoints", skip_serializing_if = "Option::is_none")]
    pub checkpoints: Option<Vec<models::CheckpointOut>>,
    #[serde(rename = "classifier_targets")]
    pub classifier_targets: Vec<models::ClassifierTargetOut>,
}

impl ClassifierDetailedJobOut {
    pub fn new(id: uuid::Uuid, auto_start: bool, model: String, status: Status, created_at: i32, modified_at: i32, training_files: Vec<uuid::Uuid>, hyperparameters: models::ClassifierTrainingParameters, classifier_targets: Vec<models::ClassifierTargetOut>) -> ClassifierDetailedJobOut {
        ClassifierDetailedJobOut {
            id,
            auto_start,
            model,
            status,
            created_at,
            modified_at,
            training_files,
            validation_files: None,
            object: None,
            fine_tuned_model: None,
            suffix: None,
            integrations: None,
            trained_tokens: None,
            metadata: None,
            job_type: None,
            hyperparameters: Box::new(hyperparameters),
            events: None,
            checkpoints: None,
            classifier_targets,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "QUEUED")]
    Queued,
    #[serde(rename = "STARTED")]
    Started,
    #[serde(rename = "VALIDATING")]
    Validating,
    #[serde(rename = "VALIDATED")]
    Validated,
    #[serde(rename = "RUNNING")]
    Running,
    #[serde(rename = "FAILED_VALIDATION")]
    FailedValidation,
    #[serde(rename = "FAILED")]
    Failed,
    #[serde(rename = "SUCCESS")]
    Success,
    #[serde(rename = "CANCELLED")]
    Cancelled,
    #[serde(rename = "CANCELLATION_REQUESTED")]
    CancellationRequested,
}

impl Default for Status {
    fn default() -> Status {
        Self::Queued
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Object {
    #[serde(rename = "job")]
    Job,
}

impl Default for Object {
    fn default() -> Object {
        Self::Job
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum JobType {
    #[serde(rename = "classifier")]
    Classifier,
}

impl Default for JobType {
    fn default() -> JobType {
        Self::Classifier
    }
}