/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
*
* The version of the OpenAPI document: 1.0.4
* 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 GetInboxConversation200ResponseData {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "accountUsername", skip_serializing_if = "Option::is_none")]
pub account_username: Option<String>,
#[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<Status>,
#[serde(rename = "participantName", skip_serializing_if = "Option::is_none")]
pub participant_name: Option<String>,
#[serde(rename = "participantId", skip_serializing_if = "Option::is_none")]
pub participant_id: Option<String>,
/// X/Twitter verified badge type. Only present for Twitter/X conversations.
#[serde(
rename = "participantVerifiedType",
skip_serializing_if = "Option::is_none"
)]
pub participant_verified_type: Option<ParticipantVerifiedType>,
#[serde(rename = "lastMessage", skip_serializing_if = "Option::is_none")]
pub last_message: Option<String>,
#[serde(rename = "lastMessageAt", skip_serializing_if = "Option::is_none")]
pub last_message_at: Option<String>,
#[serde(rename = "updatedTime", skip_serializing_if = "Option::is_none")]
pub updated_time: Option<String>,
#[serde(rename = "participants", skip_serializing_if = "Option::is_none")]
pub participants: Option<Vec<models::UpdateFacebookPage200ResponseSelectedPage>>,
#[serde(rename = "instagramProfile", skip_serializing_if = "Option::is_none")]
pub instagram_profile:
Option<Box<models::ListInboxConversations200ResponseDataInnerInstagramProfile>>,
/// Ad-click attribution captured on the first inbound message of the conversation. Only present when the conversation originated from a click-to-message ad. Absent on organic conversations. Two sources populate this field: - WhatsApp CTWA (Click-to-WhatsApp): `ctwa_clid`, `ctwa_source_id`, `ctwa_source_url`, `ctwa_headline`, `ctwa_source_type`, `ctwa_captured_at`. - Facebook Messenger CTM / Instagram CTD: `meta_ad_id`, `meta_ad_title`, `meta_ad_source`, `meta_ad_type`, `meta_ad_ref`, `meta_ad_captured_at`, `meta_ad_photo_url`, `meta_ad_video_url`, `meta_ad_post_id`, `meta_ad_product_id`, `meta_ad_flow_id`. Note: `meta_ad_photo_url` and `meta_ad_video_url` are Facebook CDN URLs that may expire. Use `meta_ad_id` for a permanent reference to the ad (e.g. to link to Meta Ads Manager).
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, String>>,
}
impl GetInboxConversation200ResponseData {
pub fn new() -> GetInboxConversation200ResponseData {
GetInboxConversation200ResponseData {
id: None,
account_id: None,
account_username: None,
platform: None,
status: None,
participant_name: None,
participant_id: None,
participant_verified_type: None,
last_message: None,
last_message_at: None,
updated_time: None,
participants: None,
instagram_profile: None,
metadata: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "active")]
Active,
#[serde(rename = "archived")]
Archived,
}
impl Default for Status {
fn default() -> Status {
Self::Active
}
}
/// X/Twitter verified badge type. Only present for Twitter/X conversations.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ParticipantVerifiedType {
#[serde(rename = "blue")]
Blue,
#[serde(rename = "government")]
Government,
#[serde(rename = "business")]
Business,
#[serde(rename = "none")]
None,
}
impl Default for ParticipantVerifiedType {
fn default() -> ParticipantVerifiedType {
Self::Blue
}
}