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 Content5Inner {
    #[serde(rename = "type")]
    pub r#type: Type,
    #[serde(rename = "text")]
    pub text: String,
    #[serde(rename = "annotations", skip_serializing_if = "Option::is_none")]
    pub annotations: Option<models::Annotations>,
    #[serde(rename = "_meta", skip_serializing_if = "Option::is_none")]
    pub _meta: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "data")]
    pub data: String,
    #[serde(rename = "mimeType")]
    pub mime_type: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(rename = "uri")]
    pub uri: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
    pub size: Option<i32>,
    #[serde(rename = "icons", skip_serializing_if = "Option::is_none")]
    pub icons: Option<Vec<models::McpServerIcon>>,
    #[serde(rename = "resource")]
    pub resource: Box<models::Resource>,
}

impl Content5Inner {
    pub fn new(r#type: Type, text: String, data: String, mime_type: String, name: String, uri: String, resource: models::Resource) -> Content5Inner {
        Content5Inner {
            r#type,
            text,
            annotations: None,
            _meta: None,
            data,
            mime_type,
            name,
            title: None,
            uri,
            description: None,
            size: None,
            icons: None,
            resource: Box::new(resource),
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "text")]
    Text,
    #[serde(rename = "image")]
    Image,
    #[serde(rename = "audio")]
    Audio,
    #[serde(rename = "resource_link")]
    ResourceLink,
    #[serde(rename = "resource")]
    Resource,
}

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