web_sys/features/
gen_AuthenticatorAttestationResponseJson.rs1#![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 (extends = :: js_sys :: Object , js_name = AuthenticatorAttestationResponseJSON)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `AuthenticatorAttestationResponseJson` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type AuthenticatorAttestationResponseJson;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `attestationObject` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "attestationObject")]
25 pub fn get_attestation_object(
26 this: &AuthenticatorAttestationResponseJson,
27 ) -> ::alloc::string::String;
28 #[cfg(web_sys_unstable_apis)]
29 #[doc = "Change the `attestationObject` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "attestationObject")]
36 pub fn set_attestation_object(this: &AuthenticatorAttestationResponseJson, val: &str);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `authenticatorData` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
41 #[doc = ""]
42 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "authenticatorData")]
45 pub fn get_authenticator_data(
46 this: &AuthenticatorAttestationResponseJson,
47 ) -> ::alloc::string::String;
48 #[cfg(web_sys_unstable_apis)]
49 #[doc = "Change the `authenticatorData` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "authenticatorData")]
56 pub fn set_authenticator_data(this: &AuthenticatorAttestationResponseJson, val: &str);
57 #[cfg(web_sys_unstable_apis)]
58 #[doc = "Get the `clientDataJSON` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
61 #[doc = ""]
62 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
64 #[wasm_bindgen(method, getter = "clientDataJSON")]
65 pub fn get_client_data_json(
66 this: &AuthenticatorAttestationResponseJson,
67 ) -> ::alloc::string::String;
68 #[cfg(web_sys_unstable_apis)]
69 #[doc = "Change the `clientDataJSON` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
72 #[doc = ""]
73 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 #[wasm_bindgen(method, setter = "clientDataJSON")]
76 pub fn set_client_data_json(this: &AuthenticatorAttestationResponseJson, val: &str);
77 #[cfg(web_sys_unstable_apis)]
78 #[doc = "Get the `publicKey` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
81 #[doc = ""]
82 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
84 #[wasm_bindgen(method, getter = "publicKey")]
85 pub fn get_public_key(
86 this: &AuthenticatorAttestationResponseJson,
87 ) -> Option<::alloc::string::String>;
88 #[cfg(web_sys_unstable_apis)]
89 #[doc = "Change the `publicKey` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
92 #[doc = ""]
93 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 #[wasm_bindgen(method, setter = "publicKey")]
96 pub fn set_public_key(this: &AuthenticatorAttestationResponseJson, val: &str);
97 #[cfg(web_sys_unstable_apis)]
98 #[doc = "Get the `publicKeyAlgorithm` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
101 #[doc = ""]
102 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
104 #[wasm_bindgen(method, getter = "publicKeyAlgorithm")]
105 pub fn get_public_key_algorithm(this: &AuthenticatorAttestationResponseJson) -> f64;
106 #[cfg(web_sys_unstable_apis)]
107 #[doc = "Change the `publicKeyAlgorithm` field of this object."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
110 #[doc = ""]
111 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
112 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
113 #[wasm_bindgen(method, setter = "publicKeyAlgorithm")]
114 pub fn set_public_key_algorithm(this: &AuthenticatorAttestationResponseJson, val: i32);
115 #[cfg(web_sys_unstable_apis)]
116 #[doc = "Change the `publicKeyAlgorithm` field of this object."]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
119 #[doc = ""]
120 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
122 #[wasm_bindgen(method, setter = "publicKeyAlgorithm")]
123 pub fn set_public_key_algorithm_f64(this: &AuthenticatorAttestationResponseJson, val: f64);
124 #[cfg(web_sys_unstable_apis)]
125 #[doc = "Get the `transports` field of this object."]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
128 #[doc = ""]
129 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
130 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
131 #[wasm_bindgen(method, getter = "transports")]
132 pub fn get_transports(
133 this: &AuthenticatorAttestationResponseJson,
134 ) -> ::js_sys::Array<::js_sys::JsString>;
135 #[cfg(web_sys_unstable_apis)]
136 #[doc = "Change the `transports` field of this object."]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
139 #[doc = ""]
140 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
142 #[wasm_bindgen(method, setter = "transports")]
143 pub fn set_transports(this: &AuthenticatorAttestationResponseJson, val: &[::js_sys::JsString]);
144}
145#[cfg(web_sys_unstable_apis)]
146impl AuthenticatorAttestationResponseJson {
147 #[doc = "Construct a new `AuthenticatorAttestationResponseJson`."]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
150 #[doc = ""]
151 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
152 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
153 pub fn new(
154 attestation_object: &str,
155 authenticator_data: &str,
156 client_data_json: &str,
157 public_key_algorithm: i32,
158 transports: &[::js_sys::JsString],
159 ) -> Self {
160 #[allow(unused_mut)]
161 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
162 ret.set_attestation_object(attestation_object);
163 ret.set_authenticator_data(authenticator_data);
164 ret.set_client_data_json(client_data_json);
165 ret.set_public_key_algorithm(public_key_algorithm);
166 ret.set_transports(transports);
167 ret
168 }
169 #[doc = "Construct a new `AuthenticatorAttestationResponseJson`."]
170 #[doc = ""]
171 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
172 #[doc = ""]
173 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
174 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
175 pub fn new_with_f64(
176 attestation_object: &str,
177 authenticator_data: &str,
178 client_data_json: &str,
179 public_key_algorithm: f64,
180 transports: &[::js_sys::JsString],
181 ) -> Self {
182 #[allow(unused_mut)]
183 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
184 ret.set_attestation_object(attestation_object);
185 ret.set_authenticator_data(authenticator_data);
186 ret.set_client_data_json(client_data_json);
187 ret.set_public_key_algorithm_f64(public_key_algorithm);
188 ret.set_transports(transports);
189 ret
190 }
191 #[cfg(web_sys_unstable_apis)]
192 #[deprecated = "Use `set_attestation_object()` instead."]
193 pub fn attestation_object(&mut self, val: &str) -> &mut Self {
194 self.set_attestation_object(val);
195 self
196 }
197 #[cfg(web_sys_unstable_apis)]
198 #[deprecated = "Use `set_authenticator_data()` instead."]
199 pub fn authenticator_data(&mut self, val: &str) -> &mut Self {
200 self.set_authenticator_data(val);
201 self
202 }
203 #[cfg(web_sys_unstable_apis)]
204 #[deprecated = "Use `set_client_data_json()` instead."]
205 pub fn client_data_json(&mut self, val: &str) -> &mut Self {
206 self.set_client_data_json(val);
207 self
208 }
209 #[cfg(web_sys_unstable_apis)]
210 #[deprecated = "Use `set_public_key()` instead."]
211 pub fn public_key(&mut self, val: &str) -> &mut Self {
212 self.set_public_key(val);
213 self
214 }
215 #[cfg(web_sys_unstable_apis)]
216 #[deprecated = "Use `set_public_key_algorithm()` instead."]
217 pub fn public_key_algorithm(&mut self, val: i32) -> &mut Self {
218 self.set_public_key_algorithm(val);
219 self
220 }
221 #[cfg(web_sys_unstable_apis)]
222 #[deprecated = "Use `set_transports()` instead."]
223 pub fn transports(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
224 self.set_transports(val);
225 self
226 }
227}