/*
 * 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 VerifyTotp200Response {
	#[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
	pub verified: Option<bool>,
	#[serde(rename = "code_type", skip_serializing_if = "Option::is_none")]
	pub code_type: Option<CodeType>,
}

impl VerifyTotp200Response {
	pub fn new() -> VerifyTotp200Response {
		VerifyTotp200Response {
			verified: None,
			code_type: None,
		}
	}
}

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CodeType {
	#[serde(rename = "totp")]
	Totp,
	#[serde(rename = "backup_code")]
	BackupCode,
}

impl Default for CodeType {
	fn default() -> CodeType {
		Self::Totp
	}
}
