1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* 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};
/// InitSessionResponse : Subscriber session token and initial counts.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InitSessionResponse {
/// Whether the project's plan allows removing Enbbox branding. `true` for Pro+ plans, `false` for Free.
#[serde(rename = "remove_branding")]
pub remove_branding: bool,
/// Short-lived JWT for authenticating subsequent inbox requests.
#[serde(rename = "token")]
pub token: String,
/// Current total unread notification count.
#[serde(rename = "total_unread_count")]
pub total_unread_count: i64,
}
impl InitSessionResponse {
/// Subscriber session token and initial counts.
pub fn new(remove_branding: bool, token: String, total_unread_count: i64) -> InitSessionResponse {
InitSessionResponse {
remove_branding,
token,
total_unread_count,
}
}
}