1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NotifySend {
/// Body is the message text, sent verbatim when present — the no-template path.
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
/// Channel selects the delivery channel, sms or email. The per-channel routes (/send/sms, /send/email) pin it, overriding whatever the body names; on the generic route it is required.
#[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
pub channel: Option<String>,
/// Event is the event name, which doubles as the template id when TemplateID is empty — the IAM OTP path sends event=iam.otp_sent and nothing else.
#[serde(rename = "event", skip_serializing_if = "Option::is_none")]
pub event: Option<String>,
/// Provider pins a provider service name (twilio, plivo, twilio_email, mail). Empty picks the one whose org credentials are actually configured in KMS.
#[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
pub provider: Option<String>,
/// Subject is the message subject, carried on the email channel only.
#[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
/// Sync must be exactly \"true\": delivery here is synchronous, and anything else answers 503 because the queue plane that would run an async dispatch is owned elsewhere. Over REST it rides as ?sync=true (the URL binds over the body); a by-name call states it in its arguments.
#[serde(rename = "sync", skip_serializing_if = "Option::is_none")]
pub sync: Option<String>,
/// TemplateID selects a built-in template when Body is empty.
#[serde(rename = "template_id", skip_serializing_if = "Option::is_none")]
pub template_id: Option<String>,
#[serde(rename = "template_vars", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub template_vars: Option<Option<serde_json::Value>>,
/// To is the destination address per recipient — a phone number for sms, an email address for email. Several recipients fan out into one provider call each, and the response shape follows the count (see the items field).
#[serde(rename = "to", skip_serializing_if = "Option::is_none")]
pub to: Option<Vec<String>>,
}
impl NotifySend {
pub fn new() -> NotifySend {
NotifySend {
body: None,
channel: None,
event: None,
provider: None,
subject: None,
sync: None,
template_id: None,
template_vars: None,
to: None,
}
}
}