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
/*
* 1MSG WhatsApp Business API (Public)
*
* Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
*
* The version of the OpenAPI document: 1.0.0
* Contact: support@1msg.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SendTemplateRequest {
#[serde(rename = "template", skip_serializing_if = "Option::is_none")]
pub template: Option<String>,
#[serde(rename = "language", skip_serializing_if = "Option::is_none")]
pub language: Option<Box<models::SendTemplateRequestLanguage>>,
#[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
#[serde(rename = "params", skip_serializing_if = "Option::is_none")]
pub params: Option<Vec<serde_json::Value>>,
#[serde(rename = "phone", skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// Force Marketing Messages API (POST marketing_messages). If omitted: auto for MARKETING category when channel has mm_lite_enabled and mm_lite_available service settings.
#[serde(rename = "useMMlite", skip_serializing_if = "Option::is_none")]
pub use_m_mlite: Option<bool>,
/// Sets message_activity_sharing on WABA payload. Enables click tracking webhooks. Requires MM Lite path. Ignored on Cloud API fallback.
#[serde(rename = "messageActivitySharing", skip_serializing_if = "Option::is_none")]
pub message_activity_sharing: Option<bool>,
/// Template message TTL in seconds (message_send_ttl_seconds). MARKETING via MM Lite: 43200–2592000. AUTHENTICATION: 30–900. UTILITY: 30–43200. AUTH/UTILITY also accept -1 (30-day custom TTL).
#[serde(rename = "messageSendTtlSeconds", skip_serializing_if = "Option::is_none")]
pub message_send_ttl_seconds: Option<i32>,
}
impl SendTemplateRequest {
pub fn new() -> SendTemplateRequest {
SendTemplateRequest {
template: None,
language: None,
namespace: None,
params: None,
phone: None,
use_m_mlite: None,
message_activity_sharing: None,
message_send_ttl_seconds: None,
}
}
}