/*
 * 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, Default, Serialize, Deserialize)]
pub struct UpdateOrganizationMembershipRequest {
	/// The new role of the given membership.
	#[serde(rename = "role")]
	pub role: Role,
}

impl UpdateOrganizationMembershipRequest {
	pub fn new(role: Role) -> UpdateOrganizationMembershipRequest {
		UpdateOrganizationMembershipRequest { role }
	}
}

/// The new role of the given membership.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Role {
	#[serde(rename = "admin")]
	Admin,
	#[serde(rename = "basic_member")]
	BasicMember,
}

impl Default for Role {
	fn default() -> Role {
		Self::Admin
	}
}
