use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TextContent {
#[serde(rename = "type")]
pub r#type: Type,
#[serde(rename = "text")]
pub text: String,
#[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>>>,
}
impl TextContent {
pub fn new(r#type: Type, text: String) -> TextContent {
TextContent {
r#type,
text,
annotations: None,
_meta: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "text")]
Text,
}
impl Default for Type {
fn default() -> Type {
Self::Text
}
}