1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Clerk Backend API
*
* The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
*
* The version of the OpenAPI document: v1
* Contact: support@clerk.com
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateOrganizationRequest {
/// The name of the new organization
#[serde(rename = "name")]
pub name: String,
/// The ID of the User who will become the administrator for the new organization
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
pub created_by: Option<String>,
/// Metadata saved on the organization, accessible only from the Backend API
#[serde(rename = "private_metadata", skip_serializing_if = "Option::is_none")]
pub private_metadata: Option<serde_json::Value>,
/// Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API
#[serde(rename = "public_metadata", skip_serializing_if = "Option::is_none")]
pub public_metadata: Option<serde_json::Value>,
/// A slug for the new organization. Can contain only lowercase alphanumeric characters and the dash \"-\". Must be unique for the instance.
#[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
pub slug: Option<String>,
/// The maximum number of memberships allowed for this organization
#[serde(rename = "max_allowed_memberships", skip_serializing_if = "Option::is_none")]
pub max_allowed_memberships: Option<i64>,
/// A custom date/time denoting when the organization was created, specified in RFC3339 format (e.g. 2012-10-20T07:15:20.902Z).
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
}
impl CreateOrganizationRequest {
pub fn new(name: String) -> CreateOrganizationRequest {
CreateOrganizationRequest {
name,
created_by: None,
private_metadata: None,
public_metadata: None,
slug: None,
max_allowed_memberships: None,
created_at: None,
}
}
}