/*
 * 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 GetContact200ResponseChannelsInner {
    #[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 = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    #[serde(rename = "platformIdentifier", skip_serializing_if = "Option::is_none")]
    pub platform_identifier: Option<String>,
    #[serde(rename = "displayIdentifier", skip_serializing_if = "Option::is_none")]
    pub display_identifier: Option<String>,
    #[serde(rename = "isSubscribed", skip_serializing_if = "Option::is_none")]
    pub is_subscribed: Option<bool>,
    #[serde(rename = "conversationId", skip_serializing_if = "Option::is_none")]
    pub conversation_id: Option<String>,
    /// Most recent message (either direction) in this channel's conversation, or null if none.
    #[serde(
        rename = "lastActiveAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_active_at: Option<Option<String>>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

impl GetContact200ResponseChannelsInner {
    pub fn new() -> GetContact200ResponseChannelsInner {
        GetContact200ResponseChannelsInner {
            id: None,
            account_id: None,
            platform: None,
            platform_identifier: None,
            display_identifier: None,
            is_subscribed: None,
            conversation_id: None,
            last_active_at: None,
            created_at: None,
        }
    }
}
