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
 */

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct SamlAccountVerification {
	#[serde(rename = "status")]
	pub status: Status,
	#[serde(rename = "strategy")]
	pub strategy: Strategy,
	#[serde(rename = "external_verification_redirect_url")]
	pub external_verification_redirect_url: Option<String>,
	#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
	pub error: Option<Box<crate::models::SamlError>>,
	#[serde(rename = "expire_at")]
	pub expire_at: i64,
	#[serde(rename = "attempts", skip_serializing_if = "Option::is_none")]
	pub attempts: Option<i64>,
}

impl SamlAccountVerification {
	pub fn new(status: Status, strategy: Strategy, external_verification_redirect_url: Option<String>, expire_at: i64) -> SamlAccountVerification {
		SamlAccountVerification {
			status,
			strategy,
			external_verification_redirect_url,
			error: None,
			expire_at,
			attempts: None,
		}
	}
}

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
	#[serde(rename = "unverified")]
	Unverified,
	#[serde(rename = "verified")]
	Verified,
	#[serde(rename = "failed")]
	Failed,
	#[serde(rename = "expired")]
	Expired,
	#[serde(rename = "transferable")]
	Transferable,
}

impl Default for Status {
	fn default() -> Status {
		Self::Unverified
	}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Strategy {
	#[serde(rename = "saml")]
	Saml,
}

impl Default for Strategy {
	fn default() -> Strategy {
		Self::Saml
	}
}