bitwarden_api_api/models/
credential_create_options.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};
use serde_with::serde_as;

use crate::models;

#[serde_as]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CredentialCreateOptions {
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")]
    pub error_message: Option<String>,
    #[serde(rename = "rp", skip_serializing_if = "Option::is_none")]
    pub rp: Option<Box<models::PublicKeyCredentialRpEntity>>,
    #[serde(rename = "user", skip_serializing_if = "Option::is_none")]
    pub user: Option<Box<models::Fido2User>>,
    #[serde_as(as = "Option<serde_with::base64::Base64>")]
    #[serde(rename = "challenge", skip_serializing_if = "Option::is_none")]
    pub challenge: Option<Vec<u8>>,
    #[serde(rename = "pubKeyCredParams", skip_serializing_if = "Option::is_none")]
    pub pub_key_cred_params: Option<Vec<models::PubKeyCredParam>>,
    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
    pub timeout: Option<i64>,
    #[serde(rename = "attestation", skip_serializing_if = "Option::is_none")]
    pub attestation: Option<models::AttestationConveyancePreference>,
    #[serde(
        rename = "authenticatorSelection",
        skip_serializing_if = "Option::is_none"
    )]
    pub authenticator_selection: Option<Box<models::AuthenticatorSelection>>,
    #[serde(rename = "excludeCredentials", skip_serializing_if = "Option::is_none")]
    pub exclude_credentials: Option<Vec<models::PublicKeyCredentialDescriptor>>,
    #[serde(rename = "extensions", skip_serializing_if = "Option::is_none")]
    pub extensions: Option<Box<models::AuthenticationExtensionsClientInputs>>,
}

impl CredentialCreateOptions {
    pub fn new() -> CredentialCreateOptions {
        CredentialCreateOptions {
            status: None,
            error_message: None,
            rp: None,
            user: None,
            challenge: None,
            pub_key_cred_params: None,
            timeout: None,
            attestation: None,
            authenticator_selection: None,
            exclude_credentials: None,
            extensions: None,
        }
    }
}