clerk_rs/models/
domain.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 Domain {
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 = "is_satellite")]
20	pub is_satellite: bool,
21	#[serde(rename = "frontend_api_url")]
22	pub frontend_api_url: String,
23	/// Null for satellite domains.
24	#[serde(
25		rename = "accounts_portal_url",
26		default,
27		with = "::serde_with::rust::double_option",
28		skip_serializing_if = "Option::is_none"
29	)]
30	pub accounts_portal_url: Option<Option<String>>,
31	#[serde(
32		rename = "proxy_url",
33		default,
34		with = "::serde_with::rust::double_option",
35		skip_serializing_if = "Option::is_none"
36	)]
37	pub proxy_url: Option<Option<String>>,
38	#[serde(rename = "development_origin")]
39	pub development_origin: String,
40	#[serde(
41		rename = "cname_targets",
42		default,
43		with = "::serde_with::rust::double_option",
44		skip_serializing_if = "Option::is_none"
45	)]
46	pub cname_targets: Option<Option<Vec<crate::models::CNameTarget>>>,
47}
48
49impl Domain {
50	pub fn new(object: Object, id: String, name: String, is_satellite: bool, frontend_api_url: String, development_origin: String) -> Domain {
51		Domain {
52			object,
53			id,
54			name,
55			is_satellite,
56			frontend_api_url,
57			accounts_portal_url: None,
58			proxy_url: None,
59			development_origin,
60			cname_targets: None,
61		}
62	}
63}
64
65///
66#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
67pub enum Object {
68	#[serde(rename = "domain")]
69	Domain,
70}
71
72impl Default for Object {
73	fn default() -> Object {
74		Self::Domain
75	}
76}