Skip to main content

cdp_driver/protocol/
audits.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! Audits domain allows investigation of page violations and possible
5//! improvements.
6//!
7//! Types, command parameters and event payloads for the `Audits`
8//! domain. The method-name constants for the same domain are in
9//! [`crate::methods`].
10//!
11//! This domain is experimental and may change without notice.
12
13use serde::{Deserialize, Serialize};
14
15/// Information about a cookie that is affected by an inspector issue.
16#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
17pub struct AffectedCookie {
18    /// The following three properties uniquely identify a cookie
19    pub name: String,
20    pub path: String,
21    pub domain: String,
22}
23
24/// Information about a request that is affected by an inspector issue.
25#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
26pub struct AffectedRequest {
27    /// The unique request id.
28    #[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
29    pub request_id: Option<crate::protocol::network::RequestId>,
30    pub url: String,
31}
32
33/// Information about the frame affected by an inspector issue.
34#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
35pub struct AffectedFrame {
36    #[serde(rename = "frameId")]
37    pub frame_id: crate::protocol::page::FrameId,
38}
39
40#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
41pub enum CookieExclusionReason {
42    /// `ExcludeSameSiteUnspecifiedTreatedAsLax`
43    ExcludeSameSiteUnspecifiedTreatedAsLax,
44    /// `ExcludeSameSiteNoneInsecure`
45    ExcludeSameSiteNoneInsecure,
46    /// `ExcludeSameSiteLax`
47    ExcludeSameSiteLax,
48    /// `ExcludeSameSiteStrict`
49    ExcludeSameSiteStrict,
50    /// `ExcludeDomainNonASCII`
51    #[serde(rename = "ExcludeDomainNonASCII")]
52    ExcludeDomainNonAscii,
53    /// `ExcludeThirdPartyPhaseout`
54    ExcludeThirdPartyPhaseout,
55    /// `ExcludePortMismatch`
56    ExcludePortMismatch,
57    /// `ExcludeSchemeMismatch`
58    ExcludeSchemeMismatch,
59    /// A value this vendored schema does not list. Chrome adds values ahead of
60    /// the published protocol, so an unrecognised one is kept as it arrived
61    /// rather than failing the payload it came in.
62    #[serde(untagged)]
63    Unrecognized(String),
64}
65
66#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
67pub enum CookieWarningReason {
68    /// `WarnSameSiteUnspecifiedCrossSiteContext`
69    WarnSameSiteUnspecifiedCrossSiteContext,
70    /// `WarnSameSiteNoneInsecure`
71    WarnSameSiteNoneInsecure,
72    /// `WarnSameSiteUnspecifiedLaxAllowUnsafe`
73    WarnSameSiteUnspecifiedLaxAllowUnsafe,
74    /// `WarnSameSiteStrictLaxDowngradeStrict`
75    WarnSameSiteStrictLaxDowngradeStrict,
76    /// `WarnSameSiteStrictCrossDowngradeStrict`
77    WarnSameSiteStrictCrossDowngradeStrict,
78    /// `WarnSameSiteStrictCrossDowngradeLax`
79    WarnSameSiteStrictCrossDowngradeLax,
80    /// `WarnSameSiteLaxCrossDowngradeStrict`
81    WarnSameSiteLaxCrossDowngradeStrict,
82    /// `WarnSameSiteLaxCrossDowngradeLax`
83    WarnSameSiteLaxCrossDowngradeLax,
84    /// `WarnAttributeValueExceedsMaxSize`
85    WarnAttributeValueExceedsMaxSize,
86    /// `WarnDomainNonASCII`
87    #[serde(rename = "WarnDomainNonASCII")]
88    WarnDomainNonAscii,
89    /// `WarnThirdPartyPhaseout`
90    WarnThirdPartyPhaseout,
91    /// `WarnCrossSiteRedirectDowngradeChangesInclusion`
92    WarnCrossSiteRedirectDowngradeChangesInclusion,
93    /// `WarnDeprecationTrialMetadata`
94    WarnDeprecationTrialMetadata,
95    /// `WarnThirdPartyCookieHeuristic`
96    WarnThirdPartyCookieHeuristic,
97    /// A value this vendored schema does not list. Chrome adds values ahead of
98    /// the published protocol, so an unrecognised one is kept as it arrived
99    /// rather than failing the payload it came in.
100    #[serde(untagged)]
101    Unrecognized(String),
102}
103
104#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
105pub enum CookieOperation {
106    /// `SetCookie`
107    SetCookie,
108    /// `ReadCookie`
109    ReadCookie,
110    /// A value this vendored schema does not list. Chrome adds values ahead of
111    /// the published protocol, so an unrecognised one is kept as it arrived
112    /// rather than failing the payload it came in.
113    #[serde(untagged)]
114    Unrecognized(String),
115}
116
117/// Represents the category of insight that a cookie issue falls under.
118#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
119pub enum InsightType {
120    /// `GitHubResource`
121    GitHubResource,
122    /// `GracePeriod`
123    GracePeriod,
124    /// `Heuristics`
125    Heuristics,
126    /// A value this vendored schema does not list. Chrome adds values ahead of
127    /// the published protocol, so an unrecognised one is kept as it arrived
128    /// rather than failing the payload it came in.
129    #[serde(untagged)]
130    Unrecognized(String),
131}
132
133/// Information about the suggested solution to a cookie issue.
134#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
135pub struct CookieIssueInsight {
136    pub r#type: InsightType,
137    /// Link to table entry in third-party cookie migration readiness list.
138    #[serde(
139        rename = "tableEntryUrl",
140        default,
141        skip_serializing_if = "Option::is_none"
142    )]
143    pub table_entry_url: Option<String>,
144}
145
146/// This information is currently necessary, as the front-end has a difficult
147/// time finding a specific cookie. With this, we can convey specific error
148/// information without the cookie.
149#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
150pub struct CookieIssueDetails {
151    /// If AffectedCookie is not set then rawCookieLine contains the raw
152    /// Set-Cookie header string. This hints at a problem where the cookie line is
153    /// syntactically or semantically malformed in a way that no valid cookie
154    /// could be created.
155    #[serde(default, skip_serializing_if = "Option::is_none")]
156    pub cookie: Option<AffectedCookie>,
157    #[serde(
158        rename = "rawCookieLine",
159        default,
160        skip_serializing_if = "Option::is_none"
161    )]
162    pub raw_cookie_line: Option<String>,
163    #[serde(rename = "cookieWarningReasons")]
164    pub cookie_warning_reasons: Vec<CookieWarningReason>,
165    #[serde(rename = "cookieExclusionReasons")]
166    pub cookie_exclusion_reasons: Vec<CookieExclusionReason>,
167    /// Optionally identifies the site-for-cookies and the cookie url, which may
168    /// be used by the front-end as additional context.
169    pub operation: CookieOperation,
170    #[serde(
171        rename = "siteForCookies",
172        default,
173        skip_serializing_if = "Option::is_none"
174    )]
175    pub site_for_cookies: Option<String>,
176    #[serde(rename = "cookieUrl", default, skip_serializing_if = "Option::is_none")]
177    pub cookie_url: Option<String>,
178    #[serde(default, skip_serializing_if = "Option::is_none")]
179    pub request: Option<AffectedRequest>,
180    /// The recommended solution to the issue.
181    #[serde(default, skip_serializing_if = "Option::is_none")]
182    pub insight: Option<CookieIssueInsight>,
183}
184
185#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
186pub enum PerformanceIssueType {
187    /// `DocumentCookie`
188    DocumentCookie,
189    /// A value this vendored schema does not list. Chrome adds values ahead of
190    /// the published protocol, so an unrecognised one is kept as it arrived
191    /// rather than failing the payload it came in.
192    #[serde(untagged)]
193    Unrecognized(String),
194}
195
196/// Details for a performance issue.
197#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
198pub struct PerformanceIssueDetails {
199    #[serde(rename = "performanceIssueType")]
200    pub performance_issue_type: PerformanceIssueType,
201    #[serde(
202        rename = "sourceCodeLocation",
203        default,
204        skip_serializing_if = "Option::is_none"
205    )]
206    pub source_code_location: Option<SourceCodeLocation>,
207}
208
209#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
210pub enum MixedContentResolutionStatus {
211    /// `MixedContentBlocked`
212    MixedContentBlocked,
213    /// `MixedContentAutomaticallyUpgraded`
214    MixedContentAutomaticallyUpgraded,
215    /// `MixedContentWarning`
216    MixedContentWarning,
217    /// A value this vendored schema does not list. Chrome adds values ahead of
218    /// the published protocol, so an unrecognised one is kept as it arrived
219    /// rather than failing the payload it came in.
220    #[serde(untagged)]
221    Unrecognized(String),
222}
223
224#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
225pub enum MixedContentResourceType {
226    /// `Audio`
227    Audio,
228    /// `Beacon`
229    Beacon,
230    /// `CSPReport`
231    #[serde(rename = "CSPReport")]
232    CspReport,
233    /// `Download`
234    Download,
235    /// `EventSource`
236    EventSource,
237    /// `Favicon`
238    Favicon,
239    /// `Font`
240    Font,
241    /// `Form`
242    Form,
243    /// `Frame`
244    Frame,
245    /// `Image`
246    Image,
247    /// `Import`
248    Import,
249    /// `JSON`
250    #[serde(rename = "JSON")]
251    Json,
252    /// `Manifest`
253    Manifest,
254    /// `Ping`
255    Ping,
256    /// `PluginData`
257    PluginData,
258    /// `PluginResource`
259    PluginResource,
260    /// `Prefetch`
261    Prefetch,
262    /// `Resource`
263    Resource,
264    /// `Script`
265    Script,
266    /// `ServiceWorker`
267    ServiceWorker,
268    /// `SharedWorker`
269    SharedWorker,
270    /// `SpeculationRules`
271    SpeculationRules,
272    /// `Stylesheet`
273    Stylesheet,
274    /// `Track`
275    Track,
276    /// `Video`
277    Video,
278    /// `Worker`
279    Worker,
280    /// `XMLHttpRequest`
281    #[serde(rename = "XMLHttpRequest")]
282    XmlHttpRequest,
283    /// `XSLT`
284    #[serde(rename = "XSLT")]
285    Xslt,
286    /// A value this vendored schema does not list. Chrome adds values ahead of
287    /// the published protocol, so an unrecognised one is kept as it arrived
288    /// rather than failing the payload it came in.
289    #[serde(untagged)]
290    Unrecognized(String),
291}
292
293#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
294pub struct MixedContentIssueDetails {
295    /// The type of resource causing the mixed content issue (css, js, iframe,
296    /// form,...). Marked as optional because it is mapped to from
297    /// blink::mojom::RequestContextType, which will be replaced by
298    /// network::mojom::RequestDestination
299    #[serde(
300        rename = "resourceType",
301        default,
302        skip_serializing_if = "Option::is_none"
303    )]
304    pub resource_type: Option<MixedContentResourceType>,
305    /// The way the mixed content issue is being resolved.
306    #[serde(rename = "resolutionStatus")]
307    pub resolution_status: MixedContentResolutionStatus,
308    /// The unsafe http url causing the mixed content issue.
309    #[serde(rename = "insecureURL")]
310    pub insecure_url: String,
311    /// The url responsible for the call to an unsafe url.
312    #[serde(rename = "mainResourceURL")]
313    pub main_resource_url: String,
314    /// The mixed content request. Does not always exist (e.g. for unsafe form
315    /// submission urls).
316    #[serde(default, skip_serializing_if = "Option::is_none")]
317    pub request: Option<AffectedRequest>,
318    /// Optional because not every mixed content issue is necessarily linked to a
319    /// frame.
320    #[serde(default, skip_serializing_if = "Option::is_none")]
321    pub frame: Option<AffectedFrame>,
322}
323
324/// Enum indicating the reason a response has been blocked. These reasons are
325/// refinements of the net error BLOCKED_BY_RESPONSE.
326#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
327pub enum BlockedByResponseReason {
328    /// `CoepFrameResourceNeedsCoepHeader`
329    CoepFrameResourceNeedsCoepHeader,
330    /// `CoopSandboxedIFrameCannotNavigateToCoopPage`
331    CoopSandboxedIFrameCannotNavigateToCoopPage,
332    /// `CorpNotSameOrigin`
333    CorpNotSameOrigin,
334    /// `CorpNotSameOriginAfterDefaultedToSameOriginByCoep`
335    CorpNotSameOriginAfterDefaultedToSameOriginByCoep,
336    /// `CorpNotSameOriginAfterDefaultedToSameOriginByDip`
337    CorpNotSameOriginAfterDefaultedToSameOriginByDip,
338    /// `CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip`
339    CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip,
340    /// `CorpNotSameSite`
341    CorpNotSameSite,
342    /// `SRIMessageSignatureMismatch`
343    #[serde(rename = "SRIMessageSignatureMismatch")]
344    SriMessageSignatureMismatch,
345    /// A value this vendored schema does not list. Chrome adds values ahead of
346    /// the published protocol, so an unrecognised one is kept as it arrived
347    /// rather than failing the payload it came in.
348    #[serde(untagged)]
349    Unrecognized(String),
350}
351
352/// Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
353/// code. Currently only used for COEP/COOP, but may be extended to include
354/// some CSP errors in the future.
355#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
356pub struct BlockedByResponseIssueDetails {
357    pub request: AffectedRequest,
358    #[serde(
359        rename = "parentFrame",
360        default,
361        skip_serializing_if = "Option::is_none"
362    )]
363    pub parent_frame: Option<AffectedFrame>,
364    #[serde(
365        rename = "blockedFrame",
366        default,
367        skip_serializing_if = "Option::is_none"
368    )]
369    pub blocked_frame: Option<AffectedFrame>,
370    pub reason: BlockedByResponseReason,
371}
372
373#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
374pub enum HeavyAdResolutionStatus {
375    /// `HeavyAdBlocked`
376    HeavyAdBlocked,
377    /// `HeavyAdWarning`
378    HeavyAdWarning,
379    /// A value this vendored schema does not list. Chrome adds values ahead of
380    /// the published protocol, so an unrecognised one is kept as it arrived
381    /// rather than failing the payload it came in.
382    #[serde(untagged)]
383    Unrecognized(String),
384}
385
386#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
387pub enum HeavyAdReason {
388    /// `NetworkTotalLimit`
389    NetworkTotalLimit,
390    /// `CpuTotalLimit`
391    CpuTotalLimit,
392    /// `CpuPeakLimit`
393    CpuPeakLimit,
394    /// A value this vendored schema does not list. Chrome adds values ahead of
395    /// the published protocol, so an unrecognised one is kept as it arrived
396    /// rather than failing the payload it came in.
397    #[serde(untagged)]
398    Unrecognized(String),
399}
400
401#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
402pub struct HeavyAdIssueDetails {
403    /// The resolution status, either blocking the content or warning.
404    pub resolution: HeavyAdResolutionStatus,
405    /// The reason the ad was blocked, total network or cpu or peak cpu.
406    pub reason: HeavyAdReason,
407    /// The frame that was blocked.
408    pub frame: AffectedFrame,
409}
410
411#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
412pub enum ContentSecurityPolicyViolationType {
413    /// `kInlineViolation`
414    #[serde(rename = "kInlineViolation")]
415    KInlineViolation,
416    /// `kEvalViolation`
417    #[serde(rename = "kEvalViolation")]
418    KEvalViolation,
419    /// `kURLViolation`
420    #[serde(rename = "kURLViolation")]
421    KUrlViolation,
422    /// `kSRIViolation`
423    #[serde(rename = "kSRIViolation")]
424    KSriViolation,
425    /// `kTrustedTypesSinkViolation`
426    #[serde(rename = "kTrustedTypesSinkViolation")]
427    KTrustedTypesSinkViolation,
428    /// `kTrustedTypesPolicyViolation`
429    #[serde(rename = "kTrustedTypesPolicyViolation")]
430    KTrustedTypesPolicyViolation,
431    /// `kWasmEvalViolation`
432    #[serde(rename = "kWasmEvalViolation")]
433    KWasmEvalViolation,
434    /// A value this vendored schema does not list. Chrome adds values ahead of
435    /// the published protocol, so an unrecognised one is kept as it arrived
436    /// rather than failing the payload it came in.
437    #[serde(untagged)]
438    Unrecognized(String),
439}
440
441#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
442pub struct SourceCodeLocation {
443    #[serde(rename = "scriptId", default, skip_serializing_if = "Option::is_none")]
444    pub script_id: Option<crate::protocol::runtime::ScriptId>,
445    pub url: String,
446    #[serde(rename = "lineNumber")]
447    pub line_number: i64,
448    #[serde(rename = "columnNumber")]
449    pub column_number: i64,
450}
451
452#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
453pub struct ContentSecurityPolicyIssueDetails {
454    /// The url not included in allowed sources.
455    #[serde(
456        rename = "blockedURL",
457        default,
458        skip_serializing_if = "Option::is_none"
459    )]
460    pub blocked_url: Option<String>,
461    /// Specific directive that is violated, causing the CSP issue.
462    #[serde(rename = "violatedDirective")]
463    pub violated_directive: String,
464    #[serde(rename = "isReportOnly")]
465    pub is_report_only: bool,
466    #[serde(rename = "contentSecurityPolicyViolationType")]
467    pub content_security_policy_violation_type: ContentSecurityPolicyViolationType,
468    #[serde(
469        rename = "frameAncestor",
470        default,
471        skip_serializing_if = "Option::is_none"
472    )]
473    pub frame_ancestor: Option<AffectedFrame>,
474    #[serde(
475        rename = "sourceCodeLocation",
476        default,
477        skip_serializing_if = "Option::is_none"
478    )]
479    pub source_code_location: Option<SourceCodeLocation>,
480    #[serde(
481        rename = "violatingNodeId",
482        default,
483        skip_serializing_if = "Option::is_none"
484    )]
485    pub violating_node_id: Option<crate::protocol::dom::BackendNodeId>,
486}
487
488#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
489pub enum SharedArrayBufferIssueType {
490    /// `TransferIssue`
491    TransferIssue,
492    /// `CreationIssue`
493    CreationIssue,
494    /// A value this vendored schema does not list. Chrome adds values ahead of
495    /// the published protocol, so an unrecognised one is kept as it arrived
496    /// rather than failing the payload it came in.
497    #[serde(untagged)]
498    Unrecognized(String),
499}
500
501/// Details for a issue arising from an SAB being instantiated in, or
502/// transferred to a context that is not cross-origin isolated.
503#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
504pub struct SharedArrayBufferIssueDetails {
505    #[serde(rename = "sourceCodeLocation")]
506    pub source_code_location: SourceCodeLocation,
507    #[serde(rename = "isWarning")]
508    pub is_warning: bool,
509    pub r#type: SharedArrayBufferIssueType,
510}
511
512/// Details for a CORS related issue, e.g. a warning or error related to CORS
513/// RFC1918 enforcement.
514#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
515pub struct CorsIssueDetails {
516    #[serde(rename = "corsErrorStatus")]
517    pub cors_error_status: crate::protocol::network::CorsErrorStatus,
518    #[serde(rename = "isWarning")]
519    pub is_warning: bool,
520    pub request: AffectedRequest,
521    #[serde(default, skip_serializing_if = "Option::is_none")]
522    pub location: Option<SourceCodeLocation>,
523    #[serde(
524        rename = "initiatorOrigin",
525        default,
526        skip_serializing_if = "Option::is_none"
527    )]
528    pub initiator_origin: Option<String>,
529    #[serde(
530        rename = "resourceIPAddressSpace",
531        default,
532        skip_serializing_if = "Option::is_none"
533    )]
534    pub resource_ip_address_space: Option<crate::protocol::network::IpAddressSpace>,
535    #[serde(
536        rename = "clientSecurityState",
537        default,
538        skip_serializing_if = "Option::is_none"
539    )]
540    pub client_security_state: Option<crate::protocol::network::ClientSecurityState>,
541}
542
543#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
544pub enum SharedDictionaryError {
545    /// `UseErrorCrossOriginNoCorsRequest`
546    UseErrorCrossOriginNoCorsRequest,
547    /// `UseErrorDictionaryLoadFailure`
548    UseErrorDictionaryLoadFailure,
549    /// `UseErrorMatchingDictionaryNotUsed`
550    UseErrorMatchingDictionaryNotUsed,
551    /// `UseErrorUnexpectedContentDictionaryHeader`
552    UseErrorUnexpectedContentDictionaryHeader,
553    /// `WriteErrorCossOriginNoCorsRequest`
554    WriteErrorCossOriginNoCorsRequest,
555    /// `WriteErrorDisallowedBySettings`
556    WriteErrorDisallowedBySettings,
557    /// `WriteErrorExpiredResponse`
558    WriteErrorExpiredResponse,
559    /// `WriteErrorFeatureDisabled`
560    WriteErrorFeatureDisabled,
561    /// `WriteErrorInsufficientResources`
562    WriteErrorInsufficientResources,
563    /// `WriteErrorInvalidMatchField`
564    WriteErrorInvalidMatchField,
565    /// `WriteErrorInvalidStructuredHeader`
566    WriteErrorInvalidStructuredHeader,
567    /// `WriteErrorInvalidTTLField`
568    #[serde(rename = "WriteErrorInvalidTTLField")]
569    WriteErrorInvalidTtlField,
570    /// `WriteErrorNavigationRequest`
571    WriteErrorNavigationRequest,
572    /// `WriteErrorNoMatchField`
573    WriteErrorNoMatchField,
574    /// `WriteErrorNonIntegerTTLField`
575    #[serde(rename = "WriteErrorNonIntegerTTLField")]
576    WriteErrorNonIntegerTtlField,
577    /// `WriteErrorNonListMatchDestField`
578    WriteErrorNonListMatchDestField,
579    /// `WriteErrorNonSecureContext`
580    WriteErrorNonSecureContext,
581    /// `WriteErrorNonStringIdField`
582    WriteErrorNonStringIdField,
583    /// `WriteErrorNonStringInMatchDestList`
584    WriteErrorNonStringInMatchDestList,
585    /// `WriteErrorInvalidMatchDestList`
586    WriteErrorInvalidMatchDestList,
587    /// `WriteErrorNonStringMatchField`
588    WriteErrorNonStringMatchField,
589    /// `WriteErrorNonTokenTypeField`
590    WriteErrorNonTokenTypeField,
591    /// `WriteErrorRequestAborted`
592    WriteErrorRequestAborted,
593    /// `WriteErrorShuttingDown`
594    WriteErrorShuttingDown,
595    /// `WriteErrorTooLongIdField`
596    WriteErrorTooLongIdField,
597    /// `WriteErrorUnsupportedType`
598    WriteErrorUnsupportedType,
599    /// A value this vendored schema does not list. Chrome adds values ahead of
600    /// the published protocol, so an unrecognised one is kept as it arrived
601    /// rather than failing the payload it came in.
602    #[serde(untagged)]
603    Unrecognized(String),
604}
605
606#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
607pub enum SriMessageSignatureError {
608    /// `MissingSignatureHeader`
609    MissingSignatureHeader,
610    /// `MissingSignatureInputHeader`
611    MissingSignatureInputHeader,
612    /// `InvalidSignatureHeader`
613    InvalidSignatureHeader,
614    /// `InvalidSignatureInputHeader`
615    InvalidSignatureInputHeader,
616    /// `SignatureHeaderValueIsNotByteSequence`
617    SignatureHeaderValueIsNotByteSequence,
618    /// `SignatureHeaderValueIsParameterized`
619    SignatureHeaderValueIsParameterized,
620    /// `SignatureHeaderValueIsIncorrectLength`
621    SignatureHeaderValueIsIncorrectLength,
622    /// `SignatureInputHeaderMissingLabel`
623    SignatureInputHeaderMissingLabel,
624    /// `SignatureInputHeaderValueNotInnerList`
625    SignatureInputHeaderValueNotInnerList,
626    /// `SignatureInputHeaderValueMissingComponents`
627    SignatureInputHeaderValueMissingComponents,
628    /// `SignatureInputHeaderInvalidComponentType`
629    SignatureInputHeaderInvalidComponentType,
630    /// `SignatureInputHeaderInvalidComponentName`
631    SignatureInputHeaderInvalidComponentName,
632    /// `SignatureInputHeaderInvalidHeaderComponentParameter`
633    SignatureInputHeaderInvalidHeaderComponentParameter,
634    /// `SignatureInputHeaderInvalidDerivedComponentParameter`
635    SignatureInputHeaderInvalidDerivedComponentParameter,
636    /// `SignatureInputHeaderKeyIdLength`
637    SignatureInputHeaderKeyIdLength,
638    /// `SignatureInputHeaderInvalidParameter`
639    SignatureInputHeaderInvalidParameter,
640    /// `SignatureInputHeaderMissingRequiredParameters`
641    SignatureInputHeaderMissingRequiredParameters,
642    /// `ValidationFailedSignatureExpired`
643    ValidationFailedSignatureExpired,
644    /// `ValidationFailedInvalidLength`
645    ValidationFailedInvalidLength,
646    /// `ValidationFailedSignatureMismatch`
647    ValidationFailedSignatureMismatch,
648    /// `ValidationFailedIntegrityMismatch`
649    ValidationFailedIntegrityMismatch,
650    /// `SignatureBaseUnknownDerivedComponent`
651    SignatureBaseUnknownDerivedComponent,
652    /// `SignatureBaseMissingHeader`
653    SignatureBaseMissingHeader,
654    /// `SignatureBaseInvalidUnencodedDigest`
655    SignatureBaseInvalidUnencodedDigest,
656    /// `SignatureBaseUnsupportedComponent`
657    SignatureBaseUnsupportedComponent,
658    /// A value this vendored schema does not list. Chrome adds values ahead of
659    /// the published protocol, so an unrecognised one is kept as it arrived
660    /// rather than failing the payload it came in.
661    #[serde(untagged)]
662    Unrecognized(String),
663}
664
665#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
666pub enum UnencodedDigestError {
667    /// `MalformedDictionary`
668    MalformedDictionary,
669    /// `UnknownAlgorithm`
670    UnknownAlgorithm,
671    /// `IncorrectDigestType`
672    IncorrectDigestType,
673    /// `IncorrectDigestLength`
674    IncorrectDigestLength,
675    /// A value this vendored schema does not list. Chrome adds values ahead of
676    /// the published protocol, so an unrecognised one is kept as it arrived
677    /// rather than failing the payload it came in.
678    #[serde(untagged)]
679    Unrecognized(String),
680}
681
682#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
683pub enum ConnectionAllowlistError {
684    /// `InvalidHeader`
685    InvalidHeader,
686    /// `MoreThanOneList`
687    MoreThanOneList,
688    /// `ItemNotInnerList`
689    ItemNotInnerList,
690    /// `InvalidAllowlistItemType`
691    InvalidAllowlistItemType,
692    /// `ReportingEndpointNotToken`
693    ReportingEndpointNotToken,
694    /// `InvalidUrlPattern`
695    InvalidUrlPattern,
696    /// `IFrameAttributeLoosensEmbeddingRequirement`
697    IFrameAttributeLoosensEmbeddingRequirement,
698    /// `InvalidAllowConnectionAllowlistFrom`
699    InvalidAllowConnectionAllowlistFrom,
700    /// `EmbeddingRequirementNotSatisfied`
701    EmbeddingRequirementNotSatisfied,
702    /// A value this vendored schema does not list. Chrome adds values ahead of
703    /// the published protocol, so an unrecognised one is kept as it arrived
704    /// rather than failing the payload it came in.
705    #[serde(untagged)]
706    Unrecognized(String),
707}
708
709/// Details for issues about documents in Quirks Mode or Limited Quirks Mode
710/// that affects page layouting.
711#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
712pub struct QuirksModeIssueDetails {
713    /// If false, it means the document's mode is "quirks" instead of
714    /// "limited-quirks".
715    #[serde(rename = "isLimitedQuirksMode")]
716    pub is_limited_quirks_mode: bool,
717    #[serde(rename = "documentNodeId")]
718    pub document_node_id: crate::protocol::dom::BackendNodeId,
719    pub url: String,
720    #[serde(rename = "frameId")]
721    pub frame_id: crate::protocol::page::FrameId,
722    #[serde(rename = "loaderId")]
723    pub loader_id: crate::protocol::network::LoaderId,
724}
725
726/// Deprecated in the protocol.
727#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
728pub struct NavigatorUserAgentIssueDetails {
729    pub url: String,
730    #[serde(default, skip_serializing_if = "Option::is_none")]
731    pub location: Option<SourceCodeLocation>,
732}
733
734#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
735pub struct SharedDictionaryIssueDetails {
736    #[serde(rename = "sharedDictionaryError")]
737    pub shared_dictionary_error: SharedDictionaryError,
738    pub request: AffectedRequest,
739}
740
741#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
742pub struct SriMessageSignatureIssueDetails {
743    pub error: SriMessageSignatureError,
744    #[serde(rename = "signatureBase")]
745    pub signature_base: String,
746    #[serde(rename = "integrityAssertions")]
747    pub integrity_assertions: Vec<String>,
748    pub request: AffectedRequest,
749}
750
751#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
752pub struct UnencodedDigestIssueDetails {
753    pub error: UnencodedDigestError,
754    pub request: AffectedRequest,
755}
756
757#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
758pub struct ConnectionAllowlistIssueDetails {
759    pub error: ConnectionAllowlistError,
760    pub request: AffectedRequest,
761}
762
763#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
764pub enum GenericIssueErrorType {
765    /// `FormLabelForNameError`
766    FormLabelForNameError,
767    /// `FormDuplicateIdForInputError`
768    FormDuplicateIdForInputError,
769    /// `FormInputWithNoLabelError`
770    FormInputWithNoLabelError,
771    /// `FormAutocompleteAttributeEmptyError`
772    FormAutocompleteAttributeEmptyError,
773    /// `FormEmptyIdAndNameAttributesForInputError`
774    FormEmptyIdAndNameAttributesForInputError,
775    /// `FormAriaLabelledByToNonExistingIdError`
776    FormAriaLabelledByToNonExistingIdError,
777    /// `FormInputAssignedAutocompleteValueToIdOrNameAttributeError`
778    FormInputAssignedAutocompleteValueToIdOrNameAttributeError,
779    /// `FormLabelHasNeitherForNorNestedInputError`
780    FormLabelHasNeitherForNorNestedInputError,
781    /// `FormLabelForMatchesNonExistingIdError`
782    FormLabelForMatchesNonExistingIdError,
783    /// `FormInputHasWrongButWellIntendedAutocompleteValueError`
784    FormInputHasWrongButWellIntendedAutocompleteValueError,
785    /// `ResponseWasBlockedByORB`
786    #[serde(rename = "ResponseWasBlockedByORB")]
787    ResponseWasBlockedByOrb,
788    /// `NavigationEntryMarkedSkippable`
789    NavigationEntryMarkedSkippable,
790    /// `BackUINavigationWouldSkipAd`
791    #[serde(rename = "BackUINavigationWouldSkipAd")]
792    BackUiNavigationWouldSkipAd,
793    /// `AutofillAndManualTextPolicyControlledFeaturesInfo`
794    AutofillAndManualTextPolicyControlledFeaturesInfo,
795    /// `AutofillPolicyControlledFeatureInfo`
796    AutofillPolicyControlledFeatureInfo,
797    /// `ManualTextPolicyControlledFeatureInfo`
798    ManualTextPolicyControlledFeatureInfo,
799    /// `FormModelContextParameterMissingTitleAndDescription`
800    FormModelContextParameterMissingTitleAndDescription,
801    /// `FormModelContextMissingToolName`
802    FormModelContextMissingToolName,
803    /// `FormModelContextMissingToolDescription`
804    FormModelContextMissingToolDescription,
805    /// `FormModelContextRequiredParameterMissingName`
806    FormModelContextRequiredParameterMissingName,
807    /// `FormModelContextParameterMissingName`
808    FormModelContextParameterMissingName,
809    /// `GeolocationPromptWithoutUserGesture`
810    GeolocationPromptWithoutUserGesture,
811    /// A value this vendored schema does not list. Chrome adds values ahead of
812    /// the published protocol, so an unrecognised one is kept as it arrived
813    /// rather than failing the payload it came in.
814    #[serde(untagged)]
815    Unrecognized(String),
816}
817
818/// Depending on the concrete errorType, different properties are set.
819#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
820pub struct GenericIssueDetails {
821    /// Issues with the same errorType are aggregated in the frontend.
822    #[serde(rename = "errorType")]
823    pub error_type: GenericIssueErrorType,
824    #[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
825    pub frame_id: Option<crate::protocol::page::FrameId>,
826    #[serde(
827        rename = "violatingNodeId",
828        default,
829        skip_serializing_if = "Option::is_none"
830    )]
831    pub violating_node_id: Option<crate::protocol::dom::BackendNodeId>,
832    #[serde(
833        rename = "violatingNodeAttribute",
834        default,
835        skip_serializing_if = "Option::is_none"
836    )]
837    pub violating_node_attribute: Option<String>,
838    #[serde(default, skip_serializing_if = "Option::is_none")]
839    pub request: Option<AffectedRequest>,
840}
841
842/// This issue tracks information needed to print a deprecation message.
843/// <https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md>
844#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
845pub struct DeprecationIssueDetails {
846    #[serde(
847        rename = "affectedFrame",
848        default,
849        skip_serializing_if = "Option::is_none"
850    )]
851    pub affected_frame: Option<AffectedFrame>,
852    #[serde(rename = "sourceCodeLocation")]
853    pub source_code_location: SourceCodeLocation,
854    /// One of the deprecation names from
855    /// third_party/blink/renderer/core/frame/deprecation/deprecation.json5
856    pub r#type: String,
857}
858
859/// This issue warns about sites in the redirect chain of a finished
860/// navigation that may be flagged as trackers and have their state cleared if
861/// they don't receive a user interaction. Note that in this context 'site'
862/// means eTLD+1. For example, if the URL `<https://example.test:80/bounce`>
863/// was in the redirect chain, the site reported would be `example.test`.
864#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
865pub struct BounceTrackingIssueDetails {
866    #[serde(rename = "trackingSites")]
867    pub tracking_sites: Vec<String>,
868}
869
870/// This issue warns about third-party sites that are accessing cookies on the
871/// current page, and have been permitted due to having a global metadata
872/// grant. Note that in this context 'site' means eTLD+1. For example, if the
873/// URL `<https://example.test:80/web_page`> was accessing cookies, the site
874/// reported would be `example.test`.
875#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
876pub struct CookieDeprecationMetadataIssueDetails {
877    #[serde(rename = "allowedSites")]
878    pub allowed_sites: Vec<String>,
879    #[serde(rename = "optOutPercentage")]
880    pub opt_out_percentage: f64,
881    #[serde(rename = "isOptOutTopLevel")]
882    pub is_opt_out_top_level: bool,
883    pub operation: CookieOperation,
884}
885
886#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
887pub enum ClientHintIssueReason {
888    /// `MetaTagAllowListInvalidOrigin`
889    MetaTagAllowListInvalidOrigin,
890    /// `MetaTagModifiedHTML`
891    #[serde(rename = "MetaTagModifiedHTML")]
892    MetaTagModifiedHtml,
893    /// A value this vendored schema does not list. Chrome adds values ahead of
894    /// the published protocol, so an unrecognised one is kept as it arrived
895    /// rather than failing the payload it came in.
896    #[serde(untagged)]
897    Unrecognized(String),
898}
899
900#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
901pub struct FederatedAuthRequestIssueDetails {
902    #[serde(rename = "federatedAuthRequestIssueReason")]
903    pub federated_auth_request_issue_reason: FederatedAuthRequestIssueReason,
904}
905
906/// Represents the failure reason when a federated authentication reason
907/// fails. Should be updated alongside RequestIdTokenStatus in
908/// third_party/blink/public/mojom/devtools/inspector_issue.mojom to include
909/// all cases except for success.
910#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
911pub enum FederatedAuthRequestIssueReason {
912    /// `ShouldEmbargo`
913    ShouldEmbargo,
914    /// `TooManyRequests`
915    TooManyRequests,
916    /// `WellKnownHttpNotFound`
917    WellKnownHttpNotFound,
918    /// `WellKnownNoResponse`
919    WellKnownNoResponse,
920    /// `WellKnownBlockedByConnectionAllowlist`
921    WellKnownBlockedByConnectionAllowlist,
922    /// `WellKnownInvalidResponse`
923    WellKnownInvalidResponse,
924    /// `WellKnownListEmpty`
925    WellKnownListEmpty,
926    /// `WellKnownInvalidContentType`
927    WellKnownInvalidContentType,
928    /// `ConfigNotInWellKnown`
929    ConfigNotInWellKnown,
930    /// `WellKnownTooBig`
931    WellKnownTooBig,
932    /// `ConfigHttpNotFound`
933    ConfigHttpNotFound,
934    /// `ConfigNoResponse`
935    ConfigNoResponse,
936    /// `ConfigBlockedByConnectionAllowlist`
937    ConfigBlockedByConnectionAllowlist,
938    /// `ConfigInvalidResponse`
939    ConfigInvalidResponse,
940    /// `ConfigInvalidContentType`
941    ConfigInvalidContentType,
942    /// `IdpNotPotentiallyTrustworthy`
943    IdpNotPotentiallyTrustworthy,
944    /// `DisabledInSettings`
945    DisabledInSettings,
946    /// `DisabledInFlags`
947    DisabledInFlags,
948    /// `ErrorFetchingSignin`
949    ErrorFetchingSignin,
950    /// `InvalidSigninResponse`
951    InvalidSigninResponse,
952    /// `AccountsHttpNotFound`
953    AccountsHttpNotFound,
954    /// `AccountsNoResponse`
955    AccountsNoResponse,
956    /// `AccountsBlockedByConnectionAllowlist`
957    AccountsBlockedByConnectionAllowlist,
958    /// `AccountsInvalidResponse`
959    AccountsInvalidResponse,
960    /// `AccountsListEmpty`
961    AccountsListEmpty,
962    /// `AccountsInvalidContentType`
963    AccountsInvalidContentType,
964    /// `IdTokenHttpNotFound`
965    IdTokenHttpNotFound,
966    /// `IdTokenNoResponse`
967    IdTokenNoResponse,
968    /// `IdTokenBlockedByConnectionAllowlist`
969    IdTokenBlockedByConnectionAllowlist,
970    /// `IdTokenInvalidResponse`
971    IdTokenInvalidResponse,
972    /// `IdTokenIdpErrorResponse`
973    IdTokenIdpErrorResponse,
974    /// `IdTokenCrossSiteIdpErrorResponse`
975    IdTokenCrossSiteIdpErrorResponse,
976    /// `IdTokenInvalidRequest`
977    IdTokenInvalidRequest,
978    /// `IdTokenInvalidContentType`
979    IdTokenInvalidContentType,
980    /// `ErrorIdToken`
981    ErrorIdToken,
982    /// `Canceled`
983    Canceled,
984    /// `RpPageNotVisible`
985    RpPageNotVisible,
986    /// `SilentMediationFailure`
987    SilentMediationFailure,
988    /// `NotSignedInWithIdp`
989    NotSignedInWithIdp,
990    /// `MissingTransientUserActivation`
991    MissingTransientUserActivation,
992    /// `ReplacedByActiveMode`
993    ReplacedByActiveMode,
994    /// `RelyingPartyOriginIsOpaque`
995    RelyingPartyOriginIsOpaque,
996    /// `TypeNotMatching`
997    TypeNotMatching,
998    /// `UiDismissedNoEmbargo`
999    UiDismissedNoEmbargo,
1000    /// `CorsError`
1001    CorsError,
1002    /// `SuppressedBySegmentationPlatform`
1003    SuppressedBySegmentationPlatform,
1004    /// `PopupBlockedByConnectionAllowlist`
1005    PopupBlockedByConnectionAllowlist,
1006    /// A value this vendored schema does not list. Chrome adds values ahead of
1007    /// the published protocol, so an unrecognised one is kept as it arrived
1008    /// rather than failing the payload it came in.
1009    #[serde(untagged)]
1010    Unrecognized(String),
1011}
1012
1013#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1014pub struct FederatedAuthUserInfoRequestIssueDetails {
1015    #[serde(rename = "federatedAuthUserInfoRequestIssueReason")]
1016    pub federated_auth_user_info_request_issue_reason: FederatedAuthUserInfoRequestIssueReason,
1017}
1018
1019/// Represents the failure reason when a getUserInfo() call fails. Should be
1020/// updated alongside FederatedAuthUserInfoRequestResult in
1021/// third_party/blink/public/mojom/devtools/inspector_issue.mojom.
1022#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1023pub enum FederatedAuthUserInfoRequestIssueReason {
1024    /// `NotSameOrigin`
1025    NotSameOrigin,
1026    /// `NotIframe`
1027    NotIframe,
1028    /// `NotPotentiallyTrustworthy`
1029    NotPotentiallyTrustworthy,
1030    /// `NoApiPermission`
1031    NoApiPermission,
1032    /// `NotSignedInWithIdp`
1033    NotSignedInWithIdp,
1034    /// `NoAccountSharingPermission`
1035    NoAccountSharingPermission,
1036    /// `InvalidConfigOrWellKnown`
1037    InvalidConfigOrWellKnown,
1038    /// `InvalidAccountsResponse`
1039    InvalidAccountsResponse,
1040    /// `NoReturningUserFromFetchedAccounts`
1041    NoReturningUserFromFetchedAccounts,
1042    /// A value this vendored schema does not list. Chrome adds values ahead of
1043    /// the published protocol, so an unrecognised one is kept as it arrived
1044    /// rather than failing the payload it came in.
1045    #[serde(untagged)]
1046    Unrecognized(String),
1047}
1048
1049#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1050pub struct EmailVerificationRequestIssueDetails {
1051    #[serde(rename = "emailVerificationRequestIssueReason")]
1052    pub email_verification_request_issue_reason: EmailVerificationRequestIssueReason,
1053}
1054
1055/// Represents the failure reason when an email verification request fails.
1056/// Should be updated alongside EmailVerificationRequestResult in
1057/// third_party/blink/public/mojom/devtools/inspector_issue.mojom.
1058#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1059pub enum EmailVerificationRequestIssueReason {
1060    /// `InvalidEmail`
1061    InvalidEmail,
1062    /// `DnsFetchFailed`
1063    DnsFetchFailed,
1064    /// `DnsInvalidRecord`
1065    DnsInvalidRecord,
1066    /// `WellKnownHttpNotFound`
1067    WellKnownHttpNotFound,
1068    /// `WellKnownNoResponse`
1069    WellKnownNoResponse,
1070    /// `WellKnownInvalidResponse`
1071    WellKnownInvalidResponse,
1072    /// `WellKnownListEmpty`
1073    WellKnownListEmpty,
1074    /// `WellKnownInvalidContentType`
1075    WellKnownInvalidContentType,
1076    /// `WellKnownMissingIssuanceEndpoint`
1077    WellKnownMissingIssuanceEndpoint,
1078    /// `WellKnownIssuanceEndpointCrossOrigin`
1079    WellKnownIssuanceEndpointCrossOrigin,
1080    /// `WellKnownUnsupportedSigningAlgorithm`
1081    WellKnownUnsupportedSigningAlgorithm,
1082    /// `TokenHttpNotFound`
1083    TokenHttpNotFound,
1084    /// `TokenNoResponse`
1085    TokenNoResponse,
1086    /// `TokenInvalidResponse`
1087    TokenInvalidResponse,
1088    /// `TokenInvalidContentType`
1089    TokenInvalidContentType,
1090    /// `TokenMalformedSdJwt`
1091    TokenMalformedSdJwt,
1092    /// `TokenInvalidSdJwt`
1093    TokenInvalidSdJwt,
1094    /// `KeyBindingSigningFailed`
1095    KeyBindingSigningFailed,
1096    /// `RpOriginIsOpaque`
1097    RpOriginIsOpaque,
1098    /// `WellKnownMissingAccountsEndpoint`
1099    WellKnownMissingAccountsEndpoint,
1100    /// `UserLoggedOut`
1101    UserLoggedOut,
1102    /// `WellKnownAccountsEndpointCrossOrigin`
1103    WellKnownAccountsEndpointCrossOrigin,
1104    /// `AccountsHttpNotFound`
1105    AccountsHttpNotFound,
1106    /// `AccountsNoResponse`
1107    AccountsNoResponse,
1108    /// `AccountsInvalidResponse`
1109    AccountsInvalidResponse,
1110    /// `AccountsInvalidContentType`
1111    AccountsInvalidContentType,
1112    /// `AccountsEmptyList`
1113    AccountsEmptyList,
1114    /// `EmailVerificationWellKnownHttpNotFound`
1115    EmailVerificationWellKnownHttpNotFound,
1116    /// `EmailVerificationWellKnownNoResponse`
1117    EmailVerificationWellKnownNoResponse,
1118    /// `EmailVerificationWellKnownInvalidResponse`
1119    EmailVerificationWellKnownInvalidResponse,
1120    /// `EmailVerificationWellKnownInvalidContentType`
1121    EmailVerificationWellKnownInvalidContentType,
1122    /// `JwksHttpNotFound`
1123    JwksHttpNotFound,
1124    /// `JwksInvalidResponse`
1125    JwksInvalidResponse,
1126    /// `TokenVerificationSdJwtUnsupportedHeaderAlg`
1127    TokenVerificationSdJwtUnsupportedHeaderAlg,
1128    /// `TokenVerificationSdJwtInvalidTyp`
1129    TokenVerificationSdJwtInvalidTyp,
1130    /// `TokenVerificationSdJwtMissingIss`
1131    TokenVerificationSdJwtMissingIss,
1132    /// `TokenVerificationSdJwtMissingIat`
1133    TokenVerificationSdJwtMissingIat,
1134    /// `TokenVerificationSdJwtMissingCnf`
1135    TokenVerificationSdJwtMissingCnf,
1136    /// `TokenVerificationSdJwtMissingEmail`
1137    TokenVerificationSdJwtMissingEmail,
1138    /// `TokenVerificationSdJwtInvalidIssuedAt`
1139    TokenVerificationSdJwtInvalidIssuedAt,
1140    /// `TokenVerificationSdJwtInvalidIssuer`
1141    TokenVerificationSdJwtInvalidIssuer,
1142    /// `TokenVerificationSdJwtJwksMissingKeys`
1143    TokenVerificationSdJwtJwksMissingKeys,
1144    /// `TokenVerificationSdJwtSignatureFailed`
1145    TokenVerificationSdJwtSignatureFailed,
1146    /// `TokenVerificationSdJwtInvalidEmailVerified`
1147    TokenVerificationSdJwtInvalidEmailVerified,
1148    /// `TokenVerificationSdJwtInvalidEmail`
1149    TokenVerificationSdJwtInvalidEmail,
1150    /// `TokenVerificationSdJwtInvalidHolderKey`
1151    TokenVerificationSdJwtInvalidHolderKey,
1152    /// `TokenVerificationKbInvalidTyp`
1153    TokenVerificationKbInvalidTyp,
1154    /// `TokenVerificationKbMissingAud`
1155    TokenVerificationKbMissingAud,
1156    /// `TokenVerificationKbMissingNonce`
1157    TokenVerificationKbMissingNonce,
1158    /// `TokenVerificationKbMissingIat`
1159    TokenVerificationKbMissingIat,
1160    /// `TokenVerificationKbMissingSdHash`
1161    TokenVerificationKbMissingSdHash,
1162    /// `TokenVerificationKbInvalidIssuedAt`
1163    TokenVerificationKbInvalidIssuedAt,
1164    /// `TokenVerificationKbInvalidAudience`
1165    TokenVerificationKbInvalidAudience,
1166    /// `TokenVerificationKbInvalidNonce`
1167    TokenVerificationKbInvalidNonce,
1168    /// `TokenVerificationKbInvalidSdHash`
1169    TokenVerificationKbInvalidSdHash,
1170    /// `TokenVerificationKbMissingCnf`
1171    TokenVerificationKbMissingCnf,
1172    /// `TokenVerificationKbSignatureFailed`
1173    TokenVerificationKbSignatureFailed,
1174    /// `CrossOriginIframeNotSupported`
1175    CrossOriginIframeNotSupported,
1176    /// A value this vendored schema does not list. Chrome adds values ahead of
1177    /// the published protocol, so an unrecognised one is kept as it arrived
1178    /// rather than failing the payload it came in.
1179    #[serde(untagged)]
1180    Unrecognized(String),
1181}
1182
1183/// This issue tracks client hints related issues. It's used to deprecate old
1184/// features, encourage the use of new ones, and provide general guidance.
1185#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1186pub struct ClientHintIssueDetails {
1187    #[serde(rename = "sourceCodeLocation")]
1188    pub source_code_location: SourceCodeLocation,
1189    #[serde(rename = "clientHintIssueReason")]
1190    pub client_hint_issue_reason: ClientHintIssueReason,
1191}
1192
1193#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1194pub struct FailedRequestInfo {
1195    /// The URL that failed to load.
1196    pub url: String,
1197    /// The failure message for the failed request.
1198    #[serde(rename = "failureMessage")]
1199    pub failure_message: String,
1200    #[serde(rename = "requestId", default, skip_serializing_if = "Option::is_none")]
1201    pub request_id: Option<crate::protocol::network::RequestId>,
1202}
1203
1204#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1205pub enum PartitioningBlobUrlInfo {
1206    /// `BlockedCrossPartitionFetching`
1207    BlockedCrossPartitionFetching,
1208    /// `EnforceNoopenerForNavigation`
1209    EnforceNoopenerForNavigation,
1210    /// A value this vendored schema does not list. Chrome adds values ahead of
1211    /// the published protocol, so an unrecognised one is kept as it arrived
1212    /// rather than failing the payload it came in.
1213    #[serde(untagged)]
1214    Unrecognized(String),
1215}
1216
1217#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1218pub struct PartitioningBlobUrlIssueDetails {
1219    /// The BlobURL that failed to load.
1220    pub url: String,
1221    /// Additional information about the Partitioning Blob URL issue.
1222    #[serde(rename = "partitioningBlobURLInfo")]
1223    pub partitioning_blob_url_info: PartitioningBlobUrlInfo,
1224}
1225
1226#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1227pub enum ElementAccessibilityIssueReason {
1228    /// `DisallowedSelectChild`
1229    DisallowedSelectChild,
1230    /// `DisallowedOptGroupChild`
1231    DisallowedOptGroupChild,
1232    /// `NonPhrasingContentOptionChild`
1233    NonPhrasingContentOptionChild,
1234    /// `InteractiveContentOptionChild`
1235    InteractiveContentOptionChild,
1236    /// `InteractiveContentLegendChild`
1237    InteractiveContentLegendChild,
1238    /// `InteractiveContentSummaryDescendant`
1239    InteractiveContentSummaryDescendant,
1240    /// A value this vendored schema does not list. Chrome adds values ahead of
1241    /// the published protocol, so an unrecognised one is kept as it arrived
1242    /// rather than failing the payload it came in.
1243    #[serde(untagged)]
1244    Unrecognized(String),
1245}
1246
1247/// This issue warns about errors in the select or summary element content
1248/// model.
1249#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1250pub struct ElementAccessibilityIssueDetails {
1251    #[serde(rename = "nodeId")]
1252    pub node_id: crate::protocol::dom::BackendNodeId,
1253    #[serde(rename = "elementAccessibilityIssueReason")]
1254    pub element_accessibility_issue_reason: ElementAccessibilityIssueReason,
1255    #[serde(rename = "hasDisallowedAttributes")]
1256    pub has_disallowed_attributes: bool,
1257}
1258
1259#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1260pub enum StyleSheetLoadingIssueReason {
1261    /// `LateImportRule`
1262    LateImportRule,
1263    /// `RequestFailed`
1264    RequestFailed,
1265    /// A value this vendored schema does not list. Chrome adds values ahead of
1266    /// the published protocol, so an unrecognised one is kept as it arrived
1267    /// rather than failing the payload it came in.
1268    #[serde(untagged)]
1269    Unrecognized(String),
1270}
1271
1272/// This issue warns when a referenced stylesheet couldn't be loaded.
1273#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1274pub struct StylesheetLoadingIssueDetails {
1275    /// Source code position that referenced the failing stylesheet.
1276    #[serde(rename = "sourceCodeLocation")]
1277    pub source_code_location: SourceCodeLocation,
1278    /// Reason why the stylesheet couldn't be loaded.
1279    #[serde(rename = "styleSheetLoadingIssueReason")]
1280    pub style_sheet_loading_issue_reason: StyleSheetLoadingIssueReason,
1281    /// Contains additional info when the failure was due to a request.
1282    #[serde(
1283        rename = "failedRequestInfo",
1284        default,
1285        skip_serializing_if = "Option::is_none"
1286    )]
1287    pub failed_request_info: Option<FailedRequestInfo>,
1288}
1289
1290#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1291pub enum PropertyRuleIssueReason {
1292    /// `InvalidSyntax`
1293    InvalidSyntax,
1294    /// `InvalidInitialValue`
1295    InvalidInitialValue,
1296    /// `InvalidInherits`
1297    InvalidInherits,
1298    /// `InvalidName`
1299    InvalidName,
1300    /// A value this vendored schema does not list. Chrome adds values ahead of
1301    /// the published protocol, so an unrecognised one is kept as it arrived
1302    /// rather than failing the payload it came in.
1303    #[serde(untagged)]
1304    Unrecognized(String),
1305}
1306
1307/// This issue warns about errors in property rules that lead to property
1308/// registrations being ignored.
1309#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1310pub struct PropertyRuleIssueDetails {
1311    /// Source code position of the property rule.
1312    #[serde(rename = "sourceCodeLocation")]
1313    pub source_code_location: SourceCodeLocation,
1314    /// Reason why the property rule was discarded.
1315    #[serde(rename = "propertyRuleIssueReason")]
1316    pub property_rule_issue_reason: PropertyRuleIssueReason,
1317    /// The value of the property rule property that failed to parse
1318    #[serde(
1319        rename = "propertyValue",
1320        default,
1321        skip_serializing_if = "Option::is_none"
1322    )]
1323    pub property_value: Option<String>,
1324}
1325
1326#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1327pub enum UserReidentificationIssueType {
1328    /// `BlockedFrameNavigation`
1329    BlockedFrameNavigation,
1330    /// `BlockedSubresource`
1331    BlockedSubresource,
1332    /// `NoisedCanvasReadback`
1333    NoisedCanvasReadback,
1334    /// A value this vendored schema does not list. Chrome adds values ahead of
1335    /// the published protocol, so an unrecognised one is kept as it arrived
1336    /// rather than failing the payload it came in.
1337    #[serde(untagged)]
1338    Unrecognized(String),
1339}
1340
1341/// This issue warns about uses of APIs that may be considered misuse to
1342/// re-identify users.
1343#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1344pub struct UserReidentificationIssueDetails {
1345    pub r#type: UserReidentificationIssueType,
1346    /// Applies to BlockedFrameNavigation and BlockedSubresource issue types.
1347    #[serde(default, skip_serializing_if = "Option::is_none")]
1348    pub request: Option<AffectedRequest>,
1349    /// Applies to NoisedCanvasReadback issue type.
1350    #[serde(
1351        rename = "sourceCodeLocation",
1352        default,
1353        skip_serializing_if = "Option::is_none"
1354    )]
1355    pub source_code_location: Option<SourceCodeLocation>,
1356}
1357
1358#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1359pub enum PermissionElementIssueType {
1360    /// `InvalidType`
1361    InvalidType,
1362    /// `FencedFrameDisallowed`
1363    FencedFrameDisallowed,
1364    /// `CspFrameAncestorsMissing`
1365    CspFrameAncestorsMissing,
1366    /// `PermissionsPolicyBlocked`
1367    PermissionsPolicyBlocked,
1368    /// `PaddingRightUnsupported`
1369    PaddingRightUnsupported,
1370    /// `PaddingBottomUnsupported`
1371    PaddingBottomUnsupported,
1372    /// `InsetBoxShadowUnsupported`
1373    InsetBoxShadowUnsupported,
1374    /// `RequestInProgress`
1375    RequestInProgress,
1376    /// `UntrustedEvent`
1377    UntrustedEvent,
1378    /// `RegistrationFailed`
1379    RegistrationFailed,
1380    /// `TypeNotSupported`
1381    TypeNotSupported,
1382    /// `InvalidTypeActivation`
1383    InvalidTypeActivation,
1384    /// `SecurityChecksFailed`
1385    SecurityChecksFailed,
1386    /// `ActivationDisabled`
1387    ActivationDisabled,
1388    /// `GeolocationDeprecated`
1389    GeolocationDeprecated,
1390    /// `InvalidDisplayStyle`
1391    InvalidDisplayStyle,
1392    /// `NonOpaqueColor`
1393    NonOpaqueColor,
1394    /// `LowContrast`
1395    LowContrast,
1396    /// `FontSizeTooSmall`
1397    FontSizeTooSmall,
1398    /// `FontSizeTooLarge`
1399    FontSizeTooLarge,
1400    /// `InvalidSizeValue`
1401    InvalidSizeValue,
1402    /// `NonSecureContext`
1403    NonSecureContext,
1404    /// `MissingTransientUserActivation`
1405    MissingTransientUserActivation,
1406    /// A value this vendored schema does not list. Chrome adds values ahead of
1407    /// the published protocol, so an unrecognised one is kept as it arrived
1408    /// rather than failing the payload it came in.
1409    #[serde(untagged)]
1410    Unrecognized(String),
1411}
1412
1413/// This issue warns about improper usage of the \<permission\> element.
1414#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1415pub struct PermissionElementIssueDetails {
1416    #[serde(rename = "issueType")]
1417    pub issue_type: PermissionElementIssueType,
1418    /// The value of the type attribute.
1419    #[serde(default, skip_serializing_if = "Option::is_none")]
1420    pub r#type: Option<String>,
1421    /// The node ID of the \<permission\> element.
1422    #[serde(rename = "nodeId", default, skip_serializing_if = "Option::is_none")]
1423    pub node_id: Option<crate::protocol::dom::BackendNodeId>,
1424    /// True if the issue is a warning, false if it is an error.
1425    #[serde(rename = "isWarning", default, skip_serializing_if = "Option::is_none")]
1426    pub is_warning: Option<bool>,
1427    /// Fields for message construction: Used for messages that reference a
1428    /// specific permission name
1429    #[serde(
1430        rename = "permissionName",
1431        default,
1432        skip_serializing_if = "Option::is_none"
1433    )]
1434    pub permission_name: Option<String>,
1435    /// Used for messages about occlusion
1436    #[serde(
1437        rename = "occluderNodeInfo",
1438        default,
1439        skip_serializing_if = "Option::is_none"
1440    )]
1441    pub occluder_node_info: Option<String>,
1442    /// Used for messages about occluder's parent
1443    #[serde(
1444        rename = "occluderParentNodeInfo",
1445        default,
1446        skip_serializing_if = "Option::is_none"
1447    )]
1448    pub occluder_parent_node_info: Option<String>,
1449    /// Used for messages about activation disabled reason
1450    #[serde(
1451        rename = "disableReason",
1452        default,
1453        skip_serializing_if = "Option::is_none"
1454    )]
1455    pub disable_reason: Option<String>,
1456}
1457
1458#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1459pub enum WebInstallIssueReason {
1460    /// `ManifestParsingOrNetworkError`
1461    ManifestParsingOrNetworkError,
1462    /// `StartUrlInvalid`
1463    StartUrlInvalid,
1464    /// `ManifestMissingNameOrShortName`
1465    ManifestMissingNameOrShortName,
1466    /// `ManifestMissingId`
1467    ManifestMissingId,
1468    /// `NoManifest`
1469    NoManifest,
1470    /// A value this vendored schema does not list. Chrome adds values ahead of
1471    /// the published protocol, so an unrecognised one is kept as it arrived
1472    /// rather than failing the payload it came in.
1473    #[serde(untagged)]
1474    Unrecognized(String),
1475}
1476
1477/// This issue reports a failure involving a web app manifest used by a Web
1478/// Install operation.
1479#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1480pub struct WebInstallIssueDetails {
1481    #[serde(
1482        rename = "manifestUrl",
1483        default,
1484        skip_serializing_if = "Option::is_none"
1485    )]
1486    pub manifest_url: Option<String>,
1487    pub reason: WebInstallIssueReason,
1488}
1489
1490/// The issue warns about blocked calls to privacy sensitive APIs via the
1491/// Selective Permissions Intervention.
1492#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1493pub struct SelectivePermissionsInterventionIssueDetails {
1494    /// Which API was intervened on.
1495    #[serde(rename = "apiName")]
1496    pub api_name: String,
1497    /// Why the ad script using the API is considered an ad.
1498    #[serde(rename = "adAncestry")]
1499    pub ad_ancestry: crate::protocol::network::AdAncestry,
1500    /// The stack trace at the time of the intervention.
1501    #[serde(
1502        rename = "stackTrace",
1503        default,
1504        skip_serializing_if = "Option::is_none"
1505    )]
1506    pub stack_trace: Option<crate::protocol::runtime::StackTrace>,
1507}
1508
1509/// Details for issues about lazy-loaded images without explicit dimensions.
1510#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1511pub struct LazyLoadImageIssueDetails {
1512    /// DOM node of the problematic HTMLImageElement.
1513    #[serde(rename = "nodeId")]
1514    pub node_id: crate::protocol::dom::BackendNodeId,
1515    /// URL or src attribute of the image.
1516    pub url: String,
1517    /// Frame containing the image.
1518    #[serde(rename = "frameId")]
1519    pub frame_id: crate::protocol::page::FrameId,
1520}
1521
1522/// A unique identifier for the type of issue. Each type may use one of the
1523/// optional fields in InspectorIssueDetails to convey more specific
1524/// information about the kind of issue.
1525#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1526pub enum InspectorIssueCode {
1527    /// `CookieIssue`
1528    CookieIssue,
1529    /// `MixedContentIssue`
1530    MixedContentIssue,
1531    /// `BlockedByResponseIssue`
1532    BlockedByResponseIssue,
1533    /// `HeavyAdIssue`
1534    HeavyAdIssue,
1535    /// `ContentSecurityPolicyIssue`
1536    ContentSecurityPolicyIssue,
1537    /// `SharedArrayBufferIssue`
1538    SharedArrayBufferIssue,
1539    /// `CorsIssue`
1540    CorsIssue,
1541    /// `QuirksModeIssue`
1542    QuirksModeIssue,
1543    /// `PartitioningBlobURLIssue`
1544    #[serde(rename = "PartitioningBlobURLIssue")]
1545    PartitioningBlobUrlIssue,
1546    /// `NavigatorUserAgentIssue`
1547    NavigatorUserAgentIssue,
1548    /// `GenericIssue`
1549    GenericIssue,
1550    /// `DeprecationIssue`
1551    DeprecationIssue,
1552    /// `ClientHintIssue`
1553    ClientHintIssue,
1554    /// `FederatedAuthRequestIssue`
1555    FederatedAuthRequestIssue,
1556    /// `BounceTrackingIssue`
1557    BounceTrackingIssue,
1558    /// `CookieDeprecationMetadataIssue`
1559    CookieDeprecationMetadataIssue,
1560    /// `StylesheetLoadingIssue`
1561    StylesheetLoadingIssue,
1562    /// `FederatedAuthUserInfoRequestIssue`
1563    FederatedAuthUserInfoRequestIssue,
1564    /// `PropertyRuleIssue`
1565    PropertyRuleIssue,
1566    /// `SharedDictionaryIssue`
1567    SharedDictionaryIssue,
1568    /// `ElementAccessibilityIssue`
1569    ElementAccessibilityIssue,
1570    /// `SRIMessageSignatureIssue`
1571    #[serde(rename = "SRIMessageSignatureIssue")]
1572    SriMessageSignatureIssue,
1573    /// `UnencodedDigestIssue`
1574    UnencodedDigestIssue,
1575    /// `ConnectionAllowlistIssue`
1576    ConnectionAllowlistIssue,
1577    /// `UserReidentificationIssue`
1578    UserReidentificationIssue,
1579    /// `PermissionElementIssue`
1580    PermissionElementIssue,
1581    /// `PerformanceIssue`
1582    PerformanceIssue,
1583    /// `SelectivePermissionsInterventionIssue`
1584    SelectivePermissionsInterventionIssue,
1585    /// `EmailVerificationRequestIssue`
1586    EmailVerificationRequestIssue,
1587    /// `LazyLoadImageIssue`
1588    LazyLoadImageIssue,
1589    /// `WebInstallIssue`
1590    WebInstallIssue,
1591    /// A value this vendored schema does not list. Chrome adds values ahead of
1592    /// the published protocol, so an unrecognised one is kept as it arrived
1593    /// rather than failing the payload it came in.
1594    #[serde(untagged)]
1595    Unrecognized(String),
1596}
1597
1598/// This struct holds a list of optional fields with additional information
1599/// specific to the kind of issue. When adding a new issue code, please also
1600/// add a new optional field to this type.
1601#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1602pub struct InspectorIssueDetails {
1603    #[serde(
1604        rename = "cookieIssueDetails",
1605        default,
1606        skip_serializing_if = "Option::is_none"
1607    )]
1608    pub cookie_issue_details: Option<CookieIssueDetails>,
1609    #[serde(
1610        rename = "mixedContentIssueDetails",
1611        default,
1612        skip_serializing_if = "Option::is_none"
1613    )]
1614    pub mixed_content_issue_details: Option<MixedContentIssueDetails>,
1615    #[serde(
1616        rename = "blockedByResponseIssueDetails",
1617        default,
1618        skip_serializing_if = "Option::is_none"
1619    )]
1620    pub blocked_by_response_issue_details: Option<BlockedByResponseIssueDetails>,
1621    #[serde(
1622        rename = "heavyAdIssueDetails",
1623        default,
1624        skip_serializing_if = "Option::is_none"
1625    )]
1626    pub heavy_ad_issue_details: Option<HeavyAdIssueDetails>,
1627    #[serde(
1628        rename = "contentSecurityPolicyIssueDetails",
1629        default,
1630        skip_serializing_if = "Option::is_none"
1631    )]
1632    pub content_security_policy_issue_details: Option<ContentSecurityPolicyIssueDetails>,
1633    #[serde(
1634        rename = "sharedArrayBufferIssueDetails",
1635        default,
1636        skip_serializing_if = "Option::is_none"
1637    )]
1638    pub shared_array_buffer_issue_details: Option<SharedArrayBufferIssueDetails>,
1639    #[serde(
1640        rename = "corsIssueDetails",
1641        default,
1642        skip_serializing_if = "Option::is_none"
1643    )]
1644    pub cors_issue_details: Option<CorsIssueDetails>,
1645    #[serde(
1646        rename = "quirksModeIssueDetails",
1647        default,
1648        skip_serializing_if = "Option::is_none"
1649    )]
1650    pub quirks_mode_issue_details: Option<QuirksModeIssueDetails>,
1651    #[serde(
1652        rename = "partitioningBlobURLIssueDetails",
1653        default,
1654        skip_serializing_if = "Option::is_none"
1655    )]
1656    pub partitioning_blob_url_issue_details: Option<PartitioningBlobUrlIssueDetails>,
1657    /// Deprecated in the protocol.
1658    #[serde(
1659        rename = "navigatorUserAgentIssueDetails",
1660        default,
1661        skip_serializing_if = "Option::is_none"
1662    )]
1663    pub navigator_user_agent_issue_details: Option<NavigatorUserAgentIssueDetails>,
1664    #[serde(
1665        rename = "genericIssueDetails",
1666        default,
1667        skip_serializing_if = "Option::is_none"
1668    )]
1669    pub generic_issue_details: Option<GenericIssueDetails>,
1670    #[serde(
1671        rename = "deprecationIssueDetails",
1672        default,
1673        skip_serializing_if = "Option::is_none"
1674    )]
1675    pub deprecation_issue_details: Option<DeprecationIssueDetails>,
1676    #[serde(
1677        rename = "clientHintIssueDetails",
1678        default,
1679        skip_serializing_if = "Option::is_none"
1680    )]
1681    pub client_hint_issue_details: Option<ClientHintIssueDetails>,
1682    #[serde(
1683        rename = "federatedAuthRequestIssueDetails",
1684        default,
1685        skip_serializing_if = "Option::is_none"
1686    )]
1687    pub federated_auth_request_issue_details: Option<FederatedAuthRequestIssueDetails>,
1688    #[serde(
1689        rename = "bounceTrackingIssueDetails",
1690        default,
1691        skip_serializing_if = "Option::is_none"
1692    )]
1693    pub bounce_tracking_issue_details: Option<BounceTrackingIssueDetails>,
1694    #[serde(
1695        rename = "cookieDeprecationMetadataIssueDetails",
1696        default,
1697        skip_serializing_if = "Option::is_none"
1698    )]
1699    pub cookie_deprecation_metadata_issue_details: Option<CookieDeprecationMetadataIssueDetails>,
1700    #[serde(
1701        rename = "stylesheetLoadingIssueDetails",
1702        default,
1703        skip_serializing_if = "Option::is_none"
1704    )]
1705    pub stylesheet_loading_issue_details: Option<StylesheetLoadingIssueDetails>,
1706    #[serde(
1707        rename = "propertyRuleIssueDetails",
1708        default,
1709        skip_serializing_if = "Option::is_none"
1710    )]
1711    pub property_rule_issue_details: Option<PropertyRuleIssueDetails>,
1712    #[serde(
1713        rename = "federatedAuthUserInfoRequestIssueDetails",
1714        default,
1715        skip_serializing_if = "Option::is_none"
1716    )]
1717    pub federated_auth_user_info_request_issue_details:
1718        Option<FederatedAuthUserInfoRequestIssueDetails>,
1719    #[serde(
1720        rename = "sharedDictionaryIssueDetails",
1721        default,
1722        skip_serializing_if = "Option::is_none"
1723    )]
1724    pub shared_dictionary_issue_details: Option<SharedDictionaryIssueDetails>,
1725    #[serde(
1726        rename = "elementAccessibilityIssueDetails",
1727        default,
1728        skip_serializing_if = "Option::is_none"
1729    )]
1730    pub element_accessibility_issue_details: Option<ElementAccessibilityIssueDetails>,
1731    #[serde(
1732        rename = "sriMessageSignatureIssueDetails",
1733        default,
1734        skip_serializing_if = "Option::is_none"
1735    )]
1736    pub sri_message_signature_issue_details: Option<SriMessageSignatureIssueDetails>,
1737    #[serde(
1738        rename = "unencodedDigestIssueDetails",
1739        default,
1740        skip_serializing_if = "Option::is_none"
1741    )]
1742    pub unencoded_digest_issue_details: Option<UnencodedDigestIssueDetails>,
1743    #[serde(
1744        rename = "connectionAllowlistIssueDetails",
1745        default,
1746        skip_serializing_if = "Option::is_none"
1747    )]
1748    pub connection_allowlist_issue_details: Option<ConnectionAllowlistIssueDetails>,
1749    #[serde(
1750        rename = "userReidentificationIssueDetails",
1751        default,
1752        skip_serializing_if = "Option::is_none"
1753    )]
1754    pub user_reidentification_issue_details: Option<UserReidentificationIssueDetails>,
1755    #[serde(
1756        rename = "permissionElementIssueDetails",
1757        default,
1758        skip_serializing_if = "Option::is_none"
1759    )]
1760    pub permission_element_issue_details: Option<PermissionElementIssueDetails>,
1761    #[serde(
1762        rename = "performanceIssueDetails",
1763        default,
1764        skip_serializing_if = "Option::is_none"
1765    )]
1766    pub performance_issue_details: Option<PerformanceIssueDetails>,
1767    #[serde(
1768        rename = "selectivePermissionsInterventionIssueDetails",
1769        default,
1770        skip_serializing_if = "Option::is_none"
1771    )]
1772    pub selective_permissions_intervention_issue_details:
1773        Option<SelectivePermissionsInterventionIssueDetails>,
1774    #[serde(
1775        rename = "emailVerificationRequestIssueDetails",
1776        default,
1777        skip_serializing_if = "Option::is_none"
1778    )]
1779    pub email_verification_request_issue_details: Option<EmailVerificationRequestIssueDetails>,
1780    #[serde(
1781        rename = "lazyLoadImageIssueDetails",
1782        default,
1783        skip_serializing_if = "Option::is_none"
1784    )]
1785    pub lazy_load_image_issue_details: Option<LazyLoadImageIssueDetails>,
1786    #[serde(
1787        rename = "webInstallIssueDetails",
1788        default,
1789        skip_serializing_if = "Option::is_none"
1790    )]
1791    pub web_install_issue_details: Option<WebInstallIssueDetails>,
1792}
1793
1794/// A unique id for a DevTools inspector issue. Allows other entities (e.g.
1795/// exceptions, CDP message, console messages, etc.) to reference an issue.
1796pub type IssueId = String;
1797
1798/// An inspector issue reported from the back-end.
1799#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1800pub struct InspectorIssue {
1801    pub code: InspectorIssueCode,
1802    pub details: InspectorIssueDetails,
1803    /// A unique id for this issue. May be omitted if no other entity (e.g.
1804    /// exception, CDP message, etc.) is referencing this issue.
1805    #[serde(rename = "issueId", default, skip_serializing_if = "Option::is_none")]
1806    pub issue_id: Option<IssueId>,
1807}
1808
1809/// Returns the response body and size if it were re-encoded with the
1810/// specified settings. Only applies to images.
1811///
1812/// Parameters of `Audits.getEncodedResponse`.
1813#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1814pub struct GetEncodedResponseParams {
1815    /// Identifier of the network request to get content for.
1816    #[serde(rename = "requestId")]
1817    pub request_id: crate::protocol::network::RequestId,
1818    /// The encoding to use.
1819    pub encoding: GetEncodedResponseEncoding,
1820    /// The quality of the encoding (0-1). (defaults to 1)
1821    #[serde(default, skip_serializing_if = "Option::is_none")]
1822    pub quality: Option<f64>,
1823    /// Whether to only return the size information (defaults to false).
1824    #[serde(rename = "sizeOnly", default, skip_serializing_if = "Option::is_none")]
1825    pub size_only: Option<bool>,
1826}
1827
1828/// The values `encoding` accepts on `getEncodedResponse`.
1829#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1830pub enum GetEncodedResponseEncoding {
1831    /// `webp`
1832    #[serde(rename = "webp")]
1833    Webp,
1834    /// `jpeg`
1835    #[serde(rename = "jpeg")]
1836    Jpeg,
1837    /// `png`
1838    #[serde(rename = "png")]
1839    Png,
1840    /// A value this vendored schema does not list. Chrome adds values ahead of
1841    /// the published protocol, so an unrecognised one is kept as it arrived
1842    /// rather than failing the payload it came in.
1843    #[serde(untagged)]
1844    Unrecognized(String),
1845}
1846
1847/// What `Audits.getEncodedResponse` answers with.
1848#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1849pub struct GetEncodedResponseReturns {
1850    /// The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded
1851    /// as a base64 string when passed over JSON)
1852    #[serde(default, skip_serializing_if = "Option::is_none")]
1853    pub body: Option<String>,
1854    /// Size before re-encoding.
1855    #[serde(rename = "originalSize")]
1856    pub original_size: i64,
1857    /// Size after re-encoding.
1858    #[serde(rename = "encodedSize")]
1859    pub encoded_size: i64,
1860}
1861
1862impl crate::typed::Command for GetEncodedResponseParams {
1863    const METHOD: &'static str = "Audits.getEncodedResponse";
1864    type Returns = GetEncodedResponseReturns;
1865}
1866
1867/// Disables issues domain, prevents further issues from being reported to the
1868/// client.
1869///
1870/// Parameters of `Audits.disable`.
1871#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1872pub struct DisableParams {}
1873
1874impl crate::typed::Command for DisableParams {
1875    const METHOD: &'static str = "Audits.disable";
1876    type Returns = crate::typed::NoReturns;
1877}
1878
1879/// Enables issues domain, sends the issues collected so far to the client by
1880/// means of the `issueAdded` event.
1881///
1882/// Parameters of `Audits.enable`.
1883#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1884pub struct EnableParams {}
1885
1886impl crate::typed::Command for EnableParams {
1887    const METHOD: &'static str = "Audits.enable";
1888    type Returns = crate::typed::NoReturns;
1889}
1890
1891/// Runs the form issues check for the target page. Found issues are reported
1892/// using Audits.issueAdded event.
1893///
1894/// Parameters of `Audits.checkFormsIssues`.
1895#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1896pub struct CheckFormsIssuesParams {}
1897
1898/// What `Audits.checkFormsIssues` answers with.
1899#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1900pub struct CheckFormsIssuesReturns {
1901    #[serde(rename = "formIssues")]
1902    pub form_issues: Vec<GenericIssueDetails>,
1903}
1904
1905impl crate::typed::Command for CheckFormsIssuesParams {
1906    const METHOD: &'static str = "Audits.checkFormsIssues";
1907    type Returns = CheckFormsIssuesReturns;
1908}
1909
1910/// Payload of the `Audits.issueAdded` event.
1911#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1912pub struct IssueAddedEvent {
1913    pub issue: InspectorIssue,
1914}
1915
1916impl crate::typed::Event for IssueAddedEvent {
1917    const METHOD: &'static str = "Audits.issueAdded";
1918}