web_sys/features/
gen_CollectedClientData.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = CollectedClientData)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `CollectedClientData` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
12    pub type CollectedClientData;
13    #[doc = "Get the `challenge` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
16    #[wasm_bindgen(method, getter = "challenge")]
17    pub fn get_challenge(this: &CollectedClientData) -> ::alloc::string::String;
18    #[doc = "Change the `challenge` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
21    #[wasm_bindgen(method, setter = "challenge")]
22    pub fn set_challenge(this: &CollectedClientData, val: &str);
23    #[cfg(feature = "AuthenticationExtensionsClientInputs")]
24    #[doc = "Get the `clientExtensions` field of this object."]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"]
27    #[deprecated]
28    #[wasm_bindgen(method, getter = "clientExtensions")]
29    pub fn get_client_extensions(
30        this: &CollectedClientData,
31    ) -> Option<AuthenticationExtensionsClientInputs>;
32    #[cfg(feature = "AuthenticationExtensionsClientInputs")]
33    #[doc = "Change the `clientExtensions` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"]
36    #[deprecated]
37    #[wasm_bindgen(method, setter = "clientExtensions")]
38    pub fn set_client_extensions(
39        this: &CollectedClientData,
40        val: &AuthenticationExtensionsClientInputs,
41    );
42    #[doc = "Get the `crossOrigin` field of this object."]
43    #[doc = ""]
44    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
45    #[wasm_bindgen(method, getter = "crossOrigin")]
46    pub fn get_cross_origin(this: &CollectedClientData) -> Option<bool>;
47    #[doc = "Change the `crossOrigin` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
50    #[wasm_bindgen(method, setter = "crossOrigin")]
51    pub fn set_cross_origin(this: &CollectedClientData, val: bool);
52    #[doc = "Get the `hashAlgorithm` field of this object."]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
55    #[deprecated]
56    #[wasm_bindgen(method, getter = "hashAlgorithm")]
57    pub fn get_hash_algorithm(this: &CollectedClientData) -> ::alloc::string::String;
58    #[doc = "Change the `hashAlgorithm` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
61    #[deprecated]
62    #[wasm_bindgen(method, setter = "hashAlgorithm")]
63    pub fn set_hash_algorithm(this: &CollectedClientData, val: &str);
64    #[doc = "Get the `origin` field of this object."]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
67    #[wasm_bindgen(method, getter = "origin")]
68    pub fn get_origin(this: &CollectedClientData) -> ::alloc::string::String;
69    #[doc = "Change the `origin` field of this object."]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
72    #[wasm_bindgen(method, setter = "origin")]
73    pub fn set_origin(this: &CollectedClientData, val: &str);
74    #[cfg(feature = "TokenBinding")]
75    #[doc = "Get the `tokenBinding` field of this object."]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`, `TokenBinding`*"]
78    #[wasm_bindgen(method, getter = "tokenBinding")]
79    pub fn get_token_binding(this: &CollectedClientData) -> Option<TokenBinding>;
80    #[cfg(feature = "TokenBinding")]
81    #[doc = "Change the `tokenBinding` field of this object."]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`, `TokenBinding`*"]
84    #[wasm_bindgen(method, setter = "tokenBinding")]
85    pub fn set_token_binding(this: &CollectedClientData, val: &TokenBinding);
86    #[doc = "Get the `tokenBindingId` field of this object."]
87    #[doc = ""]
88    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
89    #[deprecated]
90    #[wasm_bindgen(method, getter = "tokenBindingId")]
91    pub fn get_token_binding_id(this: &CollectedClientData) -> Option<::alloc::string::String>;
92    #[doc = "Change the `tokenBindingId` field of this object."]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
95    #[deprecated]
96    #[wasm_bindgen(method, setter = "tokenBindingId")]
97    pub fn set_token_binding_id(this: &CollectedClientData, val: &str);
98    #[doc = "Get the `type` field of this object."]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
101    #[wasm_bindgen(method, getter = "type")]
102    pub fn get_type(this: &CollectedClientData) -> ::alloc::string::String;
103    #[doc = "Change the `type` field of this object."]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
106    #[wasm_bindgen(method, setter = "type")]
107    pub fn set_type(this: &CollectedClientData, val: &str);
108}
109impl CollectedClientData {
110    #[doc = "Construct a new `CollectedClientData`."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"]
113    pub fn new(challenge: &str, hash_algorithm: &str, origin: &str, type_: &str) -> Self {
114        #[allow(unused_mut)]
115        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
116        ret.set_challenge(challenge);
117        ret.set_hash_algorithm(hash_algorithm);
118        ret.set_origin(origin);
119        ret.set_type(type_);
120        ret
121    }
122    #[deprecated = "Use `set_challenge()` instead."]
123    pub fn challenge(&mut self, val: &str) -> &mut Self {
124        self.set_challenge(val);
125        self
126    }
127    #[cfg(feature = "AuthenticationExtensionsClientInputs")]
128    #[deprecated = "Use `set_client_extensions()` instead."]
129    pub fn client_extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self {
130        self.set_client_extensions(val);
131        self
132    }
133    #[deprecated = "Use `set_cross_origin()` instead."]
134    pub fn cross_origin(&mut self, val: bool) -> &mut Self {
135        self.set_cross_origin(val);
136        self
137    }
138    #[deprecated = "Use `set_hash_algorithm()` instead."]
139    pub fn hash_algorithm(&mut self, val: &str) -> &mut Self {
140        self.set_hash_algorithm(val);
141        self
142    }
143    #[deprecated = "Use `set_origin()` instead."]
144    pub fn origin(&mut self, val: &str) -> &mut Self {
145        self.set_origin(val);
146        self
147    }
148    #[cfg(feature = "TokenBinding")]
149    #[deprecated = "Use `set_token_binding()` instead."]
150    pub fn token_binding(&mut self, val: &TokenBinding) -> &mut Self {
151        self.set_token_binding(val);
152        self
153    }
154    #[deprecated = "Use `set_token_binding_id()` instead."]
155    pub fn token_binding_id(&mut self, val: &str) -> &mut Self {
156        self.set_token_binding_id(val);
157        self
158    }
159    #[deprecated = "Use `set_type()` instead."]
160    pub fn type_(&mut self, val: &str) -> &mut Self {
161        self.set_type(val);
162        self
163    }
164}