web_sys/features/
gen_RegistrationResponseJson.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 = RegistrationResponseJSON)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `RegistrationResponseJson` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
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 RegistrationResponseJson;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `authenticatorAttachment` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
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 = "authenticatorAttachment")]
25 pub fn get_authenticator_attachment(
26 this: &RegistrationResponseJson,
27 ) -> Option<::alloc::string::String>;
28 #[cfg(web_sys_unstable_apis)]
29 #[doc = "Change the `authenticatorAttachment` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
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 = "authenticatorAttachment")]
36 pub fn set_authenticator_attachment(this: &RegistrationResponseJson, val: &str);
37 #[cfg(web_sys_unstable_apis)]
38 #[cfg(feature = "AuthenticationExtensionsClientOutputsJson")]
39 #[doc = "Get the `clientExtensionResults` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`, `RegistrationResponseJson`*"]
42 #[doc = ""]
43 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
45 #[wasm_bindgen(method, getter = "clientExtensionResults")]
46 pub fn get_client_extension_results(
47 this: &RegistrationResponseJson,
48 ) -> AuthenticationExtensionsClientOutputsJson;
49 #[cfg(web_sys_unstable_apis)]
50 #[cfg(feature = "AuthenticationExtensionsClientOutputsJson")]
51 #[doc = "Change the `clientExtensionResults` field of this object."]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`, `RegistrationResponseJson`*"]
54 #[doc = ""]
55 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
57 #[wasm_bindgen(method, setter = "clientExtensionResults")]
58 pub fn set_client_extension_results(
59 this: &RegistrationResponseJson,
60 val: &AuthenticationExtensionsClientOutputsJson,
61 );
62 #[cfg(web_sys_unstable_apis)]
63 #[doc = "Get the `id` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
66 #[doc = ""]
67 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
69 #[wasm_bindgen(method, getter = "id")]
70 pub fn get_id(this: &RegistrationResponseJson) -> ::alloc::string::String;
71 #[cfg(web_sys_unstable_apis)]
72 #[doc = "Change the `id` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
78 #[wasm_bindgen(method, setter = "id")]
79 pub fn set_id(this: &RegistrationResponseJson, val: &str);
80 #[cfg(web_sys_unstable_apis)]
81 #[doc = "Get the `rawId` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
87 #[wasm_bindgen(method, getter = "rawId")]
88 pub fn get_raw_id(this: &RegistrationResponseJson) -> ::alloc::string::String;
89 #[cfg(web_sys_unstable_apis)]
90 #[doc = "Change the `rawId` field of this object."]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
96 #[wasm_bindgen(method, setter = "rawId")]
97 pub fn set_raw_id(this: &RegistrationResponseJson, val: &str);
98 #[cfg(web_sys_unstable_apis)]
99 #[cfg(feature = "AuthenticatorAttestationResponseJson")]
100 #[doc = "Get the `response` field of this object."]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`, `RegistrationResponseJson`*"]
103 #[doc = ""]
104 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
106 #[wasm_bindgen(method, getter = "response")]
107 pub fn get_response(this: &RegistrationResponseJson) -> AuthenticatorAttestationResponseJson;
108 #[cfg(web_sys_unstable_apis)]
109 #[cfg(feature = "AuthenticatorAttestationResponseJson")]
110 #[doc = "Change the `response` field of this object."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttestationResponseJson`, `RegistrationResponseJson`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
116 #[wasm_bindgen(method, setter = "response")]
117 pub fn set_response(
118 this: &RegistrationResponseJson,
119 val: &AuthenticatorAttestationResponseJson,
120 );
121 #[cfg(web_sys_unstable_apis)]
122 #[doc = "Get the `type` field of this object."]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
125 #[doc = ""]
126 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
127 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
128 #[wasm_bindgen(method, getter = "type")]
129 pub fn get_type(this: &RegistrationResponseJson) -> ::alloc::string::String;
130 #[cfg(web_sys_unstable_apis)]
131 #[doc = "Change the `type` field of this object."]
132 #[doc = ""]
133 #[doc = "*This API requires the following crate features to be activated: `RegistrationResponseJson`*"]
134 #[doc = ""]
135 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
136 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
137 #[wasm_bindgen(method, setter = "type")]
138 pub fn set_type(this: &RegistrationResponseJson, val: &str);
139}
140#[cfg(web_sys_unstable_apis)]
141impl RegistrationResponseJson {
142 #[cfg(all(
143 feature = "AuthenticationExtensionsClientOutputsJson",
144 feature = "AuthenticatorAttestationResponseJson",
145 ))]
146 #[doc = "Construct a new `RegistrationResponseJson`."]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`, `AuthenticatorAttestationResponseJson`, `RegistrationResponseJson`*"]
149 #[doc = ""]
150 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
151 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
152 pub fn new(
153 client_extension_results: &AuthenticationExtensionsClientOutputsJson,
154 id: &str,
155 raw_id: &str,
156 response: &AuthenticatorAttestationResponseJson,
157 type_: &str,
158 ) -> Self {
159 #[allow(unused_mut)]
160 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
161 ret.set_client_extension_results(client_extension_results);
162 ret.set_id(id);
163 ret.set_raw_id(raw_id);
164 ret.set_response(response);
165 ret.set_type(type_);
166 ret
167 }
168 #[cfg(web_sys_unstable_apis)]
169 #[deprecated = "Use `set_authenticator_attachment()` instead."]
170 pub fn authenticator_attachment(&mut self, val: &str) -> &mut Self {
171 self.set_authenticator_attachment(val);
172 self
173 }
174 #[cfg(web_sys_unstable_apis)]
175 #[cfg(feature = "AuthenticationExtensionsClientOutputsJson")]
176 #[deprecated = "Use `set_client_extension_results()` instead."]
177 pub fn client_extension_results(
178 &mut self,
179 val: &AuthenticationExtensionsClientOutputsJson,
180 ) -> &mut Self {
181 self.set_client_extension_results(val);
182 self
183 }
184 #[cfg(web_sys_unstable_apis)]
185 #[deprecated = "Use `set_id()` instead."]
186 pub fn id(&mut self, val: &str) -> &mut Self {
187 self.set_id(val);
188 self
189 }
190 #[cfg(web_sys_unstable_apis)]
191 #[deprecated = "Use `set_raw_id()` instead."]
192 pub fn raw_id(&mut self, val: &str) -> &mut Self {
193 self.set_raw_id(val);
194 self
195 }
196 #[cfg(web_sys_unstable_apis)]
197 #[cfg(feature = "AuthenticatorAttestationResponseJson")]
198 #[deprecated = "Use `set_response()` instead."]
199 pub fn response(&mut self, val: &AuthenticatorAttestationResponseJson) -> &mut Self {
200 self.set_response(val);
201 self
202 }
203 #[cfg(web_sys_unstable_apis)]
204 #[deprecated = "Use `set_type()` instead."]
205 pub fn type_(&mut self, val: &str) -> &mut Self {
206 self.set_type(val);
207 self
208 }
209}