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 Content2 {
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Type>,
    #[serde(rename = "text")]
    pub text: String,
    #[serde(rename = "image_url")]
    pub image_url: Box<models::ImageUrl>,
    #[serde(rename = "tool")]
    pub tool: Box<models::Tool1>,
    #[serde(rename = "file_id")]
    pub file_id: String,
    #[serde(rename = "file_name", skip_serializing_if = "Option::is_none")]
    pub file_name: Option<String>,
    #[serde(rename = "file_type", skip_serializing_if = "Option::is_none")]
    pub file_type: Option<String>,
    #[serde(rename = "document_url")]
    pub document_url: String,
    #[serde(rename = "document_name", skip_serializing_if = "Option::is_none")]
    pub document_name: Option<String>,
    #[serde(rename = "thinking")]
    pub thinking: Vec<models::ThinkingInner>,
    /// Whether the thinking chunk is closed or not. Currently only used for prefixing.
    #[serde(rename = "closed", skip_serializing_if = "Option::is_none")]
    pub closed: Option<bool>,
    #[serde(rename = "title")]
    pub title: String,
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "favicon", skip_serializing_if = "Option::is_none")]
    pub favicon: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
}

impl Content2 {
    pub fn new(text: String, image_url: models::ImageUrl, tool: models::Tool1, file_id: String, document_url: String, thinking: Vec<models::ThinkingInner>, title: String) -> Content2 {
        Content2 {
            r#type: None,
            text,
            image_url: Box::new(image_url),
            tool: Box::new(tool),
            file_id,
            file_name: None,
            file_type: None,
            document_url,
            document_name: None,
            thinking,
            closed: None,
            title,
            url: None,
            favicon: None,
            description: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "tool_reference")]
    ToolReference,
}

impl Default for Type {
    fn default() -> Type {
        Self::ToolReference
    }
}