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};

/// ResourceLink : A resource that the server is capable of reading, included in a prompt or tool call result.  Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ResourceLink {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub title: Option<Option<String>>,
    #[serde(rename = "uri")]
    pub uri: String,
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "mimeType", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub mime_type: Option<Option<String>>,
    #[serde(rename = "size", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub size: Option<Option<i32>>,
    #[serde(rename = "icons", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub icons: Option<Option<Vec<models::McpServerIcon>>>,
    #[serde(rename = "annotations", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub annotations: Option<Option<models::Annotations>>,
    #[serde(rename = "_meta", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub _meta: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl ResourceLink {
    /// A resource that the server is capable of reading, included in a prompt or tool call result.  Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
    pub fn new(name: String, uri: String, r#type: Type) -> ResourceLink {
        ResourceLink {
            name,
            title: None,
            uri,
            description: None,
            mime_type: None,
            size: None,
            icons: None,
            annotations: None,
            _meta: None,
            r#type,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "resource_link")]
    ResourceLink,
}

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