/*
 * 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.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 GetInboxConversationMessages200ResponseMessagesInner {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "conversationId", skip_serializing_if = "Option::is_none")]
    pub conversation_id: Option<String>,
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[serde(rename = "senderId", skip_serializing_if = "Option::is_none")]
    pub sender_id: Option<String>,
    #[serde(rename = "senderName", skip_serializing_if = "Option::is_none")]
    pub sender_name: Option<String>,
    #[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
    pub direction: Option<Direction>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(rename = "attachments", skip_serializing_if = "Option::is_none")]
    pub attachments:
        Option<Vec<models::GetInboxConversationMessages200ResponseMessagesInnerAttachmentsInner>>,
    /// Reddit message subject
    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
    pub subject: Option<String>,
    /// Instagram story reply
    #[serde(rename = "storyReply", skip_serializing_if = "Option::is_none")]
    pub story_reply: Option<bool>,
    /// Instagram story mention
    #[serde(rename = "isStoryMention", skip_serializing_if = "Option::is_none")]
    pub is_story_mention: Option<bool>,
}

impl GetInboxConversationMessages200ResponseMessagesInner {
    pub fn new() -> GetInboxConversationMessages200ResponseMessagesInner {
        GetInboxConversationMessages200ResponseMessagesInner {
            id: None,
            conversation_id: None,
            account_id: None,
            platform: None,
            message: None,
            sender_id: None,
            sender_name: None,
            direction: None,
            created_at: None,
            attachments: None,
            subject: None,
            story_reply: None,
            is_story_mention: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Direction {
    #[serde(rename = "incoming")]
    Incoming,
    #[serde(rename = "outgoing")]
    Outgoing,
}

impl Default for Direction {
    fn default() -> Direction {
        Self::Incoming
    }
}
