clerk_rs/models/
create_jwt_template_request.rs1#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct CreateJwtTemplateRequest {
13 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
15 pub name: Option<String>,
16 #[serde(rename = "claims", skip_serializing_if = "Option::is_none")]
18 pub claims: Option<serde_json::Value>,
19 #[serde(
21 rename = "lifetime",
22 default,
23 with = "::serde_with::rust::double_option",
24 skip_serializing_if = "Option::is_none"
25 )]
26 pub lifetime: Option<Option<f32>>,
27 #[serde(
29 rename = "allowed_clock_skew",
30 default,
31 with = "::serde_with::rust::double_option",
32 skip_serializing_if = "Option::is_none"
33 )]
34 pub allowed_clock_skew: Option<Option<f32>>,
35 #[serde(rename = "custom_signing_key", skip_serializing_if = "Option::is_none")]
37 pub custom_signing_key: Option<bool>,
38 #[serde(
40 rename = "signing_algorithm",
41 default,
42 with = "::serde_with::rust::double_option",
43 skip_serializing_if = "Option::is_none"
44 )]
45 pub signing_algorithm: Option<Option<String>>,
46 #[serde(
48 rename = "signing_key",
49 default,
50 with = "::serde_with::rust::double_option",
51 skip_serializing_if = "Option::is_none"
52 )]
53 pub signing_key: Option<Option<String>>,
54}
55
56impl CreateJwtTemplateRequest {
57 pub fn new() -> CreateJwtTemplateRequest {
58 CreateJwtTemplateRequest {
59 name: None,
60 claims: None,
61 lifetime: None,
62 allowed_clock_skew: None,
63 custom_signing_key: None,
64 signing_algorithm: None,
65 signing_key: None,
66 }
67 }
68}