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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
113 #[wasm_bindgen(method, setter = "publicKeyAlgorithm")]
114 pub fn set_public_key_algorithm(this: &AuthenticatorAttestationResponseJson, val: f64);
115 #[cfg(web_sys_unstable_apis)]
116 #[doc = "Get the `transports` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
122 #[wasm_bindgen(method, getter = "transports")]
123 pub fn get_transports(this: &AuthenticatorAttestationResponseJson) -> ::js_sys::Array;
124 #[cfg(web_sys_unstable_apis)]
125 #[doc = "Change 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
131 #[wasm_bindgen(method, setter = "transports")]
132 pub fn set_transports(
133 this: &AuthenticatorAttestationResponseJson,
134 val: &::wasm_bindgen::JsValue,
135 );
136}
137#[cfg(web_sys_unstable_apis)]
138impl AuthenticatorAttestationResponseJson {
139 #[doc = "Construct a new `AuthenticatorAttestationResponseJson`."]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
145 pub fn new(
146 attestation_object: &str,
147 authenticator_data: &str,
148 client_data_json: &str,
149 public_key_algorithm: f64,
150 transports: &::wasm_bindgen::JsValue,
151 ) -> Self {
152 #[allow(unused_mut)]
153 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
154 ret.set_attestation_object(attestation_object);
155 ret.set_authenticator_data(authenticator_data);
156 ret.set_client_data_json(client_data_json);
157 ret.set_public_key_algorithm(public_key_algorithm);
158 ret.set_transports(transports);
159 ret
160 }
161 #[cfg(web_sys_unstable_apis)]
162 #[deprecated = "Use `set_attestation_object()` instead."]
163 pub fn attestation_object(&mut self, val: &str) -> &mut Self {
164 self.set_attestation_object(val);
165 self
166 }
167 #[cfg(web_sys_unstable_apis)]
168 #[deprecated = "Use `set_authenticator_data()` instead."]
169 pub fn authenticator_data(&mut self, val: &str) -> &mut Self {
170 self.set_authenticator_data(val);
171 self
172 }
173 #[cfg(web_sys_unstable_apis)]
174 #[deprecated = "Use `set_client_data_json()` instead."]
175 pub fn client_data_json(&mut self, val: &str) -> &mut Self {
176 self.set_client_data_json(val);
177 self
178 }
179 #[cfg(web_sys_unstable_apis)]
180 #[deprecated = "Use `set_public_key()` instead."]
181 pub fn public_key(&mut self, val: &str) -> &mut Self {
182 self.set_public_key(val);
183 self
184 }
185 #[cfg(web_sys_unstable_apis)]
186 #[deprecated = "Use `set_public_key_algorithm()` instead."]
187 pub fn public_key_algorithm(&mut self, val: f64) -> &mut Self {
188 self.set_public_key_algorithm(val);
189 self
190 }
191 #[cfg(web_sys_unstable_apis)]
192 #[deprecated = "Use `set_transports()` instead."]
193 pub fn transports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
194 self.set_transports(val);
195 self
196 }
197}