/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.128.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadCallReceivedCall {
/// Internal Zernio Call doc id
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Meta wacid.* call id when known
#[serde(
rename = "metaCallId",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub meta_call_id: Option<Option<String>>,
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
/// Meta phone_number_id
#[serde(rename = "phoneNumberId", skip_serializing_if = "Option::is_none")]
pub phone_number_id: Option<String>,
#[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
pub direction: Option<Direction>,
/// Consumer wa_id / E.164
#[serde(rename = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
/// Business number (E.164)
#[serde(rename = "to", skip_serializing_if = "Option::is_none")]
pub to: Option<String>,
/// Destination snapshot at routing time
#[serde(rename = "forwardTo", skip_serializing_if = "Option::is_none")]
pub forward_to: Option<String>,
#[serde(rename = "contactId", skip_serializing_if = "Option::is_none")]
pub contact_id: Option<String>,
#[serde(rename = "conversationId", skip_serializing_if = "Option::is_none")]
pub conversation_id: Option<String>,
#[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")]
pub started_at: Option<String>,
}
impl WebhookPayloadCallReceivedCall {
pub fn new() -> WebhookPayloadCallReceivedCall {
WebhookPayloadCallReceivedCall {
id: None,
meta_call_id: None,
account_id: None,
phone_number_id: None,
direction: None,
from: None,
to: None,
forward_to: None,
contact_id: None,
conversation_id: None,
started_at: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Direction {
#[serde(rename = "inbound")]
Inbound,
#[serde(rename = "outbound")]
Outbound,
}
impl Default for Direction {
fn default() -> Direction {
Self::Inbound
}
}