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
/*
* 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};
/// InitiateCallResponse : Successful call action response from upstream, returned as-is. On empty upstream body, 1msg may return `{ \"result\": \"success\" }`. Upstream failures are often wrapped as HTTP 200 `{ \"response\": { \"error\": \"...\" } }`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InitiateCallResponse {
#[serde(rename = "messaging_product", skip_serializing_if = "Option::is_none")]
pub messaging_product: Option<String>,
#[serde(rename = "success", skip_serializing_if = "Option::is_none")]
pub success: Option<bool>,
/// Present on outbound `connect` — contains the new call id
#[serde(rename = "calls", skip_serializing_if = "Option::is_none")]
pub calls: Option<Vec<models::InitiateCallResponseCallsInner>>,
/// Legacy success marker when upstream returns an empty body
#[serde(rename = "result", skip_serializing_if = "Option::is_none")]
pub result: Option<String>,
#[serde(rename = "response", skip_serializing_if = "Option::is_none")]
pub response: Option<models::InitiateCallResponseResponse>,
}
impl InitiateCallResponse {
/// Successful call action response from upstream, returned as-is. On empty upstream body, 1msg may return `{ \"result\": \"success\" }`. Upstream failures are often wrapped as HTTP 200 `{ \"response\": { \"error\": \"...\" } }`.
pub fn new() -> InitiateCallResponse {
InitiateCallResponse {
messaging_product: None,
success: None,
calls: None,
result: None,
response: None,
}
}
}