Skip to main content

rustenium_cdp_definitions/browser_protocol/storage/
results.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct GetStorageKeyForFrameResult {
4    #[serde(rename = "storageKey")]
5    pub storage_key: super::types::SerializedStorageKey,
6}
7impl TryFrom<serde_json::Value> for GetStorageKeyForFrameResult {
8    type Error = serde_json::Error;
9    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
10        serde_json::from_value(value)
11    }
12}
13#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14pub struct GetStorageKeyResult {
15    #[serde(rename = "storageKey")]
16    pub storage_key: super::types::SerializedStorageKey,
17}
18impl TryFrom<serde_json::Value> for GetStorageKeyResult {
19    type Error = serde_json::Error;
20    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
21        serde_json::from_value(value)
22    }
23}
24#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
25pub struct ClearDataForOriginResult {}
26impl TryFrom<serde_json::Value> for ClearDataForOriginResult {
27    type Error = serde_json::Error;
28    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
29        serde_json::from_value(value)
30    }
31}
32#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
33pub struct ClearDataForStorageKeyResult {}
34impl TryFrom<serde_json::Value> for ClearDataForStorageKeyResult {
35    type Error = serde_json::Error;
36    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
37        serde_json::from_value(value)
38    }
39}
40#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
41pub struct GetCookiesResult {
42    #[doc = "Array of cookie objects."]
43    #[serde(rename = "cookies")]
44    #[serde(skip_serializing_if = "Vec::is_empty")]
45    pub cookies: Vec<crate::browser_protocol::network::types::Cookie>,
46}
47impl TryFrom<serde_json::Value> for GetCookiesResult {
48    type Error = serde_json::Error;
49    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
50        serde_json::from_value(value)
51    }
52}
53#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
54pub struct SetCookiesResult {}
55impl TryFrom<serde_json::Value> for SetCookiesResult {
56    type Error = serde_json::Error;
57    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
58        serde_json::from_value(value)
59    }
60}
61#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
62pub struct ClearCookiesResult {}
63impl TryFrom<serde_json::Value> for ClearCookiesResult {
64    type Error = serde_json::Error;
65    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
66        serde_json::from_value(value)
67    }
68}
69#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
70pub struct GetUsageAndQuotaResult {
71    #[doc = "Storage usage (bytes)."]
72    #[serde(rename = "usage")]
73    pub usage: f64,
74    #[doc = "Storage quota (bytes)."]
75    #[serde(rename = "quota")]
76    pub quota: f64,
77    #[doc = "Whether or not the origin has an active storage quota override"]
78    #[serde(rename = "overrideActive")]
79    pub override_active: bool,
80    #[doc = "Storage usage per type (bytes)."]
81    #[serde(rename = "usageBreakdown")]
82    #[serde(skip_serializing_if = "Vec::is_empty")]
83    pub usage_breakdown: Vec<super::types::UsageForType>,
84}
85impl TryFrom<serde_json::Value> for GetUsageAndQuotaResult {
86    type Error = serde_json::Error;
87    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
88        serde_json::from_value(value)
89    }
90}
91#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
92pub struct OverrideQuotaForOriginResult {}
93impl TryFrom<serde_json::Value> for OverrideQuotaForOriginResult {
94    type Error = serde_json::Error;
95    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
96        serde_json::from_value(value)
97    }
98}
99#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
100pub struct TrackCacheStorageForOriginResult {}
101impl TryFrom<serde_json::Value> for TrackCacheStorageForOriginResult {
102    type Error = serde_json::Error;
103    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
104        serde_json::from_value(value)
105    }
106}
107#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
108pub struct TrackCacheStorageForStorageKeyResult {}
109impl TryFrom<serde_json::Value> for TrackCacheStorageForStorageKeyResult {
110    type Error = serde_json::Error;
111    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
112        serde_json::from_value(value)
113    }
114}
115#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
116pub struct TrackIndexedDbForOriginResult {}
117impl TryFrom<serde_json::Value> for TrackIndexedDbForOriginResult {
118    type Error = serde_json::Error;
119    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
120        serde_json::from_value(value)
121    }
122}
123#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
124pub struct TrackIndexedDbForStorageKeyResult {}
125impl TryFrom<serde_json::Value> for TrackIndexedDbForStorageKeyResult {
126    type Error = serde_json::Error;
127    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
128        serde_json::from_value(value)
129    }
130}
131#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
132pub struct UntrackCacheStorageForOriginResult {}
133impl TryFrom<serde_json::Value> for UntrackCacheStorageForOriginResult {
134    type Error = serde_json::Error;
135    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
136        serde_json::from_value(value)
137    }
138}
139#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
140pub struct UntrackCacheStorageForStorageKeyResult {}
141impl TryFrom<serde_json::Value> for UntrackCacheStorageForStorageKeyResult {
142    type Error = serde_json::Error;
143    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
144        serde_json::from_value(value)
145    }
146}
147#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
148pub struct UntrackIndexedDbForOriginResult {}
149impl TryFrom<serde_json::Value> for UntrackIndexedDbForOriginResult {
150    type Error = serde_json::Error;
151    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
152        serde_json::from_value(value)
153    }
154}
155#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
156pub struct UntrackIndexedDbForStorageKeyResult {}
157impl TryFrom<serde_json::Value> for UntrackIndexedDbForStorageKeyResult {
158    type Error = serde_json::Error;
159    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
160        serde_json::from_value(value)
161    }
162}
163#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
164pub struct GetTrustTokensResult {
165    #[serde(rename = "tokens")]
166    #[serde(skip_serializing_if = "Vec::is_empty")]
167    pub tokens: Vec<super::types::TrustTokens>,
168}
169impl TryFrom<serde_json::Value> for GetTrustTokensResult {
170    type Error = serde_json::Error;
171    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
172        serde_json::from_value(value)
173    }
174}
175#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
176pub struct ClearTrustTokensResult {
177    #[doc = "True if any tokens were deleted, false otherwise."]
178    #[serde(rename = "didDeleteTokens")]
179    pub did_delete_tokens: bool,
180}
181impl TryFrom<serde_json::Value> for ClearTrustTokensResult {
182    type Error = serde_json::Error;
183    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
184        serde_json::from_value(value)
185    }
186}
187#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
188pub struct GetInterestGroupDetailsResult {
189    #[doc = "This largely corresponds to:\nhttps://wicg.github.io/turtledove/#dictdef-generatebidinterestgroup\nbut has absolute expirationTime instead of relative lifetimeMs and\nalso adds joiningOrigin."]
190    #[serde(rename = "details")]
191    pub details: serde_json::Value,
192}
193impl TryFrom<serde_json::Value> for GetInterestGroupDetailsResult {
194    type Error = serde_json::Error;
195    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
196        serde_json::from_value(value)
197    }
198}
199#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
200pub struct SetInterestGroupTrackingResult {}
201impl TryFrom<serde_json::Value> for SetInterestGroupTrackingResult {
202    type Error = serde_json::Error;
203    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
204        serde_json::from_value(value)
205    }
206}
207#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
208pub struct SetInterestGroupAuctionTrackingResult {}
209impl TryFrom<serde_json::Value> for SetInterestGroupAuctionTrackingResult {
210    type Error = serde_json::Error;
211    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
212        serde_json::from_value(value)
213    }
214}
215#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
216pub struct GetSharedStorageMetadataResult {
217    #[serde(rename = "metadata")]
218    pub metadata: super::types::SharedStorageMetadata,
219}
220impl TryFrom<serde_json::Value> for GetSharedStorageMetadataResult {
221    type Error = serde_json::Error;
222    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
223        serde_json::from_value(value)
224    }
225}
226#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
227pub struct GetSharedStorageEntriesResult {
228    #[serde(rename = "entries")]
229    #[serde(skip_serializing_if = "Vec::is_empty")]
230    pub entries: Vec<super::types::SharedStorageEntry>,
231}
232impl TryFrom<serde_json::Value> for GetSharedStorageEntriesResult {
233    type Error = serde_json::Error;
234    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
235        serde_json::from_value(value)
236    }
237}
238#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
239pub struct SetSharedStorageEntryResult {}
240impl TryFrom<serde_json::Value> for SetSharedStorageEntryResult {
241    type Error = serde_json::Error;
242    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
243        serde_json::from_value(value)
244    }
245}
246#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
247pub struct DeleteSharedStorageEntryResult {}
248impl TryFrom<serde_json::Value> for DeleteSharedStorageEntryResult {
249    type Error = serde_json::Error;
250    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
251        serde_json::from_value(value)
252    }
253}
254#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
255pub struct ClearSharedStorageEntriesResult {}
256impl TryFrom<serde_json::Value> for ClearSharedStorageEntriesResult {
257    type Error = serde_json::Error;
258    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
259        serde_json::from_value(value)
260    }
261}
262#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
263pub struct ResetSharedStorageBudgetResult {}
264impl TryFrom<serde_json::Value> for ResetSharedStorageBudgetResult {
265    type Error = serde_json::Error;
266    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
267        serde_json::from_value(value)
268    }
269}
270#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
271pub struct SetSharedStorageTrackingResult {}
272impl TryFrom<serde_json::Value> for SetSharedStorageTrackingResult {
273    type Error = serde_json::Error;
274    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
275        serde_json::from_value(value)
276    }
277}
278#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
279pub struct SetStorageBucketTrackingResult {}
280impl TryFrom<serde_json::Value> for SetStorageBucketTrackingResult {
281    type Error = serde_json::Error;
282    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
283        serde_json::from_value(value)
284    }
285}
286#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
287pub struct DeleteStorageBucketResult {}
288impl TryFrom<serde_json::Value> for DeleteStorageBucketResult {
289    type Error = serde_json::Error;
290    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
291        serde_json::from_value(value)
292    }
293}
294#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
295pub struct RunBounceTrackingMitigationsResult {
296    #[serde(rename = "deletedSites")]
297    #[serde(skip_serializing_if = "Vec::is_empty")]
298    pub deleted_sites: Vec<String>,
299}
300impl TryFrom<serde_json::Value> for RunBounceTrackingMitigationsResult {
301    type Error = serde_json::Error;
302    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
303        serde_json::from_value(value)
304    }
305}
306#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
307pub struct SetAttributionReportingLocalTestingModeResult {}
308impl TryFrom<serde_json::Value> for SetAttributionReportingLocalTestingModeResult {
309    type Error = serde_json::Error;
310    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
311        serde_json::from_value(value)
312    }
313}
314#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
315pub struct SetAttributionReportingTrackingResult {}
316impl TryFrom<serde_json::Value> for SetAttributionReportingTrackingResult {
317    type Error = serde_json::Error;
318    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
319        serde_json::from_value(value)
320    }
321}
322#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
323pub struct SendPendingAttributionReportsResult {
324    #[doc = "The number of reports that were sent."]
325    #[serde(rename = "numSent")]
326    pub num_sent: i64,
327}
328impl TryFrom<serde_json::Value> for SendPendingAttributionReportsResult {
329    type Error = serde_json::Error;
330    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
331        serde_json::from_value(value)
332    }
333}
334#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
335pub struct GetRelatedWebsiteSetsResult {
336    #[serde(rename = "sets")]
337    #[serde(skip_serializing_if = "Vec::is_empty")]
338    pub sets: Vec<super::types::RelatedWebsiteSet>,
339}
340impl TryFrom<serde_json::Value> for GetRelatedWebsiteSetsResult {
341    type Error = serde_json::Error;
342    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
343        serde_json::from_value(value)
344    }
345}
346#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
347pub struct GetAffectedUrlsForThirdPartyCookieMetadataResult {
348    #[doc = "Array of matching URLs. If there is a primary pattern match for the first-\nparty URL, only the first-party URL is returned in the array."]
349    #[serde(rename = "matchedUrls")]
350    #[serde(skip_serializing_if = "Vec::is_empty")]
351    pub matched_urls: Vec<String>,
352}
353impl TryFrom<serde_json::Value> for GetAffectedUrlsForThirdPartyCookieMetadataResult {
354    type Error = serde_json::Error;
355    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
356        serde_json::from_value(value)
357    }
358}
359#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
360pub struct SetProtectedAudienceKAnonymityResult {}
361impl TryFrom<serde_json::Value> for SetProtectedAudienceKAnonymityResult {
362    type Error = serde_json::Error;
363    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
364        serde_json::from_value(value)
365    }
366}