enbbox 1.0.1

Notification infrastructure API — open-source alternative to Novu/Courier
Documentation
/*
 * enbbox API
 *
 * Notification infrastructure API — open-source alternative to Novu/Courier
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// PaginatedSubscriberRecordDataInner : Full subscriber profile as stored in the system.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PaginatedSubscriberRecordDataInner {
    /// Avatar URL.
    #[serde(rename = "avatar", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub avatar: Option<Option<String>>,
    /// Push/chat provider credentials for this subscriber.
    #[serde(rename = "credentials", skip_serializing_if = "Option::is_none")]
    pub credentials: Option<Vec<models::SubscriberCredential>>,
    /// Email address.
    #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub email: Option<Option<String>>,
    /// First name.
    #[serde(rename = "first_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub first_name: Option<Option<String>>,
    /// Internal UUID assigned by the system.
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// Whether the subscriber is currently connected via SSE/WebSocket.
    #[serde(rename = "is_online", skip_serializing_if = "Option::is_none")]
    pub is_online: Option<bool>,
    /// Last name.
    #[serde(rename = "last_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_name: Option<Option<String>>,
    /// ISO 8601 timestamp of when the subscriber was last seen online.
    #[serde(rename = "last_online_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_online_at: Option<Option<String>>,
    /// Locale tag.
    #[serde(rename = "locale", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub locale: Option<Option<String>>,
    /// Phone number.
    #[serde(rename = "phone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub phone: Option<Option<String>>,
    /// Your unique subscriber identifier.
    #[serde(rename = "subscriber_id")]
    pub subscriber_id: String,
}

impl PaginatedSubscriberRecordDataInner {
    /// Full subscriber profile as stored in the system.
    pub fn new(id: uuid::Uuid, subscriber_id: String) -> PaginatedSubscriberRecordDataInner {
        PaginatedSubscriberRecordDataInner {
            avatar: None,
            credentials: None,
            email: None,
            first_name: None,
            id,
            is_online: None,
            last_name: None,
            last_online_at: None,
            locale: None,
            phone: None,
            subscriber_id,
        }
    }
}