clerk_rs/models/
update_organization_request.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 UpdateOrganizationRequest {
13	/// Metadata saved on the organization, that is visible to both your frontend and backend.
14	#[serde(rename = "public_metadata", skip_serializing_if = "Option::is_none")]
15	pub public_metadata: Option<serde_json::Value>,
16	/// Metadata saved on the organization that is only visible to your backend.
17	#[serde(rename = "private_metadata", skip_serializing_if = "Option::is_none")]
18	pub private_metadata: Option<serde_json::Value>,
19	/// The new name of the organization
20	#[serde(
21		rename = "name",
22		default,
23		with = "::serde_with::rust::double_option",
24		skip_serializing_if = "Option::is_none"
25	)]
26	pub name: Option<Option<String>>,
27	/// The new slug of the organization, which needs to be unique in the instance
28	#[serde(
29		rename = "slug",
30		default,
31		with = "::serde_with::rust::double_option",
32		skip_serializing_if = "Option::is_none"
33	)]
34	pub slug: Option<Option<String>>,
35	/// The maximum number of memberships allowed for this organization
36	#[serde(
37		rename = "max_allowed_memberships",
38		default,
39		with = "::serde_with::rust::double_option",
40		skip_serializing_if = "Option::is_none"
41	)]
42	pub max_allowed_memberships: Option<Option<i64>>,
43	/// If true, an admin can delete this organization with the Frontend API.
44	#[serde(
45		rename = "admin_delete_enabled",
46		default,
47		with = "::serde_with::rust::double_option",
48		skip_serializing_if = "Option::is_none"
49	)]
50	pub admin_delete_enabled: Option<Option<bool>>,
51}
52
53impl UpdateOrganizationRequest {
54	pub fn new() -> UpdateOrganizationRequest {
55		UpdateOrganizationRequest {
56			public_metadata: None,
57			private_metadata: None,
58			name: None,
59			slug: None,
60			max_allowed_memberships: None,
61			admin_delete_enabled: None,
62		}
63	}
64}