clerk_rs/models/
instance_restrictions.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 InstanceRestrictions {
13	/// String representing the object's type. Objects of the same type share the same value.
14	#[serde(rename = "object", skip_serializing_if = "Option::is_none")]
15	pub object: Option<Object>,
16	#[serde(rename = "allowlist", skip_serializing_if = "Option::is_none")]
17	pub allowlist: Option<bool>,
18	#[serde(rename = "blocklist", skip_serializing_if = "Option::is_none")]
19	pub blocklist: Option<bool>,
20	#[serde(rename = "block_email_subaddresses", skip_serializing_if = "Option::is_none")]
21	pub block_email_subaddresses: Option<bool>,
22}
23
24impl InstanceRestrictions {
25	pub fn new() -> InstanceRestrictions {
26		InstanceRestrictions {
27			object: None,
28			allowlist: None,
29			blocklist: None,
30			block_email_subaddresses: None,
31		}
32	}
33}
34
35/// String representing the object's type. Objects of the same type share the same value.
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
37pub enum Object {
38	#[serde(rename = "instance_restrictions")]
39	InstanceRestrictions,
40}
41
42impl Default for Object {
43	fn default() -> Object {
44		Self::InstanceRestrictions
45	}
46}