clerk_rs/models/
upsert_template_request.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct UpsertTemplateRequest {
13	/// The user-friendly name of the template
14	#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
15	pub name: Option<String>,
16	/// The email subject. Applicable only to email templates.
17	#[serde(
18		rename = "subject",
19		default,
20		with = "::serde_with::rust::double_option",
21		skip_serializing_if = "Option::is_none"
22	)]
23	pub subject: Option<Option<String>>,
24	/// The editor markup used to generate the body of the template
25	#[serde(
26		rename = "markup",
27		default,
28		with = "::serde_with::rust::double_option",
29		skip_serializing_if = "Option::is_none"
30	)]
31	pub markup: Option<Option<String>>,
32	/// The template body before variable interpolation
33	#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
34	pub body: Option<String>,
35	/// Whether Clerk should deliver emails or SMS messages based on the current template
36	#[serde(
37		rename = "delivered_by_clerk",
38		default,
39		with = "::serde_with::rust::double_option",
40		skip_serializing_if = "Option::is_none"
41	)]
42	pub delivered_by_clerk: Option<Option<bool>>,
43	/// The local part of the From email address that will be used for emails. For example, in the address 'hello@example.com', the local part is 'hello'. Applicable only to email templates.
44	#[serde(rename = "from_email_name", skip_serializing_if = "Option::is_none")]
45	pub from_email_name: Option<String>,
46}
47
48impl UpsertTemplateRequest {
49	pub fn new() -> UpsertTemplateRequest {
50		UpsertTemplateRequest {
51			name: None,
52			subject: None,
53			markup: None,
54			body: None,
55			delivered_by_clerk: None,
56			from_email_name: None,
57		}
58	}
59}