/*
 * doqium - service-auth REST API
 *
 * doqium - service-auth REST API
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::doqium_auth_client::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RegisterUserKeyRequest {
    #[serde(rename = "keyType")]
    pub key_type: String,
    #[serde(rename = "alias", skip_serializing_if = "Option::is_none")]
    pub alias: Option<String>,
    #[serde(rename = "response")]
    pub response: Box<models::RegisterUserKeyRequestResponse>,
    #[serde(
        rename = "authenticatorAttachment",
        skip_serializing_if = "Option::is_none"
    )]
    pub authenticator_attachment: Option<String>,
}

impl RegisterUserKeyRequest {
    pub fn new(
        key_type: String,
        response: models::RegisterUserKeyRequestResponse,
    ) -> RegisterUserKeyRequest {
        RegisterUserKeyRequest {
            key_type,
            alias: None,
            response: Box::new(response),
            authenticator_attachment: None,
        }
    }
}
