clerk_rs/models/
o_auth_application.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 OAuthApplication {
13	#[serde(rename = "object")]
14	pub object: Object,
15	#[serde(rename = "id")]
16	pub id: String,
17	#[serde(rename = "instance_id")]
18	pub instance_id: String,
19	#[serde(rename = "name")]
20	pub name: String,
21	#[serde(rename = "client_id")]
22	pub client_id: String,
23	#[serde(rename = "public")]
24	pub public: bool,
25	#[serde(rename = "scopes")]
26	pub scopes: String,
27	#[serde(rename = "callback_url")]
28	pub callback_url: String,
29	#[serde(rename = "authorize_url")]
30	pub authorize_url: String,
31	#[serde(rename = "token_fetch_url")]
32	pub token_fetch_url: String,
33	#[serde(rename = "user_info_url")]
34	pub user_info_url: String,
35	/// Unix timestamp of creation.
36	#[serde(rename = "created_at")]
37	pub created_at: i64,
38	/// Unix timestamp of last update.
39	#[serde(rename = "updated_at")]
40	pub updated_at: i64,
41}
42
43impl OAuthApplication {
44	pub fn new(
45		object: Object,
46		id: String,
47		instance_id: String,
48		name: String,
49		client_id: String,
50		public: bool,
51		scopes: String,
52		callback_url: String,
53		authorize_url: String,
54		token_fetch_url: String,
55		user_info_url: String,
56		created_at: i64,
57		updated_at: i64,
58	) -> OAuthApplication {
59		OAuthApplication {
60			object,
61			id,
62			instance_id,
63			name,
64			client_id,
65			public,
66			scopes,
67			callback_url,
68			authorize_url,
69			token_fetch_url,
70			user_info_url,
71			created_at,
72			updated_at,
73		}
74	}
75}
76
77///
78#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
79pub enum Object {
80	#[serde(rename = "oauth_application")]
81	OauthApplication,
82}
83
84impl Default for Object {
85	fn default() -> Object {
86		Self::OauthApplication
87	}
88}