Skip to main content

web_sys/features/
gen_AuthenticatorAssertionResponseJson.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "AuthenticatorAssertionResponseJSON"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `AuthenticatorAssertionResponseJson` dictionary."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
16    #[doc = ""]
17    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19    pub type AuthenticatorAssertionResponseJson;
20    #[cfg(web_sys_unstable_apis)]
21    #[doc = "Get the `attestationObject` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
24    #[doc = ""]
25    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
27    #[wasm_bindgen(method, getter = "attestationObject")]
28    pub fn get_attestation_object(
29        this: &AuthenticatorAssertionResponseJson,
30    ) -> Option<::alloc::string::String>;
31    #[cfg(web_sys_unstable_apis)]
32    #[doc = "Change the `attestationObject` field of this object."]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
35    #[doc = ""]
36    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
37    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
38    #[wasm_bindgen(method, setter = "attestationObject")]
39    pub fn set_attestation_object(this: &AuthenticatorAssertionResponseJson, val: &str);
40    #[cfg(web_sys_unstable_apis)]
41    #[doc = "Get the `authenticatorData` field of this object."]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
44    #[doc = ""]
45    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
46    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
47    #[wasm_bindgen(method, getter = "authenticatorData")]
48    pub fn get_authenticator_data(
49        this: &AuthenticatorAssertionResponseJson,
50    ) -> ::alloc::string::String;
51    #[cfg(web_sys_unstable_apis)]
52    #[doc = "Change the `authenticatorData` field of this object."]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
55    #[doc = ""]
56    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
57    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
58    #[wasm_bindgen(method, setter = "authenticatorData")]
59    pub fn set_authenticator_data(this: &AuthenticatorAssertionResponseJson, val: &str);
60    #[cfg(web_sys_unstable_apis)]
61    #[doc = "Get the `clientDataJSON` field of this object."]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
64    #[doc = ""]
65    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67    #[wasm_bindgen(method, getter = "clientDataJSON")]
68    pub fn get_client_data_json(
69        this: &AuthenticatorAssertionResponseJson,
70    ) -> ::alloc::string::String;
71    #[cfg(web_sys_unstable_apis)]
72    #[doc = "Change the `clientDataJSON` field of this object."]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
75    #[doc = ""]
76    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
78    #[wasm_bindgen(method, setter = "clientDataJSON")]
79    pub fn set_client_data_json(this: &AuthenticatorAssertionResponseJson, val: &str);
80    #[cfg(web_sys_unstable_apis)]
81    #[doc = "Get the `signature` field of this object."]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
84    #[doc = ""]
85    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
87    #[wasm_bindgen(method, getter = "signature")]
88    pub fn get_signature(this: &AuthenticatorAssertionResponseJson) -> ::alloc::string::String;
89    #[cfg(web_sys_unstable_apis)]
90    #[doc = "Change the `signature` field of this object."]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
93    #[doc = ""]
94    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
95    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
96    #[wasm_bindgen(method, setter = "signature")]
97    pub fn set_signature(this: &AuthenticatorAssertionResponseJson, val: &str);
98    #[cfg(web_sys_unstable_apis)]
99    #[doc = "Get the `userHandle` field of this object."]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
102    #[doc = ""]
103    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
104    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
105    #[wasm_bindgen(method, getter = "userHandle")]
106    pub fn get_user_handle(
107        this: &AuthenticatorAssertionResponseJson,
108    ) -> Option<::alloc::string::String>;
109    #[cfg(web_sys_unstable_apis)]
110    #[doc = "Change the `userHandle` field of this object."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
113    #[doc = ""]
114    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
115    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
116    #[wasm_bindgen(method, setter = "userHandle")]
117    pub fn set_user_handle(this: &AuthenticatorAssertionResponseJson, val: &str);
118}
119#[cfg(web_sys_unstable_apis)]
120impl AuthenticatorAssertionResponseJson {
121    #[doc = "Construct a new `AuthenticatorAssertionResponseJson`."]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
124    #[doc = ""]
125    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
127    pub fn new(authenticator_data: &str, client_data_json: &str, signature: &str) -> Self {
128        #[allow(unused_mut)]
129        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
130        ret.set_authenticator_data(authenticator_data);
131        ret.set_client_data_json(client_data_json);
132        ret.set_signature(signature);
133        ret
134    }
135    #[cfg(web_sys_unstable_apis)]
136    #[deprecated = "Use `set_attestation_object()` instead."]
137    pub fn attestation_object(&mut self, val: &str) -> &mut Self {
138        self.set_attestation_object(val);
139        self
140    }
141    #[cfg(web_sys_unstable_apis)]
142    #[deprecated = "Use `set_authenticator_data()` instead."]
143    pub fn authenticator_data(&mut self, val: &str) -> &mut Self {
144        self.set_authenticator_data(val);
145        self
146    }
147    #[cfg(web_sys_unstable_apis)]
148    #[deprecated = "Use `set_client_data_json()` instead."]
149    pub fn client_data_json(&mut self, val: &str) -> &mut Self {
150        self.set_client_data_json(val);
151        self
152    }
153    #[cfg(web_sys_unstable_apis)]
154    #[deprecated = "Use `set_signature()` instead."]
155    pub fn signature(&mut self, val: &str) -> &mut Self {
156        self.set_signature(val);
157        self
158    }
159    #[cfg(web_sys_unstable_apis)]
160    #[deprecated = "Use `set_user_handle()` instead."]
161    pub fn user_handle(&mut self, val: &str) -> &mut Self {
162        self.set_user_handle(val);
163        self
164    }
165}