1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = CollectedClientData)]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `CollectedClientData` dictionary."]
9     #[doc = ""]
10     #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
11     pub type CollectedClientData;
12 }
13 impl CollectedClientData {
14     #[doc = "Construct a new `CollectedClientData`."]
15     #[doc = ""]
16     #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
new(challenge: &str, hash_algorithm: &str, origin: &str, type_: &str) -> Self17     pub fn new(challenge: &str, hash_algorithm: &str, origin: &str, type_: &str) -> Self {
18         #[allow(unused_mut)]
19         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20         ret.challenge(challenge);
21         ret.hash_algorithm(hash_algorithm);
22         ret.origin(origin);
23         ret.type_(type_);
24         ret
25     }
26     #[doc = "Change the `challenge` field of this object."]
27     #[doc = ""]
28     #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
challenge(&mut self, val: &str) -> &mut Self29     pub fn challenge(&mut self, val: &str) -> &mut Self {
30         use wasm_bindgen::JsValue;
31         let r = ::js_sys::Reflect::set(
32             self.as_ref(),
33             &JsValue::from("challenge"),
34             &JsValue::from(val),
35         );
36         debug_assert!(
37             r.is_ok(),
38             "setting properties should never fail on our dictionary objects"
39         );
40         let _ = r;
41         self
42     }
43     #[cfg(feature = "AuthenticationExtensionsClientInputs")]
44     #[doc = "Change the `clientExtensions` field of this object."]
45     #[doc = ""]
46     #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"]
client_extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self47     pub fn client_extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self {
48         use wasm_bindgen::JsValue;
49         let r = ::js_sys::Reflect::set(
50             self.as_ref(),
51             &JsValue::from("clientExtensions"),
52             &JsValue::from(val),
53         );
54         debug_assert!(
55             r.is_ok(),
56             "setting properties should never fail on our dictionary objects"
57         );
58         let _ = r;
59         self
60     }
61     #[doc = "Change the `hashAlgorithm` field of this object."]
62     #[doc = ""]
63     #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
hash_algorithm(&mut self, val: &str) -> &mut Self64     pub fn hash_algorithm(&mut self, val: &str) -> &mut Self {
65         use wasm_bindgen::JsValue;
66         let r = ::js_sys::Reflect::set(
67             self.as_ref(),
68             &JsValue::from("hashAlgorithm"),
69             &JsValue::from(val),
70         );
71         debug_assert!(
72             r.is_ok(),
73             "setting properties should never fail on our dictionary objects"
74         );
75         let _ = r;
76         self
77     }
78     #[doc = "Change the `origin` field of this object."]
79     #[doc = ""]
80     #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
origin(&mut self, val: &str) -> &mut Self81     pub fn origin(&mut self, val: &str) -> &mut Self {
82         use wasm_bindgen::JsValue;
83         let r =
84             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("origin"), &JsValue::from(val));
85         debug_assert!(
86             r.is_ok(),
87             "setting properties should never fail on our dictionary objects"
88         );
89         let _ = r;
90         self
91     }
92     #[doc = "Change the `tokenBindingId` field of this object."]
93     #[doc = ""]
94     #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
token_binding_id(&mut self, val: &str) -> &mut Self95     pub fn token_binding_id(&mut self, val: &str) -> &mut Self {
96         use wasm_bindgen::JsValue;
97         let r = ::js_sys::Reflect::set(
98             self.as_ref(),
99             &JsValue::from("tokenBindingId"),
100             &JsValue::from(val),
101         );
102         debug_assert!(
103             r.is_ok(),
104             "setting properties should never fail on our dictionary objects"
105         );
106         let _ = r;
107         self
108     }
109     #[doc = "Change the `type` field of this object."]
110     #[doc = ""]
111     #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
type_(&mut self, val: &str) -> &mut Self112     pub fn type_(&mut self, val: &str) -> &mut Self {
113         use wasm_bindgen::JsValue;
114         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
115         debug_assert!(
116             r.is_ok(),
117             "setting properties should never fail on our dictionary objects"
118         );
119         let _ = r;
120         self
121     }
122 }
123