/*
* 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};
/// SubscriberCredential : Provider credentials stored on a subscriber (e.g. FCM device tokens, Slack webhook URL). All provider-specific data lives in the `credentials` JSON object.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SubscriberCredential {
#[serde(rename = "credentials", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub credentials: Option<Option<serde_json::Value>>,
#[serde(rename = "provider_id")]
pub provider_id: String,
}
impl SubscriberCredential {
/// Provider credentials stored on a subscriber (e.g. FCM device tokens, Slack webhook URL). All provider-specific data lives in the `credentials` JSON object.
pub fn new(provider_id: String) -> SubscriberCredential {
SubscriberCredential {
credentials: None,
provider_id,
}
}
}