clerk-rs 0.4.2

The official community Rust SDK for the Clerk API
Documentation
/*
 * 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
 */

/// OrganizationMembership : Hello world

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct OrganizationMembership {
	#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
	pub id: Option<String>,
	/// String representing the object's type. Objects of the same type share the same value.
	#[serde(rename = "object", skip_serializing_if = "Option::is_none")]
	pub object: Option<Object>,
	#[serde(rename = "role", skip_serializing_if = "Option::is_none")]
	pub role: Option<String>,
	#[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
	pub permissions: Option<Vec<String>>,
	/// Metadata saved on the organization membership, accessible from both Frontend and Backend APIs
	#[serde(rename = "public_metadata", skip_serializing_if = "Option::is_none")]
	pub public_metadata: Option<serde_json::Value>,
	/// Metadata saved on the organization membership, accessible only from the Backend API
	#[serde(rename = "private_metadata", skip_serializing_if = "Option::is_none")]
	pub private_metadata: Option<serde_json::Value>,
	#[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
	pub organization: Option<Box<crate::models::Organization>>,
	#[serde(rename = "public_user_data", skip_serializing_if = "Option::is_none")]
	pub public_user_data: Option<Box<crate::models::OrganizationMembershipPublicUserData>>,
	/// Unix timestamp of creation.
	#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
	pub created_at: Option<i64>,
	/// Unix timestamp of last update.
	#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
	pub updated_at: Option<i64>,
}

impl OrganizationMembership {
	/// Hello world
	pub fn new() -> OrganizationMembership {
		OrganizationMembership {
			id: None,
			object: None,
			role: None,
			permissions: None,
			public_metadata: None,
			private_metadata: None,
			organization: None,
			public_user_data: None,
			created_at: None,
			updated_at: None,
		}
	}
}

/// String representing the object's type. Objects of the same type share the same value.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Object {
	#[serde(rename = "organization_membership")]
	OrganizationMembership,
}

impl Default for Object {
	fn default() -> Object {
		Self::OrganizationMembership
	}
}