/*
* 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).
*
* The version of the OpenAPI document: 1.61.1
* 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 WebhookPayloadCallFailedCall {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[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>,
#[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>,
#[serde(rename = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
#[serde(rename = "to", skip_serializing_if = "Option::is_none")]
pub to: Option<String>,
#[serde(rename = "failedAt", skip_serializing_if = "Option::is_none")]
pub failed_at: Option<String>,
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
pub error: Option<Box<models::CallRecordCallErrorsInner>>,
}
impl WebhookPayloadCallFailedCall {
pub fn new() -> WebhookPayloadCallFailedCall {
WebhookPayloadCallFailedCall {
id: None,
meta_call_id: None,
account_id: None,
phone_number_id: None,
direction: None,
from: None,
to: None,
failed_at: None,
error: 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
}
}