uapi_sdk_rust/models/generated/
post_text_markdown_to_html_request.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PostTextMarkdownToHtmlRequest {
16 #[serde(rename = "text")]
18 pub text: String,
19 #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
21 pub format: Option<Format>,
22 #[serde(rename = "sanitize", skip_serializing_if = "Option::is_none")]
24 pub sanitize: Option<bool>,
25}
26
27impl PostTextMarkdownToHtmlRequest {
28 pub fn new(text: String) -> PostTextMarkdownToHtmlRequest {
29 PostTextMarkdownToHtmlRequest {
30 text,
31 format: None,
32 sanitize: None,
33 }
34 }
35}
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Format {
39 #[serde(rename = "json")]
40 Json,
41 #[serde(rename = "html")]
42 Html,
43}
44
45impl Default for Format {
46 fn default() -> Format {
47 Self::Json
48 }
49}
50