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(
9 extends = "::js_sys::Object",
10 js_name = "AuthenticatorAttestationResponseJSON"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `AuthenticatorAttestationResponseJson` dictionary."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
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 AuthenticatorAttestationResponseJson;
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: `AuthenticatorAttestationResponseJson`*"]
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: &AuthenticatorAttestationResponseJson,
30 ) -> ::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: `AuthenticatorAttestationResponseJson`*"]
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: &AuthenticatorAttestationResponseJson, 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: `AuthenticatorAttestationResponseJson`*"]
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: &AuthenticatorAttestationResponseJson,
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: `AuthenticatorAttestationResponseJson`*"]
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: &AuthenticatorAttestationResponseJson, 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: `AuthenticatorAttestationResponseJson`*"]
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: &AuthenticatorAttestationResponseJson,
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: `AuthenticatorAttestationResponseJson`*"]
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: &AuthenticatorAttestationResponseJson, val: &str);
80 #[cfg(web_sys_unstable_apis)]
81 #[doc = "Get the `publicKey` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
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 = "publicKey")]
88 pub fn get_public_key(
89 this: &AuthenticatorAttestationResponseJson,
90 ) -> Option<::alloc::string::String>;
91 #[cfg(web_sys_unstable_apis)]
92 #[doc = "Change the `publicKey` field of this object."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 #[wasm_bindgen(method, setter = "publicKey")]
99 pub fn set_public_key(this: &AuthenticatorAttestationResponseJson, val: &str);
100 #[cfg(web_sys_unstable_apis)]
101 #[doc = "Get the `publicKeyAlgorithm` field of this object."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
104 #[doc = ""]
105 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
107 #[wasm_bindgen(method, getter = "publicKeyAlgorithm")]
108 pub fn get_public_key_algorithm(this: &AuthenticatorAttestationResponseJson) -> f64;
109 #[cfg(web_sys_unstable_apis)]
110 #[doc = "Change the `publicKeyAlgorithm` field of this object."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
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 = "publicKeyAlgorithm")]
117 pub fn set_public_key_algorithm(this: &AuthenticatorAttestationResponseJson, val: i32);
118 #[cfg(web_sys_unstable_apis)]
119 #[doc = "Change the `publicKeyAlgorithm` field of this object."]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
122 #[doc = ""]
123 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
124 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
125 #[wasm_bindgen(method, setter = "publicKeyAlgorithm")]
126 pub fn set_public_key_algorithm_f64(this: &AuthenticatorAttestationResponseJson, val: f64);
127 #[cfg(web_sys_unstable_apis)]
128 #[doc = "Get the `transports` field of this object."]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
131 #[doc = ""]
132 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
133 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
134 #[wasm_bindgen(method, getter = "transports")]
135 pub fn get_transports(
136 this: &AuthenticatorAttestationResponseJson,
137 ) -> ::js_sys::Array<::js_sys::JsString>;
138 #[cfg(web_sys_unstable_apis)]
139 #[doc = "Change the `transports` field of this object."]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
142 #[doc = ""]
143 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
144 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
145 #[wasm_bindgen(method, setter = "transports")]
146 pub fn set_transports(this: &AuthenticatorAttestationResponseJson, val: &[::js_sys::JsString]);
147}
148#[cfg(web_sys_unstable_apis)]
149impl AuthenticatorAttestationResponseJson {
150 #[doc = "Construct a new `AuthenticatorAttestationResponseJson`."]
151 #[doc = ""]
152 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
153 #[doc = ""]
154 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
155 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
156 pub fn new(
157 attestation_object: &str,
158 authenticator_data: &str,
159 client_data_json: &str,
160 public_key_algorithm: i32,
161 transports: &[::js_sys::JsString],
162 ) -> Self {
163 #[allow(unused_mut)]
164 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
165 ret.set_attestation_object(attestation_object);
166 ret.set_authenticator_data(authenticator_data);
167 ret.set_client_data_json(client_data_json);
168 ret.set_public_key_algorithm(public_key_algorithm);
169 ret.set_transports(transports);
170 ret
171 }
172 #[doc = "Construct a new `AuthenticatorAttestationResponseJson`."]
173 #[doc = ""]
174 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`*"]
175 #[doc = ""]
176 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
177 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
178 pub fn new_with_f64(
179 attestation_object: &str,
180 authenticator_data: &str,
181 client_data_json: &str,
182 public_key_algorithm: f64,
183 transports: &[::js_sys::JsString],
184 ) -> Self {
185 #[allow(unused_mut)]
186 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
187 ret.set_attestation_object(attestation_object);
188 ret.set_authenticator_data(authenticator_data);
189 ret.set_client_data_json(client_data_json);
190 ret.set_public_key_algorithm_f64(public_key_algorithm);
191 ret.set_transports(transports);
192 ret
193 }
194 #[cfg(web_sys_unstable_apis)]
195 #[deprecated = "Use `set_attestation_object()` instead."]
196 pub fn attestation_object(&mut self, val: &str) -> &mut Self {
197 self.set_attestation_object(val);
198 self
199 }
200 #[cfg(web_sys_unstable_apis)]
201 #[deprecated = "Use `set_authenticator_data()` instead."]
202 pub fn authenticator_data(&mut self, val: &str) -> &mut Self {
203 self.set_authenticator_data(val);
204 self
205 }
206 #[cfg(web_sys_unstable_apis)]
207 #[deprecated = "Use `set_client_data_json()` instead."]
208 pub fn client_data_json(&mut self, val: &str) -> &mut Self {
209 self.set_client_data_json(val);
210 self
211 }
212 #[cfg(web_sys_unstable_apis)]
213 #[deprecated = "Use `set_public_key()` instead."]
214 pub fn public_key(&mut self, val: &str) -> &mut Self {
215 self.set_public_key(val);
216 self
217 }
218 #[cfg(web_sys_unstable_apis)]
219 #[deprecated = "Use `set_public_key_algorithm()` instead."]
220 pub fn public_key_algorithm(&mut self, val: i32) -> &mut Self {
221 self.set_public_key_algorithm(val);
222 self
223 }
224 #[cfg(web_sys_unstable_apis)]
225 #[deprecated = "Use `set_transports()` instead."]
226 pub fn transports(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
227 self.set_transports(val);
228 self
229 }
230}