clerk_rs/models/
saml_connection.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct SamlConnection {
13	#[serde(rename = "object")]
14	pub object: Object,
15	#[serde(rename = "id")]
16	pub id: String,
17	#[serde(rename = "name")]
18	pub name: String,
19	#[serde(rename = "domain")]
20	pub domain: String,
21	#[serde(rename = "idp_entity_id", deserialize_with = "Option::deserialize")]
22	pub idp_entity_id: Option<String>,
23	#[serde(rename = "idp_sso_url", deserialize_with = "Option::deserialize")]
24	pub idp_sso_url: Option<String>,
25	#[serde(rename = "idp_certificate", deserialize_with = "Option::deserialize")]
26	pub idp_certificate: Option<String>,
27	#[serde(rename = "acs_url")]
28	pub acs_url: String,
29	#[serde(rename = "sp_entity_id")]
30	pub sp_entity_id: String,
31	#[serde(rename = "active")]
32	pub active: bool,
33	#[serde(rename = "provider")]
34	pub provider: String,
35	#[serde(rename = "user_count")]
36	pub user_count: i64,
37	#[serde(rename = "sync_user_attributes")]
38	pub sync_user_attributes: bool,
39	/// Unix timestamp of creation.
40	#[serde(rename = "created_at")]
41	pub created_at: i64,
42	/// Unix timestamp of last update.
43	#[serde(rename = "updated_at")]
44	pub updated_at: i64,
45}
46
47impl SamlConnection {
48	pub fn new(
49		object: Object,
50		id: String,
51		name: String,
52		domain: String,
53		idp_entity_id: Option<String>,
54		idp_sso_url: Option<String>,
55		idp_certificate: Option<String>,
56		acs_url: String,
57		sp_entity_id: String,
58		active: bool,
59		provider: String,
60		user_count: i64,
61		sync_user_attributes: bool,
62		created_at: i64,
63		updated_at: i64,
64	) -> SamlConnection {
65		SamlConnection {
66			object,
67			id,
68			name,
69			domain,
70			idp_entity_id,
71			idp_sso_url,
72			idp_certificate,
73			acs_url,
74			sp_entity_id,
75			active,
76			provider,
77			user_count,
78			sync_user_attributes,
79			created_at,
80			updated_at,
81		}
82	}
83}
84
85///
86#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
87pub enum Object {
88	#[serde(rename = "saml_connection")]
89	SamlConnection,
90}
91
92impl Default for Object {
93	fn default() -> Object {
94		Self::SamlConnection
95	}
96}