/*
 * 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 EmailAddressVerification {
	#[serde(rename = "status")]
	pub status: Status,
	#[serde(rename = "strategy")]
	pub strategy: Strategy,
	#[serde(rename = "attempts", deserialize_with = "Option::deserialize")]
	pub attempts: Option<i32>,
	#[serde(rename = "expire_at", deserialize_with = "Option::deserialize")]
	pub expire_at: Option<i32>,
}

impl EmailAddressVerification {
	pub fn new(status: Status, strategy: Strategy, attempts: Option<i32>, expire_at: Option<i32>) -> EmailAddressVerification {
		EmailAddressVerification {
			status,
			strategy,
			attempts,
			expire_at,
		}
	}
}

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
	#[serde(rename = "verified")]
	Verified,
}

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

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