210 lines
11 KiB
Rust
210 lines
11 KiB
Rust
#![allow(unused_imports)]
|
|
#![allow(clippy::all)]
|
|
use super::*;
|
|
use wasm_bindgen::prelude::*;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[wasm_bindgen]
|
|
extern "C" {
|
|
#[wasm_bindgen(extends = "::js_sys::Object", js_name = "RegistrationResponseJSON")]
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
#[doc = "The `RegistrationResponseJson` dictionary."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
pub type RegistrationResponseJson;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Get the `authenticatorAttachment` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, getter = "authenticatorAttachment")]
|
|
pub fn get_authenticator_attachment(
|
|
this: &RegistrationResponseJson,
|
|
) -> Option<::alloc::string::String>;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Change the `authenticatorAttachment` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, setter = "authenticatorAttachment")]
|
|
pub fn set_authenticator_attachment(this: &RegistrationResponseJson, val: &str);
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[cfg(feature = "AuthenticationExtensionsClientOutputsJson")]
|
|
#[doc = "Get the `clientExtensionResults` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`, `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, getter = "clientExtensionResults")]
|
|
pub fn get_client_extension_results(
|
|
this: &RegistrationResponseJson,
|
|
) -> AuthenticationExtensionsClientOutputsJson;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[cfg(feature = "AuthenticationExtensionsClientOutputsJson")]
|
|
#[doc = "Change the `clientExtensionResults` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`, `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, setter = "clientExtensionResults")]
|
|
pub fn set_client_extension_results(
|
|
this: &RegistrationResponseJson,
|
|
val: &AuthenticationExtensionsClientOutputsJson,
|
|
);
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Get the `id` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, getter = "id")]
|
|
pub fn get_id(this: &RegistrationResponseJson) -> ::alloc::string::String;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Change the `id` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, setter = "id")]
|
|
pub fn set_id(this: &RegistrationResponseJson, val: &str);
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Get the `rawId` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, getter = "rawId")]
|
|
pub fn get_raw_id(this: &RegistrationResponseJson) -> ::alloc::string::String;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Change the `rawId` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, setter = "rawId")]
|
|
pub fn set_raw_id(this: &RegistrationResponseJson, val: &str);
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[cfg(feature = "AuthenticatorAttestationResponseJson")]
|
|
#[doc = "Get the `response` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`, `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, getter = "response")]
|
|
pub fn get_response(this: &RegistrationResponseJson) -> AuthenticatorAttestationResponseJson;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[cfg(feature = "AuthenticatorAttestationResponseJson")]
|
|
#[doc = "Change the `response` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`, `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, setter = "response")]
|
|
pub fn set_response(
|
|
this: &RegistrationResponseJson,
|
|
val: &AuthenticatorAttestationResponseJson,
|
|
);
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Get the `type` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, getter = "type")]
|
|
pub fn get_type(this: &RegistrationResponseJson) -> ::alloc::string::String;
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[doc = "Change the `type` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
#[wasm_bindgen(method, setter = "type")]
|
|
pub fn set_type(this: &RegistrationResponseJson, val: &str);
|
|
}
|
|
#[cfg(web_sys_unstable_apis)]
|
|
impl RegistrationResponseJson {
|
|
#[cfg(all(
|
|
feature = "AuthenticationExtensionsClientOutputsJson",
|
|
feature = "AuthenticatorAttestationResponseJson",
|
|
))]
|
|
#[doc = "Construct a new `RegistrationResponseJson`."]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`, `AuthenticatorAttestationResponseJson`, `RegistrationResponseJson`*"]
|
|
#[doc = ""]
|
|
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
|
|
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
|
|
pub fn new(
|
|
client_extension_results: &AuthenticationExtensionsClientOutputsJson,
|
|
id: &str,
|
|
raw_id: &str,
|
|
response: &AuthenticatorAttestationResponseJson,
|
|
type_: &str,
|
|
) -> Self {
|
|
#[allow(unused_mut)]
|
|
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
|
|
ret.set_client_extension_results(client_extension_results);
|
|
ret.set_id(id);
|
|
ret.set_raw_id(raw_id);
|
|
ret.set_response(response);
|
|
ret.set_type(type_);
|
|
ret
|
|
}
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[deprecated = "Use `set_authenticator_attachment()` instead."]
|
|
pub fn authenticator_attachment(&mut self, val: &str) -> &mut Self {
|
|
self.set_authenticator_attachment(val);
|
|
self
|
|
}
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[cfg(feature = "AuthenticationExtensionsClientOutputsJson")]
|
|
#[deprecated = "Use `set_client_extension_results()` instead."]
|
|
pub fn client_extension_results(
|
|
&mut self,
|
|
val: &AuthenticationExtensionsClientOutputsJson,
|
|
) -> &mut Self {
|
|
self.set_client_extension_results(val);
|
|
self
|
|
}
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[deprecated = "Use `set_id()` instead."]
|
|
pub fn id(&mut self, val: &str) -> &mut Self {
|
|
self.set_id(val);
|
|
self
|
|
}
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[deprecated = "Use `set_raw_id()` instead."]
|
|
pub fn raw_id(&mut self, val: &str) -> &mut Self {
|
|
self.set_raw_id(val);
|
|
self
|
|
}
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[cfg(feature = "AuthenticatorAttestationResponseJson")]
|
|
#[deprecated = "Use `set_response()` instead."]
|
|
pub fn response(&mut self, val: &AuthenticatorAttestationResponseJson) -> &mut Self {
|
|
self.set_response(val);
|
|
self
|
|
}
|
|
#[cfg(web_sys_unstable_apis)]
|
|
#[deprecated = "Use `set_type()` instead."]
|
|
pub fn type_(&mut self, val: &str) -> &mut Self {
|
|
self.set_type(val);
|
|
self
|
|
}
|
|
}
|