/*
 * 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 ListInboxConversations200ResponseDataInner {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: 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 = "participantId", skip_serializing_if = "Option::is_none")]
    pub participant_id: Option<String>,
    #[serde(rename = "participantName", skip_serializing_if = "Option::is_none")]
    pub participant_name: Option<String>,
    #[serde(rename = "participantPicture", skip_serializing_if = "Option::is_none")]
    pub participant_picture: Option<String>,
    #[serde(rename = "lastMessage", skip_serializing_if = "Option::is_none")]
    pub last_message: Option<String>,
    #[serde(rename = "updatedTime", skip_serializing_if = "Option::is_none")]
    pub updated_time: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// Number of unread messages
    #[serde(rename = "unreadCount", skip_serializing_if = "Option::is_none")]
    pub unread_count: Option<i32>,
    /// Direct link to open the conversation on the platform (if available)
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "instagramProfile", skip_serializing_if = "Option::is_none")]
    pub instagram_profile:
        Option<Box<models::ListInboxConversations200ResponseDataInnerInstagramProfile>>,
}

impl ListInboxConversations200ResponseDataInner {
    pub fn new() -> ListInboxConversations200ResponseDataInner {
        ListInboxConversations200ResponseDataInner {
            id: None,
            platform: None,
            account_id: None,
            account_username: None,
            participant_id: None,
            participant_name: None,
            participant_picture: None,
            last_message: None,
            updated_time: None,
            status: None,
            unread_count: None,
            url: 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
    }
}
