/*
 * 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",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub participant_verified_type: Option<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>>,
}

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,
        }
    }
}
///
#[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
    }
}
