/*
* 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.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 SendInboxMessage200ResponseData {
/// Platform id of the sent message (not returned for Reddit). For WhatsApp this is the raw Meta wamid, the same id delivered as message.platformMessageId on webhooks and delivery-status updates, and the value to pass as replyTo to quote-reply.
#[serde(rename = "messageId", skip_serializing_if = "Option::is_none")]
pub message_id: Option<String>,
/// Zernio conversation id, echoed so the thread can be read back or replied to. It equals the id the list-conversations endpoint returns for Telegram, WhatsApp, SMS and Slack; for Facebook, Instagram, Bluesky and Reddit that endpoint returns the platform thread id instead, so do not correlate the two by equality. For X (Twitter), when the request addressed the conversation by its Twitter dm_conversation_id, that platform id is echoed back instead. Omitted when the send succeeded but the conversation could not be resolved to a stored record.
#[serde(rename = "conversationId", skip_serializing_if = "Option::is_none")]
pub conversation_id: Option<String>,
/// Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp).
#[serde(rename = "attachments", skip_serializing_if = "Option::is_none")]
pub attachments: Option<Vec<models::SendInboxMessage200ResponseDataAttachmentsInner>>,
/// Facebook/Instagram only. Present when an attachment and text were both requested: Meta has no single body shape for both, so the send is two Meta messages under the hood. First element === messageId (the attachment); second is the follow-up text.
#[serde(rename = "messageIds", skip_serializing_if = "Option::is_none")]
pub message_ids: Option<Vec<String>>,
#[serde(rename = "partialFailure", skip_serializing_if = "Option::is_none")]
pub partial_failure: Option<Box<models::SendInboxMessage200ResponseDataPartialFailure>>,
}
impl SendInboxMessage200ResponseData {
pub fn new() -> SendInboxMessage200ResponseData {
SendInboxMessage200ResponseData {
message_id: None,
conversation_id: None,
attachments: None,
message_ids: None,
partial_failure: None,
}
}
}