1use serde_derive::Deserialize;
2use url::Url;
3
4use super::{utils, Timestamp};
5
6#[derive(Deserialize)]
9#[non_exhaustive]
10pub struct AccessToken {
11    #[serde(rename = "access_token")]
12    pub value: String,
13    #[serde(rename = "date_expires")]
14    pub expired_at: Option<Timestamp>,
15}
16
17#[derive(Debug, Deserialize)]
19#[non_exhaustive]
20pub struct Terms {
21    pub plaintext: String,
22    pub html: String,
23    pub links: Links,
24}
25
26#[derive(Debug, Deserialize)]
30#[non_exhaustive]
31pub struct Links {
32    pub website: Link,
33    pub terms: Link,
34    pub privacy: Link,
35    pub manage: Link,
36}
37
38#[derive(Debug, Deserialize)]
42#[non_exhaustive]
43pub struct Link {
44    pub text: String,
45    #[serde(with = "utils::url")]
46    pub url: Url,
47    pub required: bool,
48}