1use serde::{Deserialize, Serialize};
2#[doc = "Returns storage key for the given frame. If no frame ID is provided,\nthe storage key of the target executing this command is returned.\n[getStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getStorageKey)"]
3#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
4pub struct GetStorageKeyParams {
5 #[serde(rename = "frameId")]
6 #[serde(skip_serializing_if = "Option::is_none")]
7 #[serde(default)]
8 pub frame_id: Option<crate::browser_protocol::page::types::FrameId>,
9}
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11pub enum GetStorageKeyMethod {
12 #[serde(rename = "Storage.getStorageKey")]
13 GetStorageKey,
14}
15#[doc = "Returns storage key for the given frame. If no frame ID is provided,\nthe storage key of the target executing this command is returned.\n[getStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getStorageKey)"]
16#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
17pub struct GetStorageKey {
18 pub method: GetStorageKeyMethod,
19 pub params: GetStorageKeyParams,
20}
21impl GetStorageKey {
22 pub const IDENTIFIER: &'static str = "Storage.getStorageKey";
23 pub fn identifier(&self) -> &'static str {
24 Self::IDENTIFIER
25 }
26}
27impl crate::CommandResult for GetStorageKey {
28 type Result = super::results::GetStorageKeyResult;
29}
30#[doc = "Clears storage for origin.\n[clearDataForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearDataForOrigin)"]
31#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
32pub struct ClearDataForOriginParams {
33 #[doc = "Security origin."]
34 #[serde(rename = "origin")]
35 pub origin: String,
36 #[doc = "Comma separated list of StorageType to clear."]
37 #[serde(rename = "storageTypes")]
38 pub storage_types: String,
39}
40impl ClearDataForOriginParams {
41 pub fn new(origin: impl Into<String>, storage_types: impl Into<String>) -> Self {
42 Self {
43 origin: origin.into(),
44 storage_types: storage_types.into(),
45 }
46 }
47}
48#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
49pub enum ClearDataForOriginMethod {
50 #[serde(rename = "Storage.clearDataForOrigin")]
51 ClearDataForOrigin,
52}
53#[doc = "Clears storage for origin.\n[clearDataForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearDataForOrigin)"]
54#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
55pub struct ClearDataForOrigin {
56 pub method: ClearDataForOriginMethod,
57 pub params: ClearDataForOriginParams,
58}
59impl ClearDataForOrigin {
60 pub const IDENTIFIER: &'static str = "Storage.clearDataForOrigin";
61 pub fn identifier(&self) -> &'static str {
62 Self::IDENTIFIER
63 }
64}
65impl crate::CommandResult for ClearDataForOrigin {
66 type Result = super::results::ClearDataForOriginResult;
67}
68#[doc = "Clears storage for storage key.\n[clearDataForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearDataForStorageKey)"]
69#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
70pub struct ClearDataForStorageKeyParams {
71 #[doc = "Storage key."]
72 #[serde(rename = "storageKey")]
73 pub storage_key: String,
74 #[doc = "Comma separated list of StorageType to clear."]
75 #[serde(rename = "storageTypes")]
76 pub storage_types: String,
77}
78impl ClearDataForStorageKeyParams {
79 pub fn new(storage_key: impl Into<String>, storage_types: impl Into<String>) -> Self {
80 Self {
81 storage_key: storage_key.into(),
82 storage_types: storage_types.into(),
83 }
84 }
85}
86#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
87pub enum ClearDataForStorageKeyMethod {
88 #[serde(rename = "Storage.clearDataForStorageKey")]
89 ClearDataForStorageKey,
90}
91#[doc = "Clears storage for storage key.\n[clearDataForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearDataForStorageKey)"]
92#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
93pub struct ClearDataForStorageKey {
94 pub method: ClearDataForStorageKeyMethod,
95 pub params: ClearDataForStorageKeyParams,
96}
97impl ClearDataForStorageKey {
98 pub const IDENTIFIER: &'static str = "Storage.clearDataForStorageKey";
99 pub fn identifier(&self) -> &'static str {
100 Self::IDENTIFIER
101 }
102}
103impl crate::CommandResult for ClearDataForStorageKey {
104 type Result = super::results::ClearDataForStorageKeyResult;
105}
106#[doc = "Returns all browser cookies.\n[getCookies](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getCookies)"]
107#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
108pub struct GetCookiesParams {
109 #[doc = "Browser context to use when called on the browser endpoint."]
110 #[serde(rename = "browserContextId")]
111 #[serde(skip_serializing_if = "Option::is_none")]
112 #[serde(default)]
113 pub browser_context_id: Option<crate::browser_protocol::browser::types::BrowserContextId>,
114}
115#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
116pub enum GetCookiesMethod {
117 #[serde(rename = "Storage.getCookies")]
118 GetCookies,
119}
120#[doc = "Returns all browser cookies.\n[getCookies](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getCookies)"]
121#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
122pub struct GetCookies {
123 pub method: GetCookiesMethod,
124 pub params: GetCookiesParams,
125}
126impl GetCookies {
127 pub const IDENTIFIER: &'static str = "Storage.getCookies";
128 pub fn identifier(&self) -> &'static str {
129 Self::IDENTIFIER
130 }
131}
132impl crate::CommandResult for GetCookies {
133 type Result = super::results::GetCookiesResult;
134}
135#[doc = "Sets given cookies.\n[setCookies](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setCookies)"]
136#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
137pub struct SetCookiesParams {
138 #[doc = "Cookies to be set."]
139 #[serde(rename = "cookies")]
140 #[serde(skip_serializing_if = "Vec::is_empty")]
141 pub cookies: Vec<crate::browser_protocol::network::types::CookieParam>,
142 #[doc = "Browser context to use when called on the browser endpoint."]
143 #[serde(rename = "browserContextId")]
144 #[serde(skip_serializing_if = "Option::is_none")]
145 #[serde(default)]
146 pub browser_context_id: Option<crate::browser_protocol::browser::types::BrowserContextId>,
147}
148impl SetCookiesParams {
149 pub fn new(cookies: Vec<crate::browser_protocol::network::types::CookieParam>) -> Self {
150 Self {
151 cookies,
152 browser_context_id: None,
153 }
154 }
155}
156#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
157pub enum SetCookiesMethod {
158 #[serde(rename = "Storage.setCookies")]
159 SetCookies,
160}
161#[doc = "Sets given cookies.\n[setCookies](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setCookies)"]
162#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
163pub struct SetCookies {
164 pub method: SetCookiesMethod,
165 pub params: SetCookiesParams,
166}
167impl SetCookies {
168 pub const IDENTIFIER: &'static str = "Storage.setCookies";
169 pub fn identifier(&self) -> &'static str {
170 Self::IDENTIFIER
171 }
172}
173impl crate::CommandResult for SetCookies {
174 type Result = super::results::SetCookiesResult;
175}
176#[doc = "Clears cookies.\n[clearCookies](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearCookies)"]
177#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
178pub struct ClearCookiesParams {
179 #[doc = "Browser context to use when called on the browser endpoint."]
180 #[serde(rename = "browserContextId")]
181 #[serde(skip_serializing_if = "Option::is_none")]
182 #[serde(default)]
183 pub browser_context_id: Option<crate::browser_protocol::browser::types::BrowserContextId>,
184}
185#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
186pub enum ClearCookiesMethod {
187 #[serde(rename = "Storage.clearCookies")]
188 ClearCookies,
189}
190#[doc = "Clears cookies.\n[clearCookies](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearCookies)"]
191#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
192pub struct ClearCookies {
193 pub method: ClearCookiesMethod,
194 pub params: ClearCookiesParams,
195}
196impl ClearCookies {
197 pub const IDENTIFIER: &'static str = "Storage.clearCookies";
198 pub fn identifier(&self) -> &'static str {
199 Self::IDENTIFIER
200 }
201}
202impl crate::CommandResult for ClearCookies {
203 type Result = super::results::ClearCookiesResult;
204}
205#[doc = "Returns usage and quota in bytes.\n[getUsageAndQuota](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getUsageAndQuota)"]
206#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
207pub struct GetUsageAndQuotaParams {
208 #[doc = "Security origin."]
209 #[serde(rename = "origin")]
210 pub origin: String,
211}
212impl GetUsageAndQuotaParams {
213 pub fn new(origin: impl Into<String>) -> Self {
214 Self {
215 origin: origin.into(),
216 }
217 }
218}
219impl<T: Into<String>> From<T> for GetUsageAndQuotaParams {
220 fn from(url: T) -> Self {
221 GetUsageAndQuotaParams::new(url)
222 }
223}
224#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
225pub enum GetUsageAndQuotaMethod {
226 #[serde(rename = "Storage.getUsageAndQuota")]
227 GetUsageAndQuota,
228}
229#[doc = "Returns usage and quota in bytes.\n[getUsageAndQuota](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getUsageAndQuota)"]
230#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
231pub struct GetUsageAndQuota {
232 pub method: GetUsageAndQuotaMethod,
233 pub params: GetUsageAndQuotaParams,
234}
235impl GetUsageAndQuota {
236 pub const IDENTIFIER: &'static str = "Storage.getUsageAndQuota";
237 pub fn identifier(&self) -> &'static str {
238 Self::IDENTIFIER
239 }
240}
241impl crate::CommandResult for GetUsageAndQuota {
242 type Result = super::results::GetUsageAndQuotaResult;
243}
244#[doc = "Override quota for the specified origin\n[overrideQuotaForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-overrideQuotaForOrigin)"]
245#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
246pub struct OverrideQuotaForOriginParams {
247 #[doc = "Security origin."]
248 #[serde(rename = "origin")]
249 pub origin: String,
250 #[doc = "The quota size (in bytes) to override the original quota with.\nIf this is called multiple times, the overridden quota will be equal to\nthe quotaSize provided in the final call. If this is called without\nspecifying a quotaSize, the quota will be reset to the default value for\nthe specified origin. If this is called multiple times with different\norigins, the override will be maintained for each origin until it is\ndisabled (called without a quotaSize)."]
251 #[serde(rename = "quotaSize")]
252 #[serde(skip_serializing_if = "Option::is_none")]
253 #[serde(default)]
254 pub quota_size: Option<f64>,
255}
256impl OverrideQuotaForOriginParams {
257 pub fn new(origin: impl Into<String>) -> Self {
258 Self {
259 origin: origin.into(),
260 quota_size: None,
261 }
262 }
263}
264impl<T: Into<String>> From<T> for OverrideQuotaForOriginParams {
265 fn from(url: T) -> Self {
266 OverrideQuotaForOriginParams::new(url)
267 }
268}
269#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
270pub enum OverrideQuotaForOriginMethod {
271 #[serde(rename = "Storage.overrideQuotaForOrigin")]
272 OverrideQuotaForOrigin,
273}
274#[doc = "Override quota for the specified origin\n[overrideQuotaForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-overrideQuotaForOrigin)"]
275#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
276pub struct OverrideQuotaForOrigin {
277 pub method: OverrideQuotaForOriginMethod,
278 pub params: OverrideQuotaForOriginParams,
279}
280impl OverrideQuotaForOrigin {
281 pub const IDENTIFIER: &'static str = "Storage.overrideQuotaForOrigin";
282 pub fn identifier(&self) -> &'static str {
283 Self::IDENTIFIER
284 }
285}
286impl crate::CommandResult for OverrideQuotaForOrigin {
287 type Result = super::results::OverrideQuotaForOriginResult;
288}
289#[doc = "Registers origin to be notified when an update occurs to its cache storage list.\n[trackCacheStorageForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackCacheStorageForOrigin)"]
290#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
291pub struct TrackCacheStorageForOriginParams {
292 #[doc = "Security origin."]
293 #[serde(rename = "origin")]
294 pub origin: String,
295}
296impl TrackCacheStorageForOriginParams {
297 pub fn new(origin: impl Into<String>) -> Self {
298 Self {
299 origin: origin.into(),
300 }
301 }
302}
303impl<T: Into<String>> From<T> for TrackCacheStorageForOriginParams {
304 fn from(url: T) -> Self {
305 TrackCacheStorageForOriginParams::new(url)
306 }
307}
308#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
309pub enum TrackCacheStorageForOriginMethod {
310 #[serde(rename = "Storage.trackCacheStorageForOrigin")]
311 TrackCacheStorageForOrigin,
312}
313#[doc = "Registers origin to be notified when an update occurs to its cache storage list.\n[trackCacheStorageForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackCacheStorageForOrigin)"]
314#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
315pub struct TrackCacheStorageForOrigin {
316 pub method: TrackCacheStorageForOriginMethod,
317 pub params: TrackCacheStorageForOriginParams,
318}
319impl TrackCacheStorageForOrigin {
320 pub const IDENTIFIER: &'static str = "Storage.trackCacheStorageForOrigin";
321 pub fn identifier(&self) -> &'static str {
322 Self::IDENTIFIER
323 }
324}
325impl crate::CommandResult for TrackCacheStorageForOrigin {
326 type Result = super::results::TrackCacheStorageForOriginResult;
327}
328#[doc = "Registers storage key to be notified when an update occurs to its cache storage list.\n[trackCacheStorageForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackCacheStorageForStorageKey)"]
329#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
330pub struct TrackCacheStorageForStorageKeyParams {
331 #[doc = "Storage key."]
332 #[serde(rename = "storageKey")]
333 pub storage_key: String,
334}
335impl TrackCacheStorageForStorageKeyParams {
336 pub fn new(storage_key: impl Into<String>) -> Self {
337 Self {
338 storage_key: storage_key.into(),
339 }
340 }
341}
342impl<T: Into<String>> From<T> for TrackCacheStorageForStorageKeyParams {
343 fn from(url: T) -> Self {
344 TrackCacheStorageForStorageKeyParams::new(url)
345 }
346}
347#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
348pub enum TrackCacheStorageForStorageKeyMethod {
349 #[serde(rename = "Storage.trackCacheStorageForStorageKey")]
350 TrackCacheStorageForStorageKey,
351}
352#[doc = "Registers storage key to be notified when an update occurs to its cache storage list.\n[trackCacheStorageForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackCacheStorageForStorageKey)"]
353#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
354pub struct TrackCacheStorageForStorageKey {
355 pub method: TrackCacheStorageForStorageKeyMethod,
356 pub params: TrackCacheStorageForStorageKeyParams,
357}
358impl TrackCacheStorageForStorageKey {
359 pub const IDENTIFIER: &'static str = "Storage.trackCacheStorageForStorageKey";
360 pub fn identifier(&self) -> &'static str {
361 Self::IDENTIFIER
362 }
363}
364impl crate::CommandResult for TrackCacheStorageForStorageKey {
365 type Result = super::results::TrackCacheStorageForStorageKeyResult;
366}
367#[doc = "Registers origin to be notified when an update occurs to its IndexedDB.\n[trackIndexedDBForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackIndexedDBForOrigin)"]
368#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
369pub struct TrackIndexedDbForOriginParams {
370 #[doc = "Security origin."]
371 #[serde(rename = "origin")]
372 pub origin: String,
373}
374impl TrackIndexedDbForOriginParams {
375 pub fn new(origin: impl Into<String>) -> Self {
376 Self {
377 origin: origin.into(),
378 }
379 }
380}
381impl<T: Into<String>> From<T> for TrackIndexedDbForOriginParams {
382 fn from(url: T) -> Self {
383 TrackIndexedDbForOriginParams::new(url)
384 }
385}
386#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
387pub enum TrackIndexedDbForOriginMethod {
388 #[serde(rename = "Storage.trackIndexedDBForOrigin")]
389 TrackIndexedDbForOrigin,
390}
391#[doc = "Registers origin to be notified when an update occurs to its IndexedDB.\n[trackIndexedDBForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackIndexedDBForOrigin)"]
392#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
393pub struct TrackIndexedDbForOrigin {
394 pub method: TrackIndexedDbForOriginMethod,
395 pub params: TrackIndexedDbForOriginParams,
396}
397impl TrackIndexedDbForOrigin {
398 pub const IDENTIFIER: &'static str = "Storage.trackIndexedDBForOrigin";
399 pub fn identifier(&self) -> &'static str {
400 Self::IDENTIFIER
401 }
402}
403impl crate::CommandResult for TrackIndexedDbForOrigin {
404 type Result = super::results::TrackIndexedDbForOriginResult;
405}
406#[doc = "Registers storage key to be notified when an update occurs to its IndexedDB.\n[trackIndexedDBForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackIndexedDBForStorageKey)"]
407#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
408pub struct TrackIndexedDbForStorageKeyParams {
409 #[doc = "Storage key."]
410 #[serde(rename = "storageKey")]
411 pub storage_key: String,
412}
413impl TrackIndexedDbForStorageKeyParams {
414 pub fn new(storage_key: impl Into<String>) -> Self {
415 Self {
416 storage_key: storage_key.into(),
417 }
418 }
419}
420impl<T: Into<String>> From<T> for TrackIndexedDbForStorageKeyParams {
421 fn from(url: T) -> Self {
422 TrackIndexedDbForStorageKeyParams::new(url)
423 }
424}
425#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
426pub enum TrackIndexedDbForStorageKeyMethod {
427 #[serde(rename = "Storage.trackIndexedDBForStorageKey")]
428 TrackIndexedDbForStorageKey,
429}
430#[doc = "Registers storage key to be notified when an update occurs to its IndexedDB.\n[trackIndexedDBForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-trackIndexedDBForStorageKey)"]
431#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
432pub struct TrackIndexedDbForStorageKey {
433 pub method: TrackIndexedDbForStorageKeyMethod,
434 pub params: TrackIndexedDbForStorageKeyParams,
435}
436impl TrackIndexedDbForStorageKey {
437 pub const IDENTIFIER: &'static str = "Storage.trackIndexedDBForStorageKey";
438 pub fn identifier(&self) -> &'static str {
439 Self::IDENTIFIER
440 }
441}
442impl crate::CommandResult for TrackIndexedDbForStorageKey {
443 type Result = super::results::TrackIndexedDbForStorageKeyResult;
444}
445#[doc = "Unregisters origin from receiving notifications for cache storage.\n[untrackCacheStorageForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackCacheStorageForOrigin)"]
446#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
447pub struct UntrackCacheStorageForOriginParams {
448 #[doc = "Security origin."]
449 #[serde(rename = "origin")]
450 pub origin: String,
451}
452impl UntrackCacheStorageForOriginParams {
453 pub fn new(origin: impl Into<String>) -> Self {
454 Self {
455 origin: origin.into(),
456 }
457 }
458}
459impl<T: Into<String>> From<T> for UntrackCacheStorageForOriginParams {
460 fn from(url: T) -> Self {
461 UntrackCacheStorageForOriginParams::new(url)
462 }
463}
464#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
465pub enum UntrackCacheStorageForOriginMethod {
466 #[serde(rename = "Storage.untrackCacheStorageForOrigin")]
467 UntrackCacheStorageForOrigin,
468}
469#[doc = "Unregisters origin from receiving notifications for cache storage.\n[untrackCacheStorageForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackCacheStorageForOrigin)"]
470#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
471pub struct UntrackCacheStorageForOrigin {
472 pub method: UntrackCacheStorageForOriginMethod,
473 pub params: UntrackCacheStorageForOriginParams,
474}
475impl UntrackCacheStorageForOrigin {
476 pub const IDENTIFIER: &'static str = "Storage.untrackCacheStorageForOrigin";
477 pub fn identifier(&self) -> &'static str {
478 Self::IDENTIFIER
479 }
480}
481impl crate::CommandResult for UntrackCacheStorageForOrigin {
482 type Result = super::results::UntrackCacheStorageForOriginResult;
483}
484#[doc = "Unregisters storage key from receiving notifications for cache storage.\n[untrackCacheStorageForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackCacheStorageForStorageKey)"]
485#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
486pub struct UntrackCacheStorageForStorageKeyParams {
487 #[doc = "Storage key."]
488 #[serde(rename = "storageKey")]
489 pub storage_key: String,
490}
491impl UntrackCacheStorageForStorageKeyParams {
492 pub fn new(storage_key: impl Into<String>) -> Self {
493 Self {
494 storage_key: storage_key.into(),
495 }
496 }
497}
498impl<T: Into<String>> From<T> for UntrackCacheStorageForStorageKeyParams {
499 fn from(url: T) -> Self {
500 UntrackCacheStorageForStorageKeyParams::new(url)
501 }
502}
503#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
504pub enum UntrackCacheStorageForStorageKeyMethod {
505 #[serde(rename = "Storage.untrackCacheStorageForStorageKey")]
506 UntrackCacheStorageForStorageKey,
507}
508#[doc = "Unregisters storage key from receiving notifications for cache storage.\n[untrackCacheStorageForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackCacheStorageForStorageKey)"]
509#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
510pub struct UntrackCacheStorageForStorageKey {
511 pub method: UntrackCacheStorageForStorageKeyMethod,
512 pub params: UntrackCacheStorageForStorageKeyParams,
513}
514impl UntrackCacheStorageForStorageKey {
515 pub const IDENTIFIER: &'static str = "Storage.untrackCacheStorageForStorageKey";
516 pub fn identifier(&self) -> &'static str {
517 Self::IDENTIFIER
518 }
519}
520impl crate::CommandResult for UntrackCacheStorageForStorageKey {
521 type Result = super::results::UntrackCacheStorageForStorageKeyResult;
522}
523#[doc = "Unregisters origin from receiving notifications for IndexedDB.\n[untrackIndexedDBForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackIndexedDBForOrigin)"]
524#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
525pub struct UntrackIndexedDbForOriginParams {
526 #[doc = "Security origin."]
527 #[serde(rename = "origin")]
528 pub origin: String,
529}
530impl UntrackIndexedDbForOriginParams {
531 pub fn new(origin: impl Into<String>) -> Self {
532 Self {
533 origin: origin.into(),
534 }
535 }
536}
537impl<T: Into<String>> From<T> for UntrackIndexedDbForOriginParams {
538 fn from(url: T) -> Self {
539 UntrackIndexedDbForOriginParams::new(url)
540 }
541}
542#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
543pub enum UntrackIndexedDbForOriginMethod {
544 #[serde(rename = "Storage.untrackIndexedDBForOrigin")]
545 UntrackIndexedDbForOrigin,
546}
547#[doc = "Unregisters origin from receiving notifications for IndexedDB.\n[untrackIndexedDBForOrigin](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackIndexedDBForOrigin)"]
548#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
549pub struct UntrackIndexedDbForOrigin {
550 pub method: UntrackIndexedDbForOriginMethod,
551 pub params: UntrackIndexedDbForOriginParams,
552}
553impl UntrackIndexedDbForOrigin {
554 pub const IDENTIFIER: &'static str = "Storage.untrackIndexedDBForOrigin";
555 pub fn identifier(&self) -> &'static str {
556 Self::IDENTIFIER
557 }
558}
559impl crate::CommandResult for UntrackIndexedDbForOrigin {
560 type Result = super::results::UntrackIndexedDbForOriginResult;
561}
562#[doc = "Unregisters storage key from receiving notifications for IndexedDB.\n[untrackIndexedDBForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackIndexedDBForStorageKey)"]
563#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
564pub struct UntrackIndexedDbForStorageKeyParams {
565 #[doc = "Storage key."]
566 #[serde(rename = "storageKey")]
567 pub storage_key: String,
568}
569impl UntrackIndexedDbForStorageKeyParams {
570 pub fn new(storage_key: impl Into<String>) -> Self {
571 Self {
572 storage_key: storage_key.into(),
573 }
574 }
575}
576impl<T: Into<String>> From<T> for UntrackIndexedDbForStorageKeyParams {
577 fn from(url: T) -> Self {
578 UntrackIndexedDbForStorageKeyParams::new(url)
579 }
580}
581#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
582pub enum UntrackIndexedDbForStorageKeyMethod {
583 #[serde(rename = "Storage.untrackIndexedDBForStorageKey")]
584 UntrackIndexedDbForStorageKey,
585}
586#[doc = "Unregisters storage key from receiving notifications for IndexedDB.\n[untrackIndexedDBForStorageKey](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-untrackIndexedDBForStorageKey)"]
587#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
588pub struct UntrackIndexedDbForStorageKey {
589 pub method: UntrackIndexedDbForStorageKeyMethod,
590 pub params: UntrackIndexedDbForStorageKeyParams,
591}
592impl UntrackIndexedDbForStorageKey {
593 pub const IDENTIFIER: &'static str = "Storage.untrackIndexedDBForStorageKey";
594 pub fn identifier(&self) -> &'static str {
595 Self::IDENTIFIER
596 }
597}
598impl crate::CommandResult for UntrackIndexedDbForStorageKey {
599 type Result = super::results::UntrackIndexedDbForStorageKeyResult;
600}
601#[doc = "Returns the number of stored Trust Tokens per issuer for the\ncurrent browsing context.\n[getTrustTokens](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getTrustTokens)"]
602#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
603pub struct GetTrustTokensParams {}
604#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
605pub enum GetTrustTokensMethod {
606 #[serde(rename = "Storage.getTrustTokens")]
607 GetTrustTokens,
608}
609#[doc = "Returns the number of stored Trust Tokens per issuer for the\ncurrent browsing context.\n[getTrustTokens](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getTrustTokens)"]
610#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
611pub struct GetTrustTokens {
612 pub method: GetTrustTokensMethod,
613 pub params: GetTrustTokensParams,
614}
615impl GetTrustTokens {
616 pub const IDENTIFIER: &'static str = "Storage.getTrustTokens";
617 pub fn identifier(&self) -> &'static str {
618 Self::IDENTIFIER
619 }
620}
621impl crate::CommandResult for GetTrustTokens {
622 type Result = super::results::GetTrustTokensResult;
623}
624#[doc = "Removes all Trust Tokens issued by the provided issuerOrigin.\nLeaves other stored data, including the issuer's Redemption Records, intact.\n[clearTrustTokens](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearTrustTokens)"]
625#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
626pub struct ClearTrustTokensParams {
627 #[serde(rename = "issuerOrigin")]
628 pub issuer_origin: String,
629}
630impl ClearTrustTokensParams {
631 pub fn new(issuer_origin: impl Into<String>) -> Self {
632 Self {
633 issuer_origin: issuer_origin.into(),
634 }
635 }
636}
637impl<T: Into<String>> From<T> for ClearTrustTokensParams {
638 fn from(url: T) -> Self {
639 ClearTrustTokensParams::new(url)
640 }
641}
642#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
643pub enum ClearTrustTokensMethod {
644 #[serde(rename = "Storage.clearTrustTokens")]
645 ClearTrustTokens,
646}
647#[doc = "Removes all Trust Tokens issued by the provided issuerOrigin.\nLeaves other stored data, including the issuer's Redemption Records, intact.\n[clearTrustTokens](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearTrustTokens)"]
648#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
649pub struct ClearTrustTokens {
650 pub method: ClearTrustTokensMethod,
651 pub params: ClearTrustTokensParams,
652}
653impl ClearTrustTokens {
654 pub const IDENTIFIER: &'static str = "Storage.clearTrustTokens";
655 pub fn identifier(&self) -> &'static str {
656 Self::IDENTIFIER
657 }
658}
659impl crate::CommandResult for ClearTrustTokens {
660 type Result = super::results::ClearTrustTokensResult;
661}
662#[doc = "Gets details for a named interest group.\n[getInterestGroupDetails](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getInterestGroupDetails)"]
663#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
664pub struct GetInterestGroupDetailsParams {
665 #[serde(rename = "ownerOrigin")]
666 pub owner_origin: String,
667 #[serde(rename = "name")]
668 pub name: String,
669}
670impl GetInterestGroupDetailsParams {
671 pub fn new(owner_origin: impl Into<String>, name: impl Into<String>) -> Self {
672 Self {
673 owner_origin: owner_origin.into(),
674 name: name.into(),
675 }
676 }
677}
678#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
679pub enum GetInterestGroupDetailsMethod {
680 #[serde(rename = "Storage.getInterestGroupDetails")]
681 GetInterestGroupDetails,
682}
683#[doc = "Gets details for a named interest group.\n[getInterestGroupDetails](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getInterestGroupDetails)"]
684#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
685pub struct GetInterestGroupDetails {
686 pub method: GetInterestGroupDetailsMethod,
687 pub params: GetInterestGroupDetailsParams,
688}
689impl GetInterestGroupDetails {
690 pub const IDENTIFIER: &'static str = "Storage.getInterestGroupDetails";
691 pub fn identifier(&self) -> &'static str {
692 Self::IDENTIFIER
693 }
694}
695impl crate::CommandResult for GetInterestGroupDetails {
696 type Result = super::results::GetInterestGroupDetailsResult;
697}
698#[doc = "Enables/Disables issuing of interestGroupAccessed events.\n[setInterestGroupTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setInterestGroupTracking)"]
699#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
700pub struct SetInterestGroupTrackingParams {
701 #[serde(rename = "enable")]
702 pub enable: bool,
703}
704impl SetInterestGroupTrackingParams {
705 pub fn new(enable: impl Into<bool>) -> Self {
706 Self {
707 enable: enable.into(),
708 }
709 }
710}
711#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
712pub enum SetInterestGroupTrackingMethod {
713 #[serde(rename = "Storage.setInterestGroupTracking")]
714 SetInterestGroupTracking,
715}
716#[doc = "Enables/Disables issuing of interestGroupAccessed events.\n[setInterestGroupTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setInterestGroupTracking)"]
717#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
718pub struct SetInterestGroupTracking {
719 pub method: SetInterestGroupTrackingMethod,
720 pub params: SetInterestGroupTrackingParams,
721}
722impl SetInterestGroupTracking {
723 pub const IDENTIFIER: &'static str = "Storage.setInterestGroupTracking";
724 pub fn identifier(&self) -> &'static str {
725 Self::IDENTIFIER
726 }
727}
728impl crate::CommandResult for SetInterestGroupTracking {
729 type Result = super::results::SetInterestGroupTrackingResult;
730}
731#[doc = "Enables/Disables issuing of interestGroupAuctionEventOccurred and\ninterestGroupAuctionNetworkRequestCreated.\n[setInterestGroupAuctionTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setInterestGroupAuctionTracking)"]
732#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
733pub struct SetInterestGroupAuctionTrackingParams {
734 #[serde(rename = "enable")]
735 pub enable: bool,
736}
737impl SetInterestGroupAuctionTrackingParams {
738 pub fn new(enable: impl Into<bool>) -> Self {
739 Self {
740 enable: enable.into(),
741 }
742 }
743}
744#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
745pub enum SetInterestGroupAuctionTrackingMethod {
746 #[serde(rename = "Storage.setInterestGroupAuctionTracking")]
747 SetInterestGroupAuctionTracking,
748}
749#[doc = "Enables/Disables issuing of interestGroupAuctionEventOccurred and\ninterestGroupAuctionNetworkRequestCreated.\n[setInterestGroupAuctionTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setInterestGroupAuctionTracking)"]
750#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
751pub struct SetInterestGroupAuctionTracking {
752 pub method: SetInterestGroupAuctionTrackingMethod,
753 pub params: SetInterestGroupAuctionTrackingParams,
754}
755impl SetInterestGroupAuctionTracking {
756 pub const IDENTIFIER: &'static str = "Storage.setInterestGroupAuctionTracking";
757 pub fn identifier(&self) -> &'static str {
758 Self::IDENTIFIER
759 }
760}
761impl crate::CommandResult for SetInterestGroupAuctionTracking {
762 type Result = super::results::SetInterestGroupAuctionTrackingResult;
763}
764#[doc = "Gets metadata for an origin's shared storage.\n[getSharedStorageMetadata](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getSharedStorageMetadata)"]
765#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
766pub struct GetSharedStorageMetadataParams {
767 #[serde(rename = "ownerOrigin")]
768 pub owner_origin: String,
769}
770impl GetSharedStorageMetadataParams {
771 pub fn new(owner_origin: impl Into<String>) -> Self {
772 Self {
773 owner_origin: owner_origin.into(),
774 }
775 }
776}
777impl<T: Into<String>> From<T> for GetSharedStorageMetadataParams {
778 fn from(url: T) -> Self {
779 GetSharedStorageMetadataParams::new(url)
780 }
781}
782#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
783pub enum GetSharedStorageMetadataMethod {
784 #[serde(rename = "Storage.getSharedStorageMetadata")]
785 GetSharedStorageMetadata,
786}
787#[doc = "Gets metadata for an origin's shared storage.\n[getSharedStorageMetadata](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getSharedStorageMetadata)"]
788#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
789pub struct GetSharedStorageMetadata {
790 pub method: GetSharedStorageMetadataMethod,
791 pub params: GetSharedStorageMetadataParams,
792}
793impl GetSharedStorageMetadata {
794 pub const IDENTIFIER: &'static str = "Storage.getSharedStorageMetadata";
795 pub fn identifier(&self) -> &'static str {
796 Self::IDENTIFIER
797 }
798}
799impl crate::CommandResult for GetSharedStorageMetadata {
800 type Result = super::results::GetSharedStorageMetadataResult;
801}
802#[doc = "Gets the entries in an given origin's shared storage.\n[getSharedStorageEntries](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getSharedStorageEntries)"]
803#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
804pub struct GetSharedStorageEntriesParams {
805 #[serde(rename = "ownerOrigin")]
806 pub owner_origin: String,
807}
808impl GetSharedStorageEntriesParams {
809 pub fn new(owner_origin: impl Into<String>) -> Self {
810 Self {
811 owner_origin: owner_origin.into(),
812 }
813 }
814}
815impl<T: Into<String>> From<T> for GetSharedStorageEntriesParams {
816 fn from(url: T) -> Self {
817 GetSharedStorageEntriesParams::new(url)
818 }
819}
820#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
821pub enum GetSharedStorageEntriesMethod {
822 #[serde(rename = "Storage.getSharedStorageEntries")]
823 GetSharedStorageEntries,
824}
825#[doc = "Gets the entries in an given origin's shared storage.\n[getSharedStorageEntries](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getSharedStorageEntries)"]
826#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
827pub struct GetSharedStorageEntries {
828 pub method: GetSharedStorageEntriesMethod,
829 pub params: GetSharedStorageEntriesParams,
830}
831impl GetSharedStorageEntries {
832 pub const IDENTIFIER: &'static str = "Storage.getSharedStorageEntries";
833 pub fn identifier(&self) -> &'static str {
834 Self::IDENTIFIER
835 }
836}
837impl crate::CommandResult for GetSharedStorageEntries {
838 type Result = super::results::GetSharedStorageEntriesResult;
839}
840#[doc = "Sets entry with `key` and `value` for a given origin's shared storage.\n[setSharedStorageEntry](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setSharedStorageEntry)"]
841#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
842pub struct SetSharedStorageEntryParams {
843 #[serde(rename = "ownerOrigin")]
844 pub owner_origin: String,
845 #[serde(rename = "key")]
846 pub key: String,
847 #[serde(rename = "value")]
848 pub value: String,
849 #[doc = "If `ignoreIfPresent` is included and true, then only sets the entry if\n`key` doesn't already exist."]
850 #[serde(rename = "ignoreIfPresent")]
851 #[serde(skip_serializing_if = "Option::is_none")]
852 #[serde(default)]
853 pub ignore_if_present: Option<bool>,
854}
855impl SetSharedStorageEntryParams {
856 pub fn new(
857 owner_origin: impl Into<String>,
858 key: impl Into<String>,
859 value: impl Into<String>,
860 ) -> Self {
861 Self {
862 owner_origin: owner_origin.into(),
863 key: key.into(),
864 value: value.into(),
865 ignore_if_present: None,
866 }
867 }
868}
869#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
870pub enum SetSharedStorageEntryMethod {
871 #[serde(rename = "Storage.setSharedStorageEntry")]
872 SetSharedStorageEntry,
873}
874#[doc = "Sets entry with `key` and `value` for a given origin's shared storage.\n[setSharedStorageEntry](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setSharedStorageEntry)"]
875#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
876pub struct SetSharedStorageEntry {
877 pub method: SetSharedStorageEntryMethod,
878 pub params: SetSharedStorageEntryParams,
879}
880impl SetSharedStorageEntry {
881 pub const IDENTIFIER: &'static str = "Storage.setSharedStorageEntry";
882 pub fn identifier(&self) -> &'static str {
883 Self::IDENTIFIER
884 }
885}
886impl crate::CommandResult for SetSharedStorageEntry {
887 type Result = super::results::SetSharedStorageEntryResult;
888}
889#[doc = "Deletes entry for `key` (if it exists) for a given origin's shared storage.\n[deleteSharedStorageEntry](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-deleteSharedStorageEntry)"]
890#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
891pub struct DeleteSharedStorageEntryParams {
892 #[serde(rename = "ownerOrigin")]
893 pub owner_origin: String,
894 #[serde(rename = "key")]
895 pub key: String,
896}
897impl DeleteSharedStorageEntryParams {
898 pub fn new(owner_origin: impl Into<String>, key: impl Into<String>) -> Self {
899 Self {
900 owner_origin: owner_origin.into(),
901 key: key.into(),
902 }
903 }
904}
905#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
906pub enum DeleteSharedStorageEntryMethod {
907 #[serde(rename = "Storage.deleteSharedStorageEntry")]
908 DeleteSharedStorageEntry,
909}
910#[doc = "Deletes entry for `key` (if it exists) for a given origin's shared storage.\n[deleteSharedStorageEntry](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-deleteSharedStorageEntry)"]
911#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
912pub struct DeleteSharedStorageEntry {
913 pub method: DeleteSharedStorageEntryMethod,
914 pub params: DeleteSharedStorageEntryParams,
915}
916impl DeleteSharedStorageEntry {
917 pub const IDENTIFIER: &'static str = "Storage.deleteSharedStorageEntry";
918 pub fn identifier(&self) -> &'static str {
919 Self::IDENTIFIER
920 }
921}
922impl crate::CommandResult for DeleteSharedStorageEntry {
923 type Result = super::results::DeleteSharedStorageEntryResult;
924}
925#[doc = "Clears all entries for a given origin's shared storage.\n[clearSharedStorageEntries](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearSharedStorageEntries)"]
926#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
927pub struct ClearSharedStorageEntriesParams {
928 #[serde(rename = "ownerOrigin")]
929 pub owner_origin: String,
930}
931impl ClearSharedStorageEntriesParams {
932 pub fn new(owner_origin: impl Into<String>) -> Self {
933 Self {
934 owner_origin: owner_origin.into(),
935 }
936 }
937}
938impl<T: Into<String>> From<T> for ClearSharedStorageEntriesParams {
939 fn from(url: T) -> Self {
940 ClearSharedStorageEntriesParams::new(url)
941 }
942}
943#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
944pub enum ClearSharedStorageEntriesMethod {
945 #[serde(rename = "Storage.clearSharedStorageEntries")]
946 ClearSharedStorageEntries,
947}
948#[doc = "Clears all entries for a given origin's shared storage.\n[clearSharedStorageEntries](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-clearSharedStorageEntries)"]
949#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
950pub struct ClearSharedStorageEntries {
951 pub method: ClearSharedStorageEntriesMethod,
952 pub params: ClearSharedStorageEntriesParams,
953}
954impl ClearSharedStorageEntries {
955 pub const IDENTIFIER: &'static str = "Storage.clearSharedStorageEntries";
956 pub fn identifier(&self) -> &'static str {
957 Self::IDENTIFIER
958 }
959}
960impl crate::CommandResult for ClearSharedStorageEntries {
961 type Result = super::results::ClearSharedStorageEntriesResult;
962}
963#[doc = "Resets the budget for `ownerOrigin` by clearing all budget withdrawals.\n[resetSharedStorageBudget](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-resetSharedStorageBudget)"]
964#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
965pub struct ResetSharedStorageBudgetParams {
966 #[serde(rename = "ownerOrigin")]
967 pub owner_origin: String,
968}
969impl ResetSharedStorageBudgetParams {
970 pub fn new(owner_origin: impl Into<String>) -> Self {
971 Self {
972 owner_origin: owner_origin.into(),
973 }
974 }
975}
976impl<T: Into<String>> From<T> for ResetSharedStorageBudgetParams {
977 fn from(url: T) -> Self {
978 ResetSharedStorageBudgetParams::new(url)
979 }
980}
981#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
982pub enum ResetSharedStorageBudgetMethod {
983 #[serde(rename = "Storage.resetSharedStorageBudget")]
984 ResetSharedStorageBudget,
985}
986#[doc = "Resets the budget for `ownerOrigin` by clearing all budget withdrawals.\n[resetSharedStorageBudget](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-resetSharedStorageBudget)"]
987#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
988pub struct ResetSharedStorageBudget {
989 pub method: ResetSharedStorageBudgetMethod,
990 pub params: ResetSharedStorageBudgetParams,
991}
992impl ResetSharedStorageBudget {
993 pub const IDENTIFIER: &'static str = "Storage.resetSharedStorageBudget";
994 pub fn identifier(&self) -> &'static str {
995 Self::IDENTIFIER
996 }
997}
998impl crate::CommandResult for ResetSharedStorageBudget {
999 type Result = super::results::ResetSharedStorageBudgetResult;
1000}
1001#[doc = "Enables/disables issuing of sharedStorageAccessed events.\n[setSharedStorageTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setSharedStorageTracking)"]
1002#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1003pub struct SetSharedStorageTrackingParams {
1004 #[serde(rename = "enable")]
1005 pub enable: bool,
1006}
1007impl SetSharedStorageTrackingParams {
1008 pub fn new(enable: impl Into<bool>) -> Self {
1009 Self {
1010 enable: enable.into(),
1011 }
1012 }
1013}
1014#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1015pub enum SetSharedStorageTrackingMethod {
1016 #[serde(rename = "Storage.setSharedStorageTracking")]
1017 SetSharedStorageTracking,
1018}
1019#[doc = "Enables/disables issuing of sharedStorageAccessed events.\n[setSharedStorageTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setSharedStorageTracking)"]
1020#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1021pub struct SetSharedStorageTracking {
1022 pub method: SetSharedStorageTrackingMethod,
1023 pub params: SetSharedStorageTrackingParams,
1024}
1025impl SetSharedStorageTracking {
1026 pub const IDENTIFIER: &'static str = "Storage.setSharedStorageTracking";
1027 pub fn identifier(&self) -> &'static str {
1028 Self::IDENTIFIER
1029 }
1030}
1031impl crate::CommandResult for SetSharedStorageTracking {
1032 type Result = super::results::SetSharedStorageTrackingResult;
1033}
1034#[doc = "Set tracking for a storage key's buckets.\n[setStorageBucketTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setStorageBucketTracking)"]
1035#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1036pub struct SetStorageBucketTrackingParams {
1037 #[serde(rename = "storageKey")]
1038 pub storage_key: String,
1039 #[serde(rename = "enable")]
1040 pub enable: bool,
1041}
1042impl SetStorageBucketTrackingParams {
1043 pub fn new(storage_key: impl Into<String>, enable: impl Into<bool>) -> Self {
1044 Self {
1045 storage_key: storage_key.into(),
1046 enable: enable.into(),
1047 }
1048 }
1049}
1050#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1051pub enum SetStorageBucketTrackingMethod {
1052 #[serde(rename = "Storage.setStorageBucketTracking")]
1053 SetStorageBucketTracking,
1054}
1055#[doc = "Set tracking for a storage key's buckets.\n[setStorageBucketTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setStorageBucketTracking)"]
1056#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1057pub struct SetStorageBucketTracking {
1058 pub method: SetStorageBucketTrackingMethod,
1059 pub params: SetStorageBucketTrackingParams,
1060}
1061impl SetStorageBucketTracking {
1062 pub const IDENTIFIER: &'static str = "Storage.setStorageBucketTracking";
1063 pub fn identifier(&self) -> &'static str {
1064 Self::IDENTIFIER
1065 }
1066}
1067impl crate::CommandResult for SetStorageBucketTracking {
1068 type Result = super::results::SetStorageBucketTrackingResult;
1069}
1070#[doc = "Deletes the Storage Bucket with the given storage key and bucket name.\n[deleteStorageBucket](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-deleteStorageBucket)"]
1071#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1072pub struct DeleteStorageBucketParams {
1073 #[serde(rename = "bucket")]
1074 pub bucket: super::types::StorageBucket,
1075}
1076impl DeleteStorageBucketParams {
1077 pub fn new(bucket: impl Into<super::types::StorageBucket>) -> Self {
1078 Self {
1079 bucket: bucket.into(),
1080 }
1081 }
1082}
1083#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1084pub enum DeleteStorageBucketMethod {
1085 #[serde(rename = "Storage.deleteStorageBucket")]
1086 DeleteStorageBucket,
1087}
1088#[doc = "Deletes the Storage Bucket with the given storage key and bucket name.\n[deleteStorageBucket](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-deleteStorageBucket)"]
1089#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1090pub struct DeleteStorageBucket {
1091 pub method: DeleteStorageBucketMethod,
1092 pub params: DeleteStorageBucketParams,
1093}
1094impl DeleteStorageBucket {
1095 pub const IDENTIFIER: &'static str = "Storage.deleteStorageBucket";
1096 pub fn identifier(&self) -> &'static str {
1097 Self::IDENTIFIER
1098 }
1099}
1100impl crate::CommandResult for DeleteStorageBucket {
1101 type Result = super::results::DeleteStorageBucketResult;
1102}
1103#[doc = "Deletes state for sites identified as potential bounce trackers, immediately.\n[runBounceTrackingMitigations](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-runBounceTrackingMitigations)"]
1104#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1105pub struct RunBounceTrackingMitigationsParams {}
1106#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1107pub enum RunBounceTrackingMitigationsMethod {
1108 #[serde(rename = "Storage.runBounceTrackingMitigations")]
1109 RunBounceTrackingMitigations,
1110}
1111#[doc = "Deletes state for sites identified as potential bounce trackers, immediately.\n[runBounceTrackingMitigations](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-runBounceTrackingMitigations)"]
1112#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1113pub struct RunBounceTrackingMitigations {
1114 pub method: RunBounceTrackingMitigationsMethod,
1115 pub params: RunBounceTrackingMitigationsParams,
1116}
1117impl RunBounceTrackingMitigations {
1118 pub const IDENTIFIER: &'static str = "Storage.runBounceTrackingMitigations";
1119 pub fn identifier(&self) -> &'static str {
1120 Self::IDENTIFIER
1121 }
1122}
1123impl crate::CommandResult for RunBounceTrackingMitigations {
1124 type Result = super::results::RunBounceTrackingMitigationsResult;
1125}
1126#[doc = "https://wicg.github.io/attribution-reporting-api/\n[setAttributionReportingLocalTestingMode](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setAttributionReportingLocalTestingMode)"]
1127#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1128pub struct SetAttributionReportingLocalTestingModeParams {
1129 #[doc = "If enabled, noise is suppressed and reports are sent immediately."]
1130 #[serde(rename = "enabled")]
1131 pub enabled: bool,
1132}
1133impl SetAttributionReportingLocalTestingModeParams {
1134 pub fn new(enabled: impl Into<bool>) -> Self {
1135 Self {
1136 enabled: enabled.into(),
1137 }
1138 }
1139}
1140#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1141pub enum SetAttributionReportingLocalTestingModeMethod {
1142 #[serde(rename = "Storage.setAttributionReportingLocalTestingMode")]
1143 SetAttributionReportingLocalTestingMode,
1144}
1145#[doc = "https://wicg.github.io/attribution-reporting-api/\n[setAttributionReportingLocalTestingMode](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setAttributionReportingLocalTestingMode)"]
1146#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1147pub struct SetAttributionReportingLocalTestingMode {
1148 pub method: SetAttributionReportingLocalTestingModeMethod,
1149 pub params: SetAttributionReportingLocalTestingModeParams,
1150}
1151impl SetAttributionReportingLocalTestingMode {
1152 pub const IDENTIFIER: &'static str = "Storage.setAttributionReportingLocalTestingMode";
1153 pub fn identifier(&self) -> &'static str {
1154 Self::IDENTIFIER
1155 }
1156}
1157impl crate::CommandResult for SetAttributionReportingLocalTestingMode {
1158 type Result = super::results::SetAttributionReportingLocalTestingModeResult;
1159}
1160#[doc = "Enables/disables issuing of Attribution Reporting events.\n[setAttributionReportingTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setAttributionReportingTracking)"]
1161#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1162pub struct SetAttributionReportingTrackingParams {
1163 #[serde(rename = "enable")]
1164 pub enable: bool,
1165}
1166impl SetAttributionReportingTrackingParams {
1167 pub fn new(enable: impl Into<bool>) -> Self {
1168 Self {
1169 enable: enable.into(),
1170 }
1171 }
1172}
1173#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1174pub enum SetAttributionReportingTrackingMethod {
1175 #[serde(rename = "Storage.setAttributionReportingTracking")]
1176 SetAttributionReportingTracking,
1177}
1178#[doc = "Enables/disables issuing of Attribution Reporting events.\n[setAttributionReportingTracking](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-setAttributionReportingTracking)"]
1179#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1180pub struct SetAttributionReportingTracking {
1181 pub method: SetAttributionReportingTrackingMethod,
1182 pub params: SetAttributionReportingTrackingParams,
1183}
1184impl SetAttributionReportingTracking {
1185 pub const IDENTIFIER: &'static str = "Storage.setAttributionReportingTracking";
1186 pub fn identifier(&self) -> &'static str {
1187 Self::IDENTIFIER
1188 }
1189}
1190impl crate::CommandResult for SetAttributionReportingTracking {
1191 type Result = super::results::SetAttributionReportingTrackingResult;
1192}
1193#[doc = "Sends all pending Attribution Reports immediately, regardless of their\nscheduled report time.\n[sendPendingAttributionReports](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-sendPendingAttributionReports)"]
1194#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1195pub struct SendPendingAttributionReportsParams {}
1196#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1197pub enum SendPendingAttributionReportsMethod {
1198 #[serde(rename = "Storage.sendPendingAttributionReports")]
1199 SendPendingAttributionReports,
1200}
1201#[doc = "Sends all pending Attribution Reports immediately, regardless of their\nscheduled report time.\n[sendPendingAttributionReports](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-sendPendingAttributionReports)"]
1202#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1203pub struct SendPendingAttributionReports {
1204 pub method: SendPendingAttributionReportsMethod,
1205 pub params: SendPendingAttributionReportsParams,
1206}
1207impl SendPendingAttributionReports {
1208 pub const IDENTIFIER: &'static str = "Storage.sendPendingAttributionReports";
1209 pub fn identifier(&self) -> &'static str {
1210 Self::IDENTIFIER
1211 }
1212}
1213impl crate::CommandResult for SendPendingAttributionReports {
1214 type Result = super::results::SendPendingAttributionReportsResult;
1215}
1216#[doc = "Returns the effective Related Website Sets in use by this profile for the browser\nsession. The effective Related Website Sets will not change during a browser session.\n[getRelatedWebsiteSets](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getRelatedWebsiteSets)"]
1217#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1218pub struct GetRelatedWebsiteSetsParams {}
1219#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1220pub enum GetRelatedWebsiteSetsMethod {
1221 #[serde(rename = "Storage.getRelatedWebsiteSets")]
1222 GetRelatedWebsiteSets,
1223}
1224#[doc = "Returns the effective Related Website Sets in use by this profile for the browser\nsession. The effective Related Website Sets will not change during a browser session.\n[getRelatedWebsiteSets](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getRelatedWebsiteSets)"]
1225#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1226pub struct GetRelatedWebsiteSets {
1227 pub method: GetRelatedWebsiteSetsMethod,
1228 pub params: GetRelatedWebsiteSetsParams,
1229}
1230impl GetRelatedWebsiteSets {
1231 pub const IDENTIFIER: &'static str = "Storage.getRelatedWebsiteSets";
1232 pub fn identifier(&self) -> &'static str {
1233 Self::IDENTIFIER
1234 }
1235}
1236impl crate::CommandResult for GetRelatedWebsiteSets {
1237 type Result = super::results::GetRelatedWebsiteSetsResult;
1238}
1239#[doc = "Returns the list of URLs from a page and its embedded resources that match\nexisting grace period URL pattern rules.\nhttps://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period\n[getAffectedUrlsForThirdPartyCookieMetadata](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getAffectedUrlsForThirdPartyCookieMetadata)"]
1240#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1241pub struct GetAffectedUrlsForThirdPartyCookieMetadataParams {
1242 #[doc = "The URL of the page currently being visited."]
1243 #[serde(rename = "firstPartyUrl")]
1244 pub first_party_url: String,
1245 #[doc = "The list of embedded resource URLs from the page."]
1246 #[serde(rename = "thirdPartyUrls")]
1247 #[serde(skip_serializing_if = "Vec::is_empty")]
1248 pub third_party_urls: Vec<String>,
1249}
1250impl GetAffectedUrlsForThirdPartyCookieMetadataParams {
1251 pub fn new(first_party_url: impl Into<String>, third_party_urls: Vec<String>) -> Self {
1252 Self {
1253 first_party_url: first_party_url.into(),
1254 third_party_urls,
1255 }
1256 }
1257}
1258#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1259pub enum GetAffectedUrlsForThirdPartyCookieMetadataMethod {
1260 #[serde(rename = "Storage.getAffectedUrlsForThirdPartyCookieMetadata")]
1261 GetAffectedUrlsForThirdPartyCookieMetadata,
1262}
1263#[doc = "Returns the list of URLs from a page and its embedded resources that match\nexisting grace period URL pattern rules.\nhttps://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period\n[getAffectedUrlsForThirdPartyCookieMetadata](https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getAffectedUrlsForThirdPartyCookieMetadata)"]
1264#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1265pub struct GetAffectedUrlsForThirdPartyCookieMetadata {
1266 pub method: GetAffectedUrlsForThirdPartyCookieMetadataMethod,
1267 pub params: GetAffectedUrlsForThirdPartyCookieMetadataParams,
1268}
1269impl GetAffectedUrlsForThirdPartyCookieMetadata {
1270 pub const IDENTIFIER: &'static str = "Storage.getAffectedUrlsForThirdPartyCookieMetadata";
1271 pub fn identifier(&self) -> &'static str {
1272 Self::IDENTIFIER
1273 }
1274}
1275impl crate::CommandResult for GetAffectedUrlsForThirdPartyCookieMetadata {
1276 type Result = super::results::GetAffectedUrlsForThirdPartyCookieMetadataResult;
1277}
1278#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1279pub struct SetProtectedAudienceKAnonymityParams {
1280 #[serde(rename = "owner")]
1281 pub owner: String,
1282 #[serde(rename = "name")]
1283 pub name: String,
1284 #[serde(rename = "hashes")]
1285 #[serde(skip_serializing_if = "Vec::is_empty")]
1286 pub hashes: Vec<crate::Binary>,
1287}
1288impl SetProtectedAudienceKAnonymityParams {
1289 pub fn new(
1290 owner: impl Into<String>,
1291 name: impl Into<String>,
1292 hashes: Vec<crate::Binary>,
1293 ) -> Self {
1294 Self {
1295 owner: owner.into(),
1296 name: name.into(),
1297 hashes,
1298 }
1299 }
1300}
1301#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1302pub enum SetProtectedAudienceKAnonymityMethod {
1303 #[serde(rename = "Storage.setProtectedAudienceKAnonymity")]
1304 SetProtectedAudienceKAnonymity,
1305}
1306#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1307pub struct SetProtectedAudienceKAnonymity {
1308 pub method: SetProtectedAudienceKAnonymityMethod,
1309 pub params: SetProtectedAudienceKAnonymityParams,
1310}
1311impl SetProtectedAudienceKAnonymity {
1312 pub const IDENTIFIER: &'static str = "Storage.setProtectedAudienceKAnonymity";
1313 pub fn identifier(&self) -> &'static str {
1314 Self::IDENTIFIER
1315 }
1316}
1317impl crate::CommandResult for SetProtectedAudienceKAnonymity {
1318 type Result = super::results::SetProtectedAudienceKAnonymityResult;
1319}
1320group_enum ! (StorageCommands { GetStorageKey (GetStorageKey) , ClearDataForOrigin (ClearDataForOrigin) , ClearDataForStorageKey (ClearDataForStorageKey) , GetCookies (GetCookies) , SetCookies (SetCookies) , ClearCookies (ClearCookies) , GetUsageAndQuota (GetUsageAndQuota) , OverrideQuotaForOrigin (OverrideQuotaForOrigin) , TrackCacheStorageForOrigin (TrackCacheStorageForOrigin) , TrackCacheStorageForStorageKey (TrackCacheStorageForStorageKey) , TrackIndexedDbForOrigin (TrackIndexedDbForOrigin) , TrackIndexedDbForStorageKey (TrackIndexedDbForStorageKey) , UntrackCacheStorageForOrigin (UntrackCacheStorageForOrigin) , UntrackCacheStorageForStorageKey (UntrackCacheStorageForStorageKey) , UntrackIndexedDbForOrigin (UntrackIndexedDbForOrigin) , UntrackIndexedDbForStorageKey (UntrackIndexedDbForStorageKey) , GetTrustTokens (GetTrustTokens) , ClearTrustTokens (ClearTrustTokens) , GetInterestGroupDetails (GetInterestGroupDetails) , SetInterestGroupTracking (SetInterestGroupTracking) , SetInterestGroupAuctionTracking (SetInterestGroupAuctionTracking) , GetSharedStorageMetadata (GetSharedStorageMetadata) , GetSharedStorageEntries (GetSharedStorageEntries) , SetSharedStorageEntry (SetSharedStorageEntry) , DeleteSharedStorageEntry (DeleteSharedStorageEntry) , ClearSharedStorageEntries (ClearSharedStorageEntries) , ResetSharedStorageBudget (ResetSharedStorageBudget) , SetSharedStorageTracking (SetSharedStorageTracking) , SetStorageBucketTracking (SetStorageBucketTracking) , DeleteStorageBucket (DeleteStorageBucket) , RunBounceTrackingMitigations (RunBounceTrackingMitigations) , SetAttributionReportingLocalTestingMode (SetAttributionReportingLocalTestingMode) , SetAttributionReportingTracking (SetAttributionReportingTracking) , SendPendingAttributionReports (SendPendingAttributionReports) , GetRelatedWebsiteSets (GetRelatedWebsiteSets) , GetAffectedUrlsForThirdPartyCookieMetadata (GetAffectedUrlsForThirdPartyCookieMetadata) , SetProtectedAudienceKAnonymity (SetProtectedAudienceKAnonymity) } + identifiable);