Skip to main content

late/models/
send_inbox_message_400_response.rs

1/*
2 * Zernio API
3 *
4 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5 *
6 * The version of the OpenAPI document: 1.0.4
7 * Contact: support@zernio.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SendInboxMessage400Response {
16    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
17    pub error: Option<String>,
18    /// Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to.
19    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
20    pub code: Option<Code>,
21    #[serde(rename = "platformError", skip_serializing_if = "Option::is_none")]
22    pub platform_error: Option<Box<models::SendInboxMessage400ResponsePlatformError>>,
23}
24
25impl SendInboxMessage400Response {
26    pub fn new() -> SendInboxMessage400Response {
27        SendInboxMessage400Response {
28            error: None,
29            code: None,
30            platform_error: None,
31        }
32    }
33}
34/// Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to.
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Code {
37    #[serde(rename = "PLATFORM_LIMITATION")]
38    PlatformLimitation,
39    #[serde(rename = "MISSING_PARTICIPANT")]
40    MissingParticipant,
41}
42
43impl Default for Code {
44    fn default() -> Code {
45        Self::PlatformLimitation
46    }
47}