/*
 * 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 GetInboxConversationMessages200Response {
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[serde(rename = "pagination", skip_serializing_if = "Option::is_none")]
    pub pagination: Option<Box<models::GetInboxConversationMessages200ResponsePagination>>,
    /// Sort order actually applied to the returned page. May differ from the requested `sortOrder` for Twitter, Facebook and Bluesky (always `desc` regardless of request).
    #[serde(rename = "sortOrderApplied", skip_serializing_if = "Option::is_none")]
    pub sort_order_applied: Option<SortOrderApplied>,
    #[serde(rename = "messages", skip_serializing_if = "Option::is_none")]
    pub messages: Option<Vec<models::GetInboxConversationMessages200ResponseMessagesInner>>,
    #[serde(rename = "lastUpdated", skip_serializing_if = "Option::is_none")]
    pub last_updated: Option<String>,
}

impl GetInboxConversationMessages200Response {
    pub fn new() -> GetInboxConversationMessages200Response {
        GetInboxConversationMessages200Response {
            status: None,
            pagination: None,
            sort_order_applied: None,
            messages: None,
            last_updated: None,
        }
    }
}
/// Sort order actually applied to the returned page. May differ from the requested `sortOrder` for Twitter, Facebook and Bluesky (always `desc` regardless of request).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SortOrderApplied {
    #[serde(rename = "asc")]
    Asc,
    #[serde(rename = "desc")]
    Desc,
}

impl Default for SortOrderApplied {
    fn default() -> SortOrderApplied {
        Self::Asc
    }
}
