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};

/// ChannelConnectionRecord : A channel connection linking a subscriber to a provider with stored credentials.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ChannelConnectionRecord {
    /// ISO 8601 creation timestamp.
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "credentials")]
    pub credentials: serde_json::Value,
    /// Unique identifier.
    #[serde(rename = "id")]
    pub id: String,
    /// Unique slug identifier.
    #[serde(rename = "identifier")]
    pub identifier: String,
    /// Provider identifier.
    #[serde(rename = "provider_id")]
    pub provider_id: String,
    /// Subscriber identifier.
    #[serde(rename = "subscriber_id")]
    pub subscriber_id: String,
}

impl ChannelConnectionRecord {
    /// A channel connection linking a subscriber to a provider with stored credentials.
    pub fn new(created_at: String, credentials: serde_json::Value, id: String, identifier: String, provider_id: String, subscriber_id: String) -> ChannelConnectionRecord {
        ChannelConnectionRecord {
            created_at,
            credentials,
            id,
            identifier,
            provider_id,
            subscriber_id,
        }
    }
}