// Auto-generated from Chrome DevTools Protocol
// Generated at: 2026-06-26 06:49:13 UTC
// DO NOT EDIT MANUALLY  OvO

#![allow(dead_code, unused_imports, clippy::all)]

use crate::Method;
use serde::{Deserialize, Serialize};

/// CDP Protocol version (major.minor)
pub const CDP_VERSION: &str = "1.3";

pub mod accessibility {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique accessibility node identifier.
        pub type AXNodeId = String;

        /// Enum of possible property types.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AXValueType {
            #[serde(rename = "boolean")]
            Boolean,
            #[serde(rename = "tristate")]
            Tristate,
            #[serde(rename = "booleanOrUndefined")]
            BooleanOrUndefined,
            #[serde(rename = "idref")]
            Idref,
            #[serde(rename = "idrefList")]
            IdrefList,
            #[serde(rename = "integer")]
            Integer,
            #[serde(rename = "node")]
            Node,
            #[serde(rename = "nodeList")]
            NodeList,
            #[serde(rename = "number")]
            Number,
            #[serde(rename = "string")]
            String,
            #[serde(rename = "computedString")]
            ComputedString,
            #[serde(rename = "token")]
            Token,
            #[serde(rename = "tokenList")]
            TokenList,
            #[serde(rename = "domRelation")]
            DomRelation,
            #[serde(rename = "role")]
            Role,
            #[serde(rename = "internalRole")]
            InternalRole,
            #[serde(rename = "valueUndefined")]
            ValueUndefined,
        }
        impl AsRef<str> for AXValueType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Boolean => "boolean",
                    Self::Tristate => "tristate",
                    Self::BooleanOrUndefined => "booleanOrUndefined",
                    Self::Idref => "idref",
                    Self::IdrefList => "idrefList",
                    Self::Integer => "integer",
                    Self::Node => "node",
                    Self::NodeList => "nodeList",
                    Self::Number => "number",
                    Self::String => "string",
                    Self::ComputedString => "computedString",
                    Self::Token => "token",
                    Self::TokenList => "tokenList",
                    Self::DomRelation => "domRelation",
                    Self::Role => "role",
                    Self::InternalRole => "internalRole",
                    Self::ValueUndefined => "valueUndefined",
                }
            }
        }
        impl std::str::FromStr for AXValueType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "boolean" => Ok(Self::Boolean),
                    "tristate" => Ok(Self::Tristate),
                    "booleanOrUndefined" => Ok(Self::BooleanOrUndefined),
                    "idref" => Ok(Self::Idref),
                    "idrefList" => Ok(Self::IdrefList),
                    "integer" => Ok(Self::Integer),
                    "node" => Ok(Self::Node),
                    "nodeList" => Ok(Self::NodeList),
                    "number" => Ok(Self::Number),
                    "string" => Ok(Self::String),
                    "computedString" => Ok(Self::ComputedString),
                    "token" => Ok(Self::Token),
                    "tokenList" => Ok(Self::TokenList),
                    "domRelation" => Ok(Self::DomRelation),
                    "role" => Ok(Self::Role),
                    "internalRole" => Ok(Self::InternalRole),
                    "valueUndefined" => Ok(Self::ValueUndefined),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AXValueType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of possible property sources.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AXValueSourceType {
            #[serde(rename = "attribute")]
            Attribute,
            #[serde(rename = "implicit")]
            Implicit,
            #[serde(rename = "style")]
            Style,
            #[serde(rename = "contents")]
            Contents,
            #[serde(rename = "placeholder")]
            Placeholder,
            #[serde(rename = "relatedElement")]
            RelatedElement,
        }
        impl AsRef<str> for AXValueSourceType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Attribute => "attribute",
                    Self::Implicit => "implicit",
                    Self::Style => "style",
                    Self::Contents => "contents",
                    Self::Placeholder => "placeholder",
                    Self::RelatedElement => "relatedElement",
                }
            }
        }
        impl std::str::FromStr for AXValueSourceType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "attribute" => Ok(Self::Attribute),
                    "implicit" => Ok(Self::Implicit),
                    "style" => Ok(Self::Style),
                    "contents" => Ok(Self::Contents),
                    "placeholder" => Ok(Self::Placeholder),
                    "relatedElement" => Ok(Self::RelatedElement),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AXValueSourceType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AXValueNativeSourceType {
            #[serde(rename = "description")]
            Description,
            #[serde(rename = "figcaption")]
            Figcaption,
            #[serde(rename = "label")]
            Label,
            #[serde(rename = "labelfor")]
            Labelfor,
            #[serde(rename = "labelwrapped")]
            Labelwrapped,
            #[serde(rename = "legend")]
            Legend,
            #[serde(rename = "rubyannotation")]
            Rubyannotation,
            #[serde(rename = "tablecaption")]
            Tablecaption,
            #[serde(rename = "title")]
            Title,
            #[serde(rename = "other")]
            Other,
        }
        impl AsRef<str> for AXValueNativeSourceType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Description => "description",
                    Self::Figcaption => "figcaption",
                    Self::Label => "label",
                    Self::Labelfor => "labelfor",
                    Self::Labelwrapped => "labelwrapped",
                    Self::Legend => "legend",
                    Self::Rubyannotation => "rubyannotation",
                    Self::Tablecaption => "tablecaption",
                    Self::Title => "title",
                    Self::Other => "other",
                }
            }
        }
        impl std::str::FromStr for AXValueNativeSourceType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "description" => Ok(Self::Description),
                    "figcaption" => Ok(Self::Figcaption),
                    "label" => Ok(Self::Label),
                    "labelfor" => Ok(Self::Labelfor),
                    "labelwrapped" => Ok(Self::Labelwrapped),
                    "legend" => Ok(Self::Legend),
                    "rubyannotation" => Ok(Self::Rubyannotation),
                    "tablecaption" => Ok(Self::Tablecaption),
                    "title" => Ok(Self::Title),
                    "other" => Ok(Self::Other),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AXValueNativeSourceType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// A single source for a computed AX property.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AXValueSource {
            /// What type of source this is.
            pub type_: AXValueSourceType,
            /// The value of this property source.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<AXValue>,
            /// The name of the relevant attribute, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub attribute: Option<String>,
            /// The value of the relevant attribute, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub attribute_value: Option<AXValue>,
            /// Whether this source is superseded by a higher priority source.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub superseded: Option<bool>,
            /// The native markup source for this value, e.g. a `<label>` element.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub native_source: Option<AXValueNativeSourceType>,
            /// The value, such as a node or node list, of the native source.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub native_source_value: Option<AXValue>,
            /// Whether the value for this property is invalid.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub invalid: Option<bool>,
            /// Reason for the value being invalid, if it is.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub invalid_reason: Option<String>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AXRelatedNode {
            /// The BackendNodeId of the related DOM node.
            #[serde(rename = "backendDOMNodeId")]
            pub backend_dom_node_id: dom::types::BackendNodeId,
            /// The IDRef value provided, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub idref: Option<String>,
            /// The text alternative of this node in the current context.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub text: Option<String>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AXProperty {
            /// The name of this property.
            pub name: AXPropertyName,
            /// The value of this property.
            pub value: AXValue,
        }

        /// A single computed AX property.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AXValue {
            /// The type of this value.
            pub type_: AXValueType,
            /// The computed value of this property.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<serde_json::Value>,
            /// One or more related nodes, if applicable.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub related_nodes: Option<Vec<AXRelatedNode>>,
            /// The sources which contributed to the computation of this property.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sources: Option<Vec<AXValueSource>>,
        }

        /// Values of AXProperty name: - from 'busy' to 'roledescription': states which apply to every AX node - from 'live' to 'root': attributes which apply to nodes in live regions - from 'autocomplete' to 'valuetext': attributes which apply to widgets - from 'checked' to 'selected': states which apply to widgets - from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling - from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AXPropertyName {
            #[serde(rename = "actions")]
            Actions,
            #[serde(rename = "busy")]
            Busy,
            #[serde(rename = "disabled")]
            Disabled,
            #[serde(rename = "editable")]
            Editable,
            #[serde(rename = "focusable")]
            Focusable,
            #[serde(rename = "focused")]
            Focused,
            #[serde(rename = "hidden")]
            Hidden,
            #[serde(rename = "hiddenRoot")]
            HiddenRoot,
            #[serde(rename = "invalid")]
            Invalid,
            #[serde(rename = "keyshortcuts")]
            Keyshortcuts,
            #[serde(rename = "settable")]
            Settable,
            #[serde(rename = "roledescription")]
            Roledescription,
            #[serde(rename = "live")]
            Live,
            #[serde(rename = "atomic")]
            Atomic,
            #[serde(rename = "relevant")]
            Relevant,
            #[serde(rename = "root")]
            Root,
            #[serde(rename = "autocomplete")]
            Autocomplete,
            #[serde(rename = "hasPopup")]
            HasPopup,
            #[serde(rename = "level")]
            Level,
            #[serde(rename = "multiselectable")]
            Multiselectable,
            #[serde(rename = "orientation")]
            Orientation,
            #[serde(rename = "multiline")]
            Multiline,
            #[serde(rename = "readonly")]
            Readonly,
            #[serde(rename = "required")]
            Required,
            #[serde(rename = "valuemin")]
            Valuemin,
            #[serde(rename = "valuemax")]
            Valuemax,
            #[serde(rename = "valuetext")]
            Valuetext,
            #[serde(rename = "checked")]
            Checked,
            #[serde(rename = "expanded")]
            Expanded,
            #[serde(rename = "modal")]
            Modal,
            #[serde(rename = "pressed")]
            Pressed,
            #[serde(rename = "selected")]
            Selected,
            #[serde(rename = "activedescendant")]
            Activedescendant,
            #[serde(rename = "controls")]
            Controls,
            #[serde(rename = "describedby")]
            Describedby,
            #[serde(rename = "details")]
            Details,
            #[serde(rename = "errormessage")]
            Errormessage,
            #[serde(rename = "flowto")]
            Flowto,
            #[serde(rename = "labelledby")]
            Labelledby,
            #[serde(rename = "owns")]
            Owns,
            #[serde(rename = "url")]
            Url,
            #[serde(rename = "activeFullscreenElement")]
            ActiveFullscreenElement,
            #[serde(rename = "activeModalDialog")]
            ActiveModalDialog,
            #[serde(rename = "activeAriaModalDialog")]
            ActiveAriaModalDialog,
            #[serde(rename = "ariaHiddenElement")]
            AriaHiddenElement,
            #[serde(rename = "ariaHiddenSubtree")]
            AriaHiddenSubtree,
            #[serde(rename = "emptyAlt")]
            EmptyAlt,
            #[serde(rename = "emptyText")]
            EmptyText,
            #[serde(rename = "inertElement")]
            InertElement,
            #[serde(rename = "inertSubtree")]
            InertSubtree,
            #[serde(rename = "labelContainer")]
            LabelContainer,
            #[serde(rename = "labelFor")]
            LabelFor,
            #[serde(rename = "notRendered")]
            NotRendered,
            #[serde(rename = "notVisible")]
            NotVisible,
            #[serde(rename = "presentationalRole")]
            PresentationalRole,
            #[serde(rename = "probablyPresentational")]
            ProbablyPresentational,
            #[serde(rename = "inactiveCarouselTabContent")]
            InactiveCarouselTabContent,
            #[serde(rename = "uninteresting")]
            Uninteresting,
        }
        impl AsRef<str> for AXPropertyName {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Actions => "actions",
                    Self::Busy => "busy",
                    Self::Disabled => "disabled",
                    Self::Editable => "editable",
                    Self::Focusable => "focusable",
                    Self::Focused => "focused",
                    Self::Hidden => "hidden",
                    Self::HiddenRoot => "hiddenRoot",
                    Self::Invalid => "invalid",
                    Self::Keyshortcuts => "keyshortcuts",
                    Self::Settable => "settable",
                    Self::Roledescription => "roledescription",
                    Self::Live => "live",
                    Self::Atomic => "atomic",
                    Self::Relevant => "relevant",
                    Self::Root => "root",
                    Self::Autocomplete => "autocomplete",
                    Self::HasPopup => "hasPopup",
                    Self::Level => "level",
                    Self::Multiselectable => "multiselectable",
                    Self::Orientation => "orientation",
                    Self::Multiline => "multiline",
                    Self::Readonly => "readonly",
                    Self::Required => "required",
                    Self::Valuemin => "valuemin",
                    Self::Valuemax => "valuemax",
                    Self::Valuetext => "valuetext",
                    Self::Checked => "checked",
                    Self::Expanded => "expanded",
                    Self::Modal => "modal",
                    Self::Pressed => "pressed",
                    Self::Selected => "selected",
                    Self::Activedescendant => "activedescendant",
                    Self::Controls => "controls",
                    Self::Describedby => "describedby",
                    Self::Details => "details",
                    Self::Errormessage => "errormessage",
                    Self::Flowto => "flowto",
                    Self::Labelledby => "labelledby",
                    Self::Owns => "owns",
                    Self::Url => "url",
                    Self::ActiveFullscreenElement => "activeFullscreenElement",
                    Self::ActiveModalDialog => "activeModalDialog",
                    Self::ActiveAriaModalDialog => "activeAriaModalDialog",
                    Self::AriaHiddenElement => "ariaHiddenElement",
                    Self::AriaHiddenSubtree => "ariaHiddenSubtree",
                    Self::EmptyAlt => "emptyAlt",
                    Self::EmptyText => "emptyText",
                    Self::InertElement => "inertElement",
                    Self::InertSubtree => "inertSubtree",
                    Self::LabelContainer => "labelContainer",
                    Self::LabelFor => "labelFor",
                    Self::NotRendered => "notRendered",
                    Self::NotVisible => "notVisible",
                    Self::PresentationalRole => "presentationalRole",
                    Self::ProbablyPresentational => "probablyPresentational",
                    Self::InactiveCarouselTabContent => "inactiveCarouselTabContent",
                    Self::Uninteresting => "uninteresting",
                }
            }
        }
        impl std::str::FromStr for AXPropertyName {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "actions" => Ok(Self::Actions),
                    "busy" => Ok(Self::Busy),
                    "disabled" => Ok(Self::Disabled),
                    "editable" => Ok(Self::Editable),
                    "focusable" => Ok(Self::Focusable),
                    "focused" => Ok(Self::Focused),
                    "hidden" => Ok(Self::Hidden),
                    "hiddenRoot" => Ok(Self::HiddenRoot),
                    "invalid" => Ok(Self::Invalid),
                    "keyshortcuts" => Ok(Self::Keyshortcuts),
                    "settable" => Ok(Self::Settable),
                    "roledescription" => Ok(Self::Roledescription),
                    "live" => Ok(Self::Live),
                    "atomic" => Ok(Self::Atomic),
                    "relevant" => Ok(Self::Relevant),
                    "root" => Ok(Self::Root),
                    "autocomplete" => Ok(Self::Autocomplete),
                    "hasPopup" => Ok(Self::HasPopup),
                    "level" => Ok(Self::Level),
                    "multiselectable" => Ok(Self::Multiselectable),
                    "orientation" => Ok(Self::Orientation),
                    "multiline" => Ok(Self::Multiline),
                    "readonly" => Ok(Self::Readonly),
                    "required" => Ok(Self::Required),
                    "valuemin" => Ok(Self::Valuemin),
                    "valuemax" => Ok(Self::Valuemax),
                    "valuetext" => Ok(Self::Valuetext),
                    "checked" => Ok(Self::Checked),
                    "expanded" => Ok(Self::Expanded),
                    "modal" => Ok(Self::Modal),
                    "pressed" => Ok(Self::Pressed),
                    "selected" => Ok(Self::Selected),
                    "activedescendant" => Ok(Self::Activedescendant),
                    "controls" => Ok(Self::Controls),
                    "describedby" => Ok(Self::Describedby),
                    "details" => Ok(Self::Details),
                    "errormessage" => Ok(Self::Errormessage),
                    "flowto" => Ok(Self::Flowto),
                    "labelledby" => Ok(Self::Labelledby),
                    "owns" => Ok(Self::Owns),
                    "url" => Ok(Self::Url),
                    "activeFullscreenElement" => Ok(Self::ActiveFullscreenElement),
                    "activeModalDialog" => Ok(Self::ActiveModalDialog),
                    "activeAriaModalDialog" => Ok(Self::ActiveAriaModalDialog),
                    "ariaHiddenElement" => Ok(Self::AriaHiddenElement),
                    "ariaHiddenSubtree" => Ok(Self::AriaHiddenSubtree),
                    "emptyAlt" => Ok(Self::EmptyAlt),
                    "emptyText" => Ok(Self::EmptyText),
                    "inertElement" => Ok(Self::InertElement),
                    "inertSubtree" => Ok(Self::InertSubtree),
                    "labelContainer" => Ok(Self::LabelContainer),
                    "labelFor" => Ok(Self::LabelFor),
                    "notRendered" => Ok(Self::NotRendered),
                    "notVisible" => Ok(Self::NotVisible),
                    "presentationalRole" => Ok(Self::PresentationalRole),
                    "probablyPresentational" => Ok(Self::ProbablyPresentational),
                    "inactiveCarouselTabContent" => Ok(Self::InactiveCarouselTabContent),
                    "uninteresting" => Ok(Self::Uninteresting),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AXPropertyName {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// A node in the accessibility tree.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AXNode {
            /// Unique identifier for this node.
            pub node_id: AXNodeId,
            /// Whether this node is ignored for accessibility
            pub ignored: bool,
            /// Collection of reasons why this node is hidden.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ignored_reasons: Option<Vec<AXProperty>>,
            /// This `Node`'s role, whether explicit or implicit.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub role: Option<AXValue>,
            /// This `Node`'s Chrome raw role.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub chrome_role: Option<AXValue>,
            /// The accessible name for this `Node`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<AXValue>,
            /// The accessible description for this `Node`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub description: Option<AXValue>,
            /// The value for this `Node`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<AXValue>,
            /// All other properties
            #[serde(skip_serializing_if = "Option::is_none")]
            pub properties: Option<Vec<AXProperty>>,
            /// ID for this node's parent.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_id: Option<AXNodeId>,
            /// IDs for each of this node's child nodes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub child_ids: Option<Vec<AXNodeId>>,
            /// The backend ID for the associated DOM node, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "backendDOMNodeId")]
            pub backend_dom_node_id: Option<dom::types::BackendNodeId>,
            /// The frame ID for the frame associated with this nodes document.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPartialAxTreeResponse {
            /// The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
            pub nodes: Vec<types::AXNode>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFullAxTreeResponse {
            pub nodes: Vec<types::AXNode>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRootAxNodeResponse {
            pub node: types::AXNode,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAxNodeAndAncestorsResponse {
            pub nodes: Vec<types::AXNode>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetChildAxNodesResponse {
            pub nodes: Vec<types::AXNode>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QueryAxTreeResponse {
            /// A list of `Accessibility.AXNode` matching the specified attributes, including nodes that are ignored for accessibility.
            pub nodes: Vec<types::AXNode>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Disables the accessibility domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Accessibility.disable";
        }

        /// Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. This turns on accessibility for the page, which can impact performance until accessibility is disabled.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Accessibility.enable";
        }

        /// Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPartialAxTree {
            /// Identifier of the node to get the partial accessibility tree for.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::NodeId>,
            /// Identifier of the backend node to get the partial accessibility tree for.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// JavaScript object id of the node wrapper to get the partial accessibility tree for.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
            /// Whether to fetch this node's ancestors, siblings and children. Defaults to true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub fetch_relatives: Option<bool>,
        }

        impl GetPartialAxTree {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                    fetch_relatives: None,
                }
            }

            pub fn with_node_id(mut self, node_id: dom::types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(
                mut self,
                backend_node_id: dom::types::BackendNodeId,
            ) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }

            pub fn with_fetch_relatives(mut self, fetch_relatives: bool) -> Self {
                self.fetch_relatives = Some(fetch_relatives);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetPartialAxTreeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetPartialAxTree {
            type Response = responses::GetPartialAxTreeResponse;
            const METHOD: &'static str = "Accessibility.getPartialAXTree";
        }

        /// Fetches the entire accessibility tree for the root Document
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFullAxTree {
            /// The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub depth: Option<i64>,
            /// The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
        }

        impl GetFullAxTree {
            pub fn new() -> Self {
                Self {
                    depth: None,
                    frame_id: None,
                }
            }

            pub fn with_depth(mut self, depth: i64) -> Self {
                self.depth = Some(depth);
                self
            }

            pub fn with_frame_id(mut self, frame_id: page::types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetFullAxTreeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetFullAxTree {
            type Response = responses::GetFullAxTreeResponse;
            const METHOD: &'static str = "Accessibility.getFullAXTree";
        }

        /// Fetches the root node. Requires `enable()` to have been called previously.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRootAxNode {
            /// The frame in whose document the node resides. If omitted, the root frame is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
        }

        impl GetRootAxNode {
            pub fn new() -> Self {
                Self { frame_id: None }
            }

            pub fn with_frame_id(mut self, frame_id: page::types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetRootAxNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetRootAxNode {
            type Response = responses::GetRootAxNodeResponse;
            const METHOD: &'static str = "Accessibility.getRootAXNode";
        }

        /// Fetches a node and all ancestors up to and including the root. Requires `enable()` to have been called previously.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAxNodeAndAncestors {
            /// Identifier of the node to get.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::NodeId>,
            /// Identifier of the backend node to get.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// JavaScript object id of the node wrapper to get.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
        }

        impl GetAxNodeAndAncestors {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                }
            }

            pub fn with_node_id(mut self, node_id: dom::types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(
                mut self,
                backend_node_id: dom::types::BackendNodeId,
            ) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAxNodeAndAncestorsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAxNodeAndAncestors {
            type Response = responses::GetAxNodeAndAncestorsResponse;
            const METHOD: &'static str = "Accessibility.getAXNodeAndAncestors";
        }

        /// Fetches a particular accessibility node by AXNodeId. Requires `enable()` to have been called previously.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetChildAxNodes {
            pub id: types::AXNodeId,
            /// The frame in whose document the node resides. If omitted, the root frame is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
        }

        impl GetChildAxNodes {
            pub fn new(id: types::AXNodeId) -> Self {
                Self { id, frame_id: None }
            }

            pub fn with_frame_id(mut self, frame_id: page::types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetChildAxNodesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetChildAxNodes {
            type Response = responses::GetChildAxNodesResponse;
            const METHOD: &'static str = "Accessibility.getChildAXNodes";
        }

        /// Query a DOM node's accessibility subtree for accessible name and role. This command computes the name and role for all nodes in the subtree, including those that are ignored for accessibility, and returns those that match the specified name and role. If no DOM node is specified, or the DOM node does not exist, the command returns an error. If neither `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QueryAxTree {
            /// Identifier of the node for the root to query.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::NodeId>,
            /// Identifier of the backend node for the root to query.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// JavaScript object id of the node wrapper for the root to query.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
            /// Find nodes with this computed name.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accessible_name: Option<String>,
            /// Find nodes with this computed role.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub role: Option<String>,
        }

        impl QueryAxTree {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                    accessible_name: None,
                    role: None,
                }
            }

            pub fn with_node_id(mut self, node_id: dom::types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(
                mut self,
                backend_node_id: dom::types::BackendNodeId,
            ) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }

            pub fn with_accessible_name(mut self, accessible_name: impl Into<String>) -> Self {
                self.accessible_name = Some(accessible_name.into());
                self
            }

            pub fn with_role(mut self, role: impl Into<String>) -> Self {
                self.role = Some(role.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::QueryAxTreeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for QueryAxTree {
            type Response = responses::QueryAxTreeResponse;
            const METHOD: &'static str = "Accessibility.queryAXTree";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// The loadComplete event mirrors the load complete event sent by the browser to assistive technology when the web page has finished loading.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadComplete {
            /// New document root node.
            pub root: types::AXNode,
        }

        impl LoadComplete {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Accessibility.loadComplete")
            }
        }

        /// The nodesUpdated event is sent every time a previously requested node has changed the in tree.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NodesUpdated {
            /// Updated node data.
            pub nodes: Vec<types::AXNode>,
        }

        impl NodesUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Accessibility.nodesUpdated")
            }
        }
    }
}

pub mod animation {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Animation instance.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Animation {
            /// `Animation`'s id.
            pub id: String,
            /// `Animation`'s name.
            pub name: String,
            /// `Animation`'s internal paused state.
            pub paused_state: bool,
            /// `Animation`'s play state.
            pub play_state: String,
            /// `Animation`'s playback rate.
            pub playback_rate: f64,
            /// `Animation`'s start time. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).
            pub start_time: f64,
            /// `Animation`'s current time.
            pub current_time: f64,
            /// Animation type of `Animation`.
            pub type_: String,
            /// `Animation`'s source animation node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source: Option<AnimationEffect>,
            /// A unique ID for `Animation` representing the sources that triggered this CSS animation/transition.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub css_id: Option<String>,
            /// View or scroll timeline
            #[serde(skip_serializing_if = "Option::is_none")]
            pub view_or_scroll_timeline: Option<ViewOrScrollTimeline>,
        }

        /// Timeline instance
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ViewOrScrollTimeline {
            /// Scroll container node
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source_node_id: Option<dom::types::BackendNodeId>,
            /// Represents the starting scroll position of the timeline as a length offset in pixels from scroll origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub start_offset: Option<f64>,
            /// Represents the ending scroll position of the timeline as a length offset in pixels from scroll origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub end_offset: Option<f64>,
            /// The element whose principal box's visibility in the scrollport defined the progress of the timeline. Does not exist for animations with ScrollTimeline
            #[serde(skip_serializing_if = "Option::is_none")]
            pub subject_node_id: Option<dom::types::BackendNodeId>,
            /// Orientation of the scroll
            pub axis: dom::types::ScrollOrientation,
        }

        /// AnimationEffect instance
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AnimationEffect {
            /// `AnimationEffect`'s delay.
            pub delay: f64,
            /// `AnimationEffect`'s end delay.
            pub end_delay: f64,
            /// `AnimationEffect`'s iteration start.
            pub iteration_start: f64,
            /// `AnimationEffect`'s iterations. Omitted if the value is infinite.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub iterations: Option<f64>,
            /// `AnimationEffect`'s iteration duration. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).
            pub duration: f64,
            /// `AnimationEffect`'s playback direction.
            pub direction: String,
            /// `AnimationEffect`'s fill mode.
            pub fill: String,
            /// `AnimationEffect`'s target node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// `AnimationEffect`'s keyframes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub keyframes_rule: Option<KeyframesRule>,
            /// `AnimationEffect`'s timing function.
            pub easing: String,
        }

        /// Keyframes Rule
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct KeyframesRule {
            /// CSS keyframed animation's name.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            /// List of animation keyframes.
            pub keyframes: Vec<KeyframeStyle>,
        }

        /// Keyframe Style
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct KeyframeStyle {
            /// Keyframe's time offset.
            pub offset: String,
            /// `AnimationEffect`'s timing function.
            pub easing: String,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCurrentTimeResponse {
            /// Current time of the page.
            pub current_time: f64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPlaybackRateResponse {
            /// Playback rate for animations on page.
            pub playback_rate: f64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveAnimationResponse {
            /// Corresponding remote object.
            pub remote_object: runtime::types::RemoteObject,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Disables animation domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Animation.disable";
        }

        /// Enables animation domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Animation.enable";
        }

        /// Returns the current time of the an animation.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCurrentTime {
            /// Id of animation.
            pub id: String,
        }

        impl GetCurrentTime {
            pub fn new(id: impl Into<String>) -> Self {
                Self { id: id.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetCurrentTimeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetCurrentTime {
            type Response = responses::GetCurrentTimeResponse;
            const METHOD: &'static str = "Animation.getCurrentTime";
        }

        /// Gets the playback rate of the document timeline.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPlaybackRate {}

        impl GetPlaybackRate {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetPlaybackRateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetPlaybackRate {
            type Response = responses::GetPlaybackRateResponse;
            const METHOD: &'static str = "Animation.getPlaybackRate";
        }

        /// Releases a set of animations to no longer be manipulated.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReleaseAnimations {
            /// List of animation ids to seek.
            pub animations: Vec<String>,
        }

        impl ReleaseAnimations {
            pub fn new(animations: Vec<String>) -> Self {
                Self { animations }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReleaseAnimations {
            type Response = ();
            const METHOD: &'static str = "Animation.releaseAnimations";
        }

        /// Gets the remote object of the Animation.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveAnimation {
            /// Animation id.
            pub animation_id: String,
        }

        impl ResolveAnimation {
            pub fn new(animation_id: impl Into<String>) -> Self {
                Self {
                    animation_id: animation_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ResolveAnimationResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResolveAnimation {
            type Response = responses::ResolveAnimationResponse;
            const METHOD: &'static str = "Animation.resolveAnimation";
        }

        /// Seek a set of animations to a particular time within each animation.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SeekAnimations {
            /// List of animation ids to seek.
            pub animations: Vec<String>,
            /// Set the current time of each animation.
            pub current_time: f64,
        }

        impl SeekAnimations {
            pub fn new(animations: Vec<String>, current_time: f64) -> Self {
                Self {
                    animations,
                    current_time,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SeekAnimations {
            type Response = ();
            const METHOD: &'static str = "Animation.seekAnimations";
        }

        /// Sets the paused state of a set of animations.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPaused {
            /// Animations to set the pause state of.
            pub animations: Vec<String>,
            /// Paused state to set to.
            pub paused: bool,
        }

        impl SetPaused {
            pub fn new(animations: Vec<String>, paused: bool) -> Self {
                Self { animations, paused }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPaused {
            type Response = ();
            const METHOD: &'static str = "Animation.setPaused";
        }

        /// Sets the playback rate of the document timeline.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPlaybackRate {
            /// Playback rate for animations on page
            pub playback_rate: f64,
        }

        impl SetPlaybackRate {
            pub fn new(playback_rate: f64) -> Self {
                Self { playback_rate }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPlaybackRate {
            type Response = ();
            const METHOD: &'static str = "Animation.setPlaybackRate";
        }

        /// Sets the timing of an animation node.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetTiming {
            /// Animation id.
            pub animation_id: String,
            /// Duration of the animation.
            pub duration: f64,
            /// Delay of the animation.
            pub delay: f64,
        }

        impl SetTiming {
            pub fn new(animation_id: impl Into<String>, duration: f64, delay: f64) -> Self {
                Self {
                    animation_id: animation_id.into(),
                    duration,
                    delay,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetTiming {
            type Response = ();
            const METHOD: &'static str = "Animation.setTiming";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Event for when an animation has been cancelled.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AnimationCanceled {
            /// Id of the animation that was cancelled.
            pub id: String,
        }

        impl AnimationCanceled {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Animation.animationCanceled")
            }
        }

        /// Event for each animation that has been created.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AnimationCreated {
            /// Id of the animation that was created.
            pub id: String,
        }

        impl AnimationCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Animation.animationCreated")
            }
        }

        /// Event for animation that has been started.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AnimationStarted {
            /// Animation that was started.
            pub animation: types::Animation,
        }

        impl AnimationStarted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Animation.animationStarted")
            }
        }

        /// Event for animation that has been updated.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AnimationUpdated {
            /// Animation that was updated.
            pub animation: types::Animation,
        }

        impl AnimationUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Animation.animationUpdated")
            }
        }
    }
}

pub mod audits {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Information about a cookie that is affected by an inspector issue.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AffectedCookie {
            /// The following three properties uniquely identify a cookie
            pub name: String,
            pub path: String,
            pub domain: String,
        }

        /// Information about a request that is affected by an inspector issue.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AffectedRequest {
            /// The unique request id.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_id: Option<network::types::RequestId>,
            pub url: String,
        }

        /// Information about the frame affected by an inspector issue.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AffectedFrame {
            pub frame_id: page::types::FrameId,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookieExclusionReason {
            #[serde(rename = "ExcludeSameSiteUnspecifiedTreatedAsLax")]
            ExcludeSameSiteUnspecifiedTreatedAsLax,
            #[serde(rename = "ExcludeSameSiteNoneInsecure")]
            ExcludeSameSiteNoneInsecure,
            #[serde(rename = "ExcludeSameSiteLax")]
            ExcludeSameSiteLax,
            #[serde(rename = "ExcludeSameSiteStrict")]
            ExcludeSameSiteStrict,
            #[serde(rename = "ExcludeDomainNonASCII")]
            ExcludeDomainNonAscii,
            #[serde(rename = "ExcludeThirdPartyCookieBlockedInFirstPartySet")]
            ExcludeThirdPartyCookieBlockedInFirstPartySet,
            #[serde(rename = "ExcludeThirdPartyPhaseout")]
            ExcludeThirdPartyPhaseout,
            #[serde(rename = "ExcludePortMismatch")]
            ExcludePortMismatch,
            #[serde(rename = "ExcludeSchemeMismatch")]
            ExcludeSchemeMismatch,
        }
        impl AsRef<str> for CookieExclusionReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::ExcludeSameSiteUnspecifiedTreatedAsLax => {
                        "ExcludeSameSiteUnspecifiedTreatedAsLax"
                    }
                    Self::ExcludeSameSiteNoneInsecure => "ExcludeSameSiteNoneInsecure",
                    Self::ExcludeSameSiteLax => "ExcludeSameSiteLax",
                    Self::ExcludeSameSiteStrict => "ExcludeSameSiteStrict",
                    Self::ExcludeDomainNonAscii => "ExcludeDomainNonASCII",
                    Self::ExcludeThirdPartyCookieBlockedInFirstPartySet => {
                        "ExcludeThirdPartyCookieBlockedInFirstPartySet"
                    }
                    Self::ExcludeThirdPartyPhaseout => "ExcludeThirdPartyPhaseout",
                    Self::ExcludePortMismatch => "ExcludePortMismatch",
                    Self::ExcludeSchemeMismatch => "ExcludeSchemeMismatch",
                }
            }
        }
        impl std::str::FromStr for CookieExclusionReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "ExcludeSameSiteUnspecifiedTreatedAsLax" => {
                        Ok(Self::ExcludeSameSiteUnspecifiedTreatedAsLax)
                    }
                    "ExcludeSameSiteNoneInsecure" => Ok(Self::ExcludeSameSiteNoneInsecure),
                    "ExcludeSameSiteLax" => Ok(Self::ExcludeSameSiteLax),
                    "ExcludeSameSiteStrict" => Ok(Self::ExcludeSameSiteStrict),
                    "ExcludeDomainNonASCII" => Ok(Self::ExcludeDomainNonAscii),
                    "ExcludeThirdPartyCookieBlockedInFirstPartySet" => {
                        Ok(Self::ExcludeThirdPartyCookieBlockedInFirstPartySet)
                    }
                    "ExcludeThirdPartyPhaseout" => Ok(Self::ExcludeThirdPartyPhaseout),
                    "ExcludePortMismatch" => Ok(Self::ExcludePortMismatch),
                    "ExcludeSchemeMismatch" => Ok(Self::ExcludeSchemeMismatch),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookieExclusionReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookieWarningReason {
            #[serde(rename = "WarnSameSiteUnspecifiedCrossSiteContext")]
            WarnSameSiteUnspecifiedCrossSiteContext,
            #[serde(rename = "WarnSameSiteNoneInsecure")]
            WarnSameSiteNoneInsecure,
            #[serde(rename = "WarnSameSiteUnspecifiedLaxAllowUnsafe")]
            WarnSameSiteUnspecifiedLaxAllowUnsafe,
            #[serde(rename = "WarnSameSiteStrictLaxDowngradeStrict")]
            WarnSameSiteStrictLaxDowngradeStrict,
            #[serde(rename = "WarnSameSiteStrictCrossDowngradeStrict")]
            WarnSameSiteStrictCrossDowngradeStrict,
            #[serde(rename = "WarnSameSiteStrictCrossDowngradeLax")]
            WarnSameSiteStrictCrossDowngradeLax,
            #[serde(rename = "WarnSameSiteLaxCrossDowngradeStrict")]
            WarnSameSiteLaxCrossDowngradeStrict,
            #[serde(rename = "WarnSameSiteLaxCrossDowngradeLax")]
            WarnSameSiteLaxCrossDowngradeLax,
            #[serde(rename = "WarnAttributeValueExceedsMaxSize")]
            WarnAttributeValueExceedsMaxSize,
            #[serde(rename = "WarnDomainNonASCII")]
            WarnDomainNonAscii,
            #[serde(rename = "WarnThirdPartyPhaseout")]
            WarnThirdPartyPhaseout,
            #[serde(rename = "WarnCrossSiteRedirectDowngradeChangesInclusion")]
            WarnCrossSiteRedirectDowngradeChangesInclusion,
            #[serde(rename = "WarnDeprecationTrialMetadata")]
            WarnDeprecationTrialMetadata,
            #[serde(rename = "WarnThirdPartyCookieHeuristic")]
            WarnThirdPartyCookieHeuristic,
        }
        impl AsRef<str> for CookieWarningReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::WarnSameSiteUnspecifiedCrossSiteContext => {
                        "WarnSameSiteUnspecifiedCrossSiteContext"
                    }
                    Self::WarnSameSiteNoneInsecure => "WarnSameSiteNoneInsecure",
                    Self::WarnSameSiteUnspecifiedLaxAllowUnsafe => {
                        "WarnSameSiteUnspecifiedLaxAllowUnsafe"
                    }
                    Self::WarnSameSiteStrictLaxDowngradeStrict => {
                        "WarnSameSiteStrictLaxDowngradeStrict"
                    }
                    Self::WarnSameSiteStrictCrossDowngradeStrict => {
                        "WarnSameSiteStrictCrossDowngradeStrict"
                    }
                    Self::WarnSameSiteStrictCrossDowngradeLax => {
                        "WarnSameSiteStrictCrossDowngradeLax"
                    }
                    Self::WarnSameSiteLaxCrossDowngradeStrict => {
                        "WarnSameSiteLaxCrossDowngradeStrict"
                    }
                    Self::WarnSameSiteLaxCrossDowngradeLax => "WarnSameSiteLaxCrossDowngradeLax",
                    Self::WarnAttributeValueExceedsMaxSize => "WarnAttributeValueExceedsMaxSize",
                    Self::WarnDomainNonAscii => "WarnDomainNonASCII",
                    Self::WarnThirdPartyPhaseout => "WarnThirdPartyPhaseout",
                    Self::WarnCrossSiteRedirectDowngradeChangesInclusion => {
                        "WarnCrossSiteRedirectDowngradeChangesInclusion"
                    }
                    Self::WarnDeprecationTrialMetadata => "WarnDeprecationTrialMetadata",
                    Self::WarnThirdPartyCookieHeuristic => "WarnThirdPartyCookieHeuristic",
                }
            }
        }
        impl std::str::FromStr for CookieWarningReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "WarnSameSiteUnspecifiedCrossSiteContext" => {
                        Ok(Self::WarnSameSiteUnspecifiedCrossSiteContext)
                    }
                    "WarnSameSiteNoneInsecure" => Ok(Self::WarnSameSiteNoneInsecure),
                    "WarnSameSiteUnspecifiedLaxAllowUnsafe" => {
                        Ok(Self::WarnSameSiteUnspecifiedLaxAllowUnsafe)
                    }
                    "WarnSameSiteStrictLaxDowngradeStrict" => {
                        Ok(Self::WarnSameSiteStrictLaxDowngradeStrict)
                    }
                    "WarnSameSiteStrictCrossDowngradeStrict" => {
                        Ok(Self::WarnSameSiteStrictCrossDowngradeStrict)
                    }
                    "WarnSameSiteStrictCrossDowngradeLax" => {
                        Ok(Self::WarnSameSiteStrictCrossDowngradeLax)
                    }
                    "WarnSameSiteLaxCrossDowngradeStrict" => {
                        Ok(Self::WarnSameSiteLaxCrossDowngradeStrict)
                    }
                    "WarnSameSiteLaxCrossDowngradeLax" => {
                        Ok(Self::WarnSameSiteLaxCrossDowngradeLax)
                    }
                    "WarnAttributeValueExceedsMaxSize" => {
                        Ok(Self::WarnAttributeValueExceedsMaxSize)
                    }
                    "WarnDomainNonASCII" => Ok(Self::WarnDomainNonAscii),
                    "WarnThirdPartyPhaseout" => Ok(Self::WarnThirdPartyPhaseout),
                    "WarnCrossSiteRedirectDowngradeChangesInclusion" => {
                        Ok(Self::WarnCrossSiteRedirectDowngradeChangesInclusion)
                    }
                    "WarnDeprecationTrialMetadata" => Ok(Self::WarnDeprecationTrialMetadata),
                    "WarnThirdPartyCookieHeuristic" => Ok(Self::WarnThirdPartyCookieHeuristic),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookieWarningReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookieOperation {
            #[serde(rename = "SetCookie")]
            SetCookie,
            #[serde(rename = "ReadCookie")]
            ReadCookie,
        }
        impl AsRef<str> for CookieOperation {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SetCookie => "SetCookie",
                    Self::ReadCookie => "ReadCookie",
                }
            }
        }
        impl std::str::FromStr for CookieOperation {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SetCookie" => Ok(Self::SetCookie),
                    "ReadCookie" => Ok(Self::ReadCookie),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookieOperation {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Represents the category of insight that a cookie issue falls under.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum InsightType {
            #[serde(rename = "GitHubResource")]
            GitHubResource,
            #[serde(rename = "GracePeriod")]
            GracePeriod,
            #[serde(rename = "Heuristics")]
            Heuristics,
        }
        impl AsRef<str> for InsightType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::GitHubResource => "GitHubResource",
                    Self::GracePeriod => "GracePeriod",
                    Self::Heuristics => "Heuristics",
                }
            }
        }
        impl std::str::FromStr for InsightType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "GitHubResource" => Ok(Self::GitHubResource),
                    "GracePeriod" => Ok(Self::GracePeriod),
                    "Heuristics" => Ok(Self::Heuristics),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for InsightType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Information about the suggested solution to a cookie issue.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CookieIssueInsight {
            pub type_: InsightType,
            /// Link to table entry in third-party cookie migration readiness list.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub table_entry_url: Option<String>,
        }

        /// This information is currently necessary, as the front-end has a difficult time finding a specific cookie. With this, we can convey specific error information without the cookie.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CookieIssueDetails {
            /// If AffectedCookie is not set then rawCookieLine contains the raw Set-Cookie header string. This hints at a problem where the cookie line is syntactically or semantically malformed in a way that no valid cookie could be created.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cookie: Option<AffectedCookie>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub raw_cookie_line: Option<String>,
            pub cookie_warning_reasons: Vec<CookieWarningReason>,
            pub cookie_exclusion_reasons: Vec<CookieExclusionReason>,
            /// Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context.
            pub operation: CookieOperation,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub site_for_cookies: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cookie_url: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request: Option<AffectedRequest>,
            /// The recommended solution to the issue.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub insight: Option<CookieIssueInsight>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum MixedContentResolutionStatus {
            #[serde(rename = "MixedContentBlocked")]
            MixedContentBlocked,
            #[serde(rename = "MixedContentAutomaticallyUpgraded")]
            MixedContentAutomaticallyUpgraded,
            #[serde(rename = "MixedContentWarning")]
            MixedContentWarning,
        }
        impl AsRef<str> for MixedContentResolutionStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::MixedContentBlocked => "MixedContentBlocked",
                    Self::MixedContentAutomaticallyUpgraded => "MixedContentAutomaticallyUpgraded",
                    Self::MixedContentWarning => "MixedContentWarning",
                }
            }
        }
        impl std::str::FromStr for MixedContentResolutionStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "MixedContentBlocked" => Ok(Self::MixedContentBlocked),
                    "MixedContentAutomaticallyUpgraded" => {
                        Ok(Self::MixedContentAutomaticallyUpgraded)
                    }
                    "MixedContentWarning" => Ok(Self::MixedContentWarning),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for MixedContentResolutionStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum MixedContentResourceType {
            #[serde(rename = "AttributionSrc")]
            AttributionSrc,
            #[serde(rename = "Audio")]
            Audio,
            #[serde(rename = "Beacon")]
            Beacon,
            #[serde(rename = "CSPReport")]
            CspReport,
            #[serde(rename = "Download")]
            Download,
            #[serde(rename = "EventSource")]
            EventSource,
            #[serde(rename = "Favicon")]
            Favicon,
            #[serde(rename = "Font")]
            Font,
            #[serde(rename = "Form")]
            Form,
            #[serde(rename = "Frame")]
            Frame,
            #[serde(rename = "Image")]
            Image,
            #[serde(rename = "Import")]
            Import,
            #[serde(rename = "JSON")]
            Json,
            #[serde(rename = "Manifest")]
            Manifest,
            #[serde(rename = "Ping")]
            Ping,
            #[serde(rename = "PluginData")]
            PluginData,
            #[serde(rename = "PluginResource")]
            PluginResource,
            #[serde(rename = "Prefetch")]
            Prefetch,
            #[serde(rename = "Resource")]
            Resource,
            #[serde(rename = "Script")]
            Script,
            #[serde(rename = "ServiceWorker")]
            ServiceWorker,
            #[serde(rename = "SharedWorker")]
            SharedWorker,
            #[serde(rename = "SpeculationRules")]
            SpeculationRules,
            #[serde(rename = "Stylesheet")]
            Stylesheet,
            #[serde(rename = "Track")]
            Track,
            #[serde(rename = "Video")]
            Video,
            #[serde(rename = "Worker")]
            Worker,
            #[serde(rename = "XMLHttpRequest")]
            XmlHttpRequest,
            #[serde(rename = "XSLT")]
            Xslt,
        }
        impl AsRef<str> for MixedContentResourceType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::AttributionSrc => "AttributionSrc",
                    Self::Audio => "Audio",
                    Self::Beacon => "Beacon",
                    Self::CspReport => "CSPReport",
                    Self::Download => "Download",
                    Self::EventSource => "EventSource",
                    Self::Favicon => "Favicon",
                    Self::Font => "Font",
                    Self::Form => "Form",
                    Self::Frame => "Frame",
                    Self::Image => "Image",
                    Self::Import => "Import",
                    Self::Json => "JSON",
                    Self::Manifest => "Manifest",
                    Self::Ping => "Ping",
                    Self::PluginData => "PluginData",
                    Self::PluginResource => "PluginResource",
                    Self::Prefetch => "Prefetch",
                    Self::Resource => "Resource",
                    Self::Script => "Script",
                    Self::ServiceWorker => "ServiceWorker",
                    Self::SharedWorker => "SharedWorker",
                    Self::SpeculationRules => "SpeculationRules",
                    Self::Stylesheet => "Stylesheet",
                    Self::Track => "Track",
                    Self::Video => "Video",
                    Self::Worker => "Worker",
                    Self::XmlHttpRequest => "XMLHttpRequest",
                    Self::Xslt => "XSLT",
                }
            }
        }
        impl std::str::FromStr for MixedContentResourceType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "AttributionSrc" => Ok(Self::AttributionSrc),
                    "Audio" => Ok(Self::Audio),
                    "Beacon" => Ok(Self::Beacon),
                    "CSPReport" => Ok(Self::CspReport),
                    "Download" => Ok(Self::Download),
                    "EventSource" => Ok(Self::EventSource),
                    "Favicon" => Ok(Self::Favicon),
                    "Font" => Ok(Self::Font),
                    "Form" => Ok(Self::Form),
                    "Frame" => Ok(Self::Frame),
                    "Image" => Ok(Self::Image),
                    "Import" => Ok(Self::Import),
                    "JSON" => Ok(Self::Json),
                    "Manifest" => Ok(Self::Manifest),
                    "Ping" => Ok(Self::Ping),
                    "PluginData" => Ok(Self::PluginData),
                    "PluginResource" => Ok(Self::PluginResource),
                    "Prefetch" => Ok(Self::Prefetch),
                    "Resource" => Ok(Self::Resource),
                    "Script" => Ok(Self::Script),
                    "ServiceWorker" => Ok(Self::ServiceWorker),
                    "SharedWorker" => Ok(Self::SharedWorker),
                    "SpeculationRules" => Ok(Self::SpeculationRules),
                    "Stylesheet" => Ok(Self::Stylesheet),
                    "Track" => Ok(Self::Track),
                    "Video" => Ok(Self::Video),
                    "Worker" => Ok(Self::Worker),
                    "XMLHttpRequest" => Ok(Self::XmlHttpRequest),
                    "XSLT" => Ok(Self::Xslt),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for MixedContentResourceType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MixedContentIssueDetails {
            /// The type of resource causing the mixed content issue (css, js, iframe, form,...). Marked as optional because it is mapped to from blink::mojom::RequestContextType, which will be replaced by network::mojom::RequestDestination
            #[serde(skip_serializing_if = "Option::is_none")]
            pub resource_type: Option<MixedContentResourceType>,
            /// The way the mixed content issue is being resolved.
            pub resolution_status: MixedContentResolutionStatus,
            /// The unsafe http url causing the mixed content issue.
            #[serde(rename = "insecureURL")]
            pub insecure_url: String,
            /// The url responsible for the call to an unsafe url.
            #[serde(rename = "mainResourceURL")]
            pub main_resource_url: String,
            /// The mixed content request. Does not always exist (e.g. for unsafe form submission urls).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request: Option<AffectedRequest>,
            /// Optional because not every mixed content issue is necessarily linked to a frame.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame: Option<AffectedFrame>,
        }

        /// Enum indicating the reason a response has been blocked. These reasons are refinements of the net error BLOCKED_BY_RESPONSE.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum BlockedByResponseReason {
            #[serde(rename = "CoepFrameResourceNeedsCoepHeader")]
            CoepFrameResourceNeedsCoepHeader,
            #[serde(rename = "CoopSandboxedIFrameCannotNavigateToCoopPage")]
            CoopSandboxedIFrameCannotNavigateToCoopPage,
            #[serde(rename = "CorpNotSameOrigin")]
            CorpNotSameOrigin,
            #[serde(rename = "CorpNotSameOriginAfterDefaultedToSameOriginByCoep")]
            CorpNotSameOriginAfterDefaultedToSameOriginByCoep,
            #[serde(rename = "CorpNotSameOriginAfterDefaultedToSameOriginByDip")]
            CorpNotSameOriginAfterDefaultedToSameOriginByDip,
            #[serde(rename = "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip")]
            CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip,
            #[serde(rename = "CorpNotSameSite")]
            CorpNotSameSite,
            #[serde(rename = "SRIMessageSignatureMismatch")]
            SriMessageSignatureMismatch,
        }
        impl AsRef<str> for BlockedByResponseReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::CoepFrameResourceNeedsCoepHeader => "CoepFrameResourceNeedsCoepHeader",
                    Self::CoopSandboxedIFrameCannotNavigateToCoopPage => {
                        "CoopSandboxedIFrameCannotNavigateToCoopPage"
                    }
                    Self::CorpNotSameOrigin => "CorpNotSameOrigin",
                    Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoep => {
                        "CorpNotSameOriginAfterDefaultedToSameOriginByCoep"
                    }
                    Self::CorpNotSameOriginAfterDefaultedToSameOriginByDip => {
                        "CorpNotSameOriginAfterDefaultedToSameOriginByDip"
                    }
                    Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip => {
                        "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"
                    }
                    Self::CorpNotSameSite => "CorpNotSameSite",
                    Self::SriMessageSignatureMismatch => "SRIMessageSignatureMismatch",
                }
            }
        }
        impl std::str::FromStr for BlockedByResponseReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "CoepFrameResourceNeedsCoepHeader" => {
                        Ok(Self::CoepFrameResourceNeedsCoepHeader)
                    }
                    "CoopSandboxedIFrameCannotNavigateToCoopPage" => {
                        Ok(Self::CoopSandboxedIFrameCannotNavigateToCoopPage)
                    }
                    "CorpNotSameOrigin" => Ok(Self::CorpNotSameOrigin),
                    "CorpNotSameOriginAfterDefaultedToSameOriginByCoep" => {
                        Ok(Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoep)
                    }
                    "CorpNotSameOriginAfterDefaultedToSameOriginByDip" => {
                        Ok(Self::CorpNotSameOriginAfterDefaultedToSameOriginByDip)
                    }
                    "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip" => {
                        Ok(Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip)
                    }
                    "CorpNotSameSite" => Ok(Self::CorpNotSameSite),
                    "SRIMessageSignatureMismatch" => Ok(Self::SriMessageSignatureMismatch),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for BlockedByResponseReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Details for a request that has been blocked with the BLOCKED_BY_RESPONSE code. Currently only used for COEP/COOP, but may be extended to include some CSP errors in the future.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BlockedByResponseIssueDetails {
            pub request: AffectedRequest,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_frame: Option<AffectedFrame>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub blocked_frame: Option<AffectedFrame>,
            pub reason: BlockedByResponseReason,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum HeavyAdResolutionStatus {
            #[serde(rename = "HeavyAdBlocked")]
            HeavyAdBlocked,
            #[serde(rename = "HeavyAdWarning")]
            HeavyAdWarning,
        }
        impl AsRef<str> for HeavyAdResolutionStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::HeavyAdBlocked => "HeavyAdBlocked",
                    Self::HeavyAdWarning => "HeavyAdWarning",
                }
            }
        }
        impl std::str::FromStr for HeavyAdResolutionStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "HeavyAdBlocked" => Ok(Self::HeavyAdBlocked),
                    "HeavyAdWarning" => Ok(Self::HeavyAdWarning),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for HeavyAdResolutionStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum HeavyAdReason {
            #[serde(rename = "NetworkTotalLimit")]
            NetworkTotalLimit,
            #[serde(rename = "CpuTotalLimit")]
            CpuTotalLimit,
            #[serde(rename = "CpuPeakLimit")]
            CpuPeakLimit,
        }
        impl AsRef<str> for HeavyAdReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::NetworkTotalLimit => "NetworkTotalLimit",
                    Self::CpuTotalLimit => "CpuTotalLimit",
                    Self::CpuPeakLimit => "CpuPeakLimit",
                }
            }
        }
        impl std::str::FromStr for HeavyAdReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "NetworkTotalLimit" => Ok(Self::NetworkTotalLimit),
                    "CpuTotalLimit" => Ok(Self::CpuTotalLimit),
                    "CpuPeakLimit" => Ok(Self::CpuPeakLimit),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for HeavyAdReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HeavyAdIssueDetails {
            /// The resolution status, either blocking the content or warning.
            pub resolution: HeavyAdResolutionStatus,
            /// The reason the ad was blocked, total network or cpu or peak cpu.
            pub reason: HeavyAdReason,
            /// The frame that was blocked.
            pub frame: AffectedFrame,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ContentSecurityPolicyViolationType {
            #[serde(rename = "kInlineViolation")]
            KInlineViolation,
            #[serde(rename = "kEvalViolation")]
            KEvalViolation,
            #[serde(rename = "kURLViolation")]
            KUrlViolation,
            #[serde(rename = "kSRIViolation")]
            KSriViolation,
            #[serde(rename = "kTrustedTypesSinkViolation")]
            KTrustedTypesSinkViolation,
            #[serde(rename = "kTrustedTypesPolicyViolation")]
            KTrustedTypesPolicyViolation,
            #[serde(rename = "kWasmEvalViolation")]
            KWasmEvalViolation,
        }
        impl AsRef<str> for ContentSecurityPolicyViolationType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::KInlineViolation => "kInlineViolation",
                    Self::KEvalViolation => "kEvalViolation",
                    Self::KUrlViolation => "kURLViolation",
                    Self::KSriViolation => "kSRIViolation",
                    Self::KTrustedTypesSinkViolation => "kTrustedTypesSinkViolation",
                    Self::KTrustedTypesPolicyViolation => "kTrustedTypesPolicyViolation",
                    Self::KWasmEvalViolation => "kWasmEvalViolation",
                }
            }
        }
        impl std::str::FromStr for ContentSecurityPolicyViolationType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "kInlineViolation" => Ok(Self::KInlineViolation),
                    "kEvalViolation" => Ok(Self::KEvalViolation),
                    "kURLViolation" => Ok(Self::KUrlViolation),
                    "kSRIViolation" => Ok(Self::KSriViolation),
                    "kTrustedTypesSinkViolation" => Ok(Self::KTrustedTypesSinkViolation),
                    "kTrustedTypesPolicyViolation" => Ok(Self::KTrustedTypesPolicyViolation),
                    "kWasmEvalViolation" => Ok(Self::KWasmEvalViolation),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ContentSecurityPolicyViolationType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SourceCodeLocation {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub script_id: Option<runtime::types::ScriptId>,
            pub url: String,
            pub line_number: i64,
            pub column_number: i64,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContentSecurityPolicyIssueDetails {
            /// The url not included in allowed sources.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "blockedURL")]
            pub blocked_url: Option<String>,
            /// Specific directive that is violated, causing the CSP issue.
            pub violated_directive: String,
            pub is_report_only: bool,
            pub content_security_policy_violation_type: ContentSecurityPolicyViolationType,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_ancestor: Option<AffectedFrame>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source_code_location: Option<SourceCodeLocation>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub violating_node_id: Option<dom::types::BackendNodeId>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SharedArrayBufferIssueType {
            #[serde(rename = "TransferIssue")]
            TransferIssue,
            #[serde(rename = "CreationIssue")]
            CreationIssue,
        }
        impl AsRef<str> for SharedArrayBufferIssueType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::TransferIssue => "TransferIssue",
                    Self::CreationIssue => "CreationIssue",
                }
            }
        }
        impl std::str::FromStr for SharedArrayBufferIssueType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "TransferIssue" => Ok(Self::TransferIssue),
                    "CreationIssue" => Ok(Self::CreationIssue),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SharedArrayBufferIssueType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Details for a issue arising from an SAB being instantiated in, or transferred to a context that is not cross-origin isolated.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedArrayBufferIssueDetails {
            pub source_code_location: SourceCodeLocation,
            pub is_warning: bool,
            pub type_: SharedArrayBufferIssueType,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LowTextContrastIssueDetails {
            pub violating_node_id: dom::types::BackendNodeId,
            pub violating_node_selector: String,
            pub contrast_ratio: f64,
            #[serde(rename = "thresholdAA")]
            pub threshold_aa: f64,
            #[serde(rename = "thresholdAAA")]
            pub threshold_aaa: f64,
            pub font_size: String,
            pub font_weight: String,
        }

        /// Details for a CORS related issue, e.g. a warning or error related to CORS RFC1918 enforcement.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CorsIssueDetails {
            pub cors_error_status: network::types::CorsErrorStatus,
            pub is_warning: bool,
            pub request: AffectedRequest,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub location: Option<SourceCodeLocation>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub initiator_origin: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "resourceIPAddressSpace")]
            pub resource_ip_address_space: Option<network::types::IPAddressSpace>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub client_security_state: Option<network::types::ClientSecurityState>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingIssueType {
            #[serde(rename = "PermissionPolicyDisabled")]
            PermissionPolicyDisabled,
            #[serde(rename = "UntrustworthyReportingOrigin")]
            UntrustworthyReportingOrigin,
            #[serde(rename = "InsecureContext")]
            InsecureContext,
            #[serde(rename = "InvalidHeader")]
            InvalidHeader,
            #[serde(rename = "InvalidRegisterTriggerHeader")]
            InvalidRegisterTriggerHeader,
            #[serde(rename = "SourceAndTriggerHeaders")]
            SourceAndTriggerHeaders,
            #[serde(rename = "SourceIgnored")]
            SourceIgnored,
            #[serde(rename = "TriggerIgnored")]
            TriggerIgnored,
            #[serde(rename = "OsSourceIgnored")]
            OsSourceIgnored,
            #[serde(rename = "OsTriggerIgnored")]
            OsTriggerIgnored,
            #[serde(rename = "InvalidRegisterOsSourceHeader")]
            InvalidRegisterOsSourceHeader,
            #[serde(rename = "InvalidRegisterOsTriggerHeader")]
            InvalidRegisterOsTriggerHeader,
            #[serde(rename = "WebAndOsHeaders")]
            WebAndOsHeaders,
            #[serde(rename = "NoWebOrOsSupport")]
            NoWebOrOsSupport,
            #[serde(rename = "NavigationRegistrationWithoutTransientUserActivation")]
            NavigationRegistrationWithoutTransientUserActivation,
            #[serde(rename = "InvalidInfoHeader")]
            InvalidInfoHeader,
            #[serde(rename = "NoRegisterSourceHeader")]
            NoRegisterSourceHeader,
            #[serde(rename = "NoRegisterTriggerHeader")]
            NoRegisterTriggerHeader,
            #[serde(rename = "NoRegisterOsSourceHeader")]
            NoRegisterOsSourceHeader,
            #[serde(rename = "NoRegisterOsTriggerHeader")]
            NoRegisterOsTriggerHeader,
            #[serde(rename = "NavigationRegistrationUniqueScopeAlreadySet")]
            NavigationRegistrationUniqueScopeAlreadySet,
        }
        impl AsRef<str> for AttributionReportingIssueType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::PermissionPolicyDisabled => "PermissionPolicyDisabled",
                    Self::UntrustworthyReportingOrigin => "UntrustworthyReportingOrigin",
                    Self::InsecureContext => "InsecureContext",
                    Self::InvalidHeader => "InvalidHeader",
                    Self::InvalidRegisterTriggerHeader => "InvalidRegisterTriggerHeader",
                    Self::SourceAndTriggerHeaders => "SourceAndTriggerHeaders",
                    Self::SourceIgnored => "SourceIgnored",
                    Self::TriggerIgnored => "TriggerIgnored",
                    Self::OsSourceIgnored => "OsSourceIgnored",
                    Self::OsTriggerIgnored => "OsTriggerIgnored",
                    Self::InvalidRegisterOsSourceHeader => "InvalidRegisterOsSourceHeader",
                    Self::InvalidRegisterOsTriggerHeader => "InvalidRegisterOsTriggerHeader",
                    Self::WebAndOsHeaders => "WebAndOsHeaders",
                    Self::NoWebOrOsSupport => "NoWebOrOsSupport",
                    Self::NavigationRegistrationWithoutTransientUserActivation => {
                        "NavigationRegistrationWithoutTransientUserActivation"
                    }
                    Self::InvalidInfoHeader => "InvalidInfoHeader",
                    Self::NoRegisterSourceHeader => "NoRegisterSourceHeader",
                    Self::NoRegisterTriggerHeader => "NoRegisterTriggerHeader",
                    Self::NoRegisterOsSourceHeader => "NoRegisterOsSourceHeader",
                    Self::NoRegisterOsTriggerHeader => "NoRegisterOsTriggerHeader",
                    Self::NavigationRegistrationUniqueScopeAlreadySet => {
                        "NavigationRegistrationUniqueScopeAlreadySet"
                    }
                }
            }
        }
        impl std::str::FromStr for AttributionReportingIssueType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "PermissionPolicyDisabled" => Ok(Self::PermissionPolicyDisabled),
                    "UntrustworthyReportingOrigin" => Ok(Self::UntrustworthyReportingOrigin),
                    "InsecureContext" => Ok(Self::InsecureContext),
                    "InvalidHeader" => Ok(Self::InvalidHeader),
                    "InvalidRegisterTriggerHeader" => Ok(Self::InvalidRegisterTriggerHeader),
                    "SourceAndTriggerHeaders" => Ok(Self::SourceAndTriggerHeaders),
                    "SourceIgnored" => Ok(Self::SourceIgnored),
                    "TriggerIgnored" => Ok(Self::TriggerIgnored),
                    "OsSourceIgnored" => Ok(Self::OsSourceIgnored),
                    "OsTriggerIgnored" => Ok(Self::OsTriggerIgnored),
                    "InvalidRegisterOsSourceHeader" => Ok(Self::InvalidRegisterOsSourceHeader),
                    "InvalidRegisterOsTriggerHeader" => Ok(Self::InvalidRegisterOsTriggerHeader),
                    "WebAndOsHeaders" => Ok(Self::WebAndOsHeaders),
                    "NoWebOrOsSupport" => Ok(Self::NoWebOrOsSupport),
                    "NavigationRegistrationWithoutTransientUserActivation" => {
                        Ok(Self::NavigationRegistrationWithoutTransientUserActivation)
                    }
                    "InvalidInfoHeader" => Ok(Self::InvalidInfoHeader),
                    "NoRegisterSourceHeader" => Ok(Self::NoRegisterSourceHeader),
                    "NoRegisterTriggerHeader" => Ok(Self::NoRegisterTriggerHeader),
                    "NoRegisterOsSourceHeader" => Ok(Self::NoRegisterOsSourceHeader),
                    "NoRegisterOsTriggerHeader" => Ok(Self::NoRegisterOsTriggerHeader),
                    "NavigationRegistrationUniqueScopeAlreadySet" => {
                        Ok(Self::NavigationRegistrationUniqueScopeAlreadySet)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingIssueType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SharedDictionaryError {
            #[serde(rename = "UseErrorCrossOriginNoCorsRequest")]
            UseErrorCrossOriginNoCorsRequest,
            #[serde(rename = "UseErrorDictionaryLoadFailure")]
            UseErrorDictionaryLoadFailure,
            #[serde(rename = "UseErrorMatchingDictionaryNotUsed")]
            UseErrorMatchingDictionaryNotUsed,
            #[serde(rename = "UseErrorUnexpectedContentDictionaryHeader")]
            UseErrorUnexpectedContentDictionaryHeader,
            #[serde(rename = "WriteErrorCossOriginNoCorsRequest")]
            WriteErrorCossOriginNoCorsRequest,
            #[serde(rename = "WriteErrorDisallowedBySettings")]
            WriteErrorDisallowedBySettings,
            #[serde(rename = "WriteErrorExpiredResponse")]
            WriteErrorExpiredResponse,
            #[serde(rename = "WriteErrorFeatureDisabled")]
            WriteErrorFeatureDisabled,
            #[serde(rename = "WriteErrorInsufficientResources")]
            WriteErrorInsufficientResources,
            #[serde(rename = "WriteErrorInvalidMatchField")]
            WriteErrorInvalidMatchField,
            #[serde(rename = "WriteErrorInvalidStructuredHeader")]
            WriteErrorInvalidStructuredHeader,
            #[serde(rename = "WriteErrorInvalidTTLField")]
            WriteErrorInvalidTtlField,
            #[serde(rename = "WriteErrorNavigationRequest")]
            WriteErrorNavigationRequest,
            #[serde(rename = "WriteErrorNoMatchField")]
            WriteErrorNoMatchField,
            #[serde(rename = "WriteErrorNonIntegerTTLField")]
            WriteErrorNonIntegerTtlField,
            #[serde(rename = "WriteErrorNonListMatchDestField")]
            WriteErrorNonListMatchDestField,
            #[serde(rename = "WriteErrorNonSecureContext")]
            WriteErrorNonSecureContext,
            #[serde(rename = "WriteErrorNonStringIdField")]
            WriteErrorNonStringIdField,
            #[serde(rename = "WriteErrorNonStringInMatchDestList")]
            WriteErrorNonStringInMatchDestList,
            #[serde(rename = "WriteErrorNonStringMatchField")]
            WriteErrorNonStringMatchField,
            #[serde(rename = "WriteErrorNonTokenTypeField")]
            WriteErrorNonTokenTypeField,
            #[serde(rename = "WriteErrorRequestAborted")]
            WriteErrorRequestAborted,
            #[serde(rename = "WriteErrorShuttingDown")]
            WriteErrorShuttingDown,
            #[serde(rename = "WriteErrorTooLongIdField")]
            WriteErrorTooLongIdField,
            #[serde(rename = "WriteErrorUnsupportedType")]
            WriteErrorUnsupportedType,
        }
        impl AsRef<str> for SharedDictionaryError {
            fn as_ref(&self) -> &str {
                match self {
                    Self::UseErrorCrossOriginNoCorsRequest => "UseErrorCrossOriginNoCorsRequest",
                    Self::UseErrorDictionaryLoadFailure => "UseErrorDictionaryLoadFailure",
                    Self::UseErrorMatchingDictionaryNotUsed => "UseErrorMatchingDictionaryNotUsed",
                    Self::UseErrorUnexpectedContentDictionaryHeader => {
                        "UseErrorUnexpectedContentDictionaryHeader"
                    }
                    Self::WriteErrorCossOriginNoCorsRequest => "WriteErrorCossOriginNoCorsRequest",
                    Self::WriteErrorDisallowedBySettings => "WriteErrorDisallowedBySettings",
                    Self::WriteErrorExpiredResponse => "WriteErrorExpiredResponse",
                    Self::WriteErrorFeatureDisabled => "WriteErrorFeatureDisabled",
                    Self::WriteErrorInsufficientResources => "WriteErrorInsufficientResources",
                    Self::WriteErrorInvalidMatchField => "WriteErrorInvalidMatchField",
                    Self::WriteErrorInvalidStructuredHeader => "WriteErrorInvalidStructuredHeader",
                    Self::WriteErrorInvalidTtlField => "WriteErrorInvalidTTLField",
                    Self::WriteErrorNavigationRequest => "WriteErrorNavigationRequest",
                    Self::WriteErrorNoMatchField => "WriteErrorNoMatchField",
                    Self::WriteErrorNonIntegerTtlField => "WriteErrorNonIntegerTTLField",
                    Self::WriteErrorNonListMatchDestField => "WriteErrorNonListMatchDestField",
                    Self::WriteErrorNonSecureContext => "WriteErrorNonSecureContext",
                    Self::WriteErrorNonStringIdField => "WriteErrorNonStringIdField",
                    Self::WriteErrorNonStringInMatchDestList => {
                        "WriteErrorNonStringInMatchDestList"
                    }
                    Self::WriteErrorNonStringMatchField => "WriteErrorNonStringMatchField",
                    Self::WriteErrorNonTokenTypeField => "WriteErrorNonTokenTypeField",
                    Self::WriteErrorRequestAborted => "WriteErrorRequestAborted",
                    Self::WriteErrorShuttingDown => "WriteErrorShuttingDown",
                    Self::WriteErrorTooLongIdField => "WriteErrorTooLongIdField",
                    Self::WriteErrorUnsupportedType => "WriteErrorUnsupportedType",
                }
            }
        }
        impl std::str::FromStr for SharedDictionaryError {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "UseErrorCrossOriginNoCorsRequest" => {
                        Ok(Self::UseErrorCrossOriginNoCorsRequest)
                    }
                    "UseErrorDictionaryLoadFailure" => Ok(Self::UseErrorDictionaryLoadFailure),
                    "UseErrorMatchingDictionaryNotUsed" => {
                        Ok(Self::UseErrorMatchingDictionaryNotUsed)
                    }
                    "UseErrorUnexpectedContentDictionaryHeader" => {
                        Ok(Self::UseErrorUnexpectedContentDictionaryHeader)
                    }
                    "WriteErrorCossOriginNoCorsRequest" => {
                        Ok(Self::WriteErrorCossOriginNoCorsRequest)
                    }
                    "WriteErrorDisallowedBySettings" => Ok(Self::WriteErrorDisallowedBySettings),
                    "WriteErrorExpiredResponse" => Ok(Self::WriteErrorExpiredResponse),
                    "WriteErrorFeatureDisabled" => Ok(Self::WriteErrorFeatureDisabled),
                    "WriteErrorInsufficientResources" => Ok(Self::WriteErrorInsufficientResources),
                    "WriteErrorInvalidMatchField" => Ok(Self::WriteErrorInvalidMatchField),
                    "WriteErrorInvalidStructuredHeader" => {
                        Ok(Self::WriteErrorInvalidStructuredHeader)
                    }
                    "WriteErrorInvalidTTLField" => Ok(Self::WriteErrorInvalidTtlField),
                    "WriteErrorNavigationRequest" => Ok(Self::WriteErrorNavigationRequest),
                    "WriteErrorNoMatchField" => Ok(Self::WriteErrorNoMatchField),
                    "WriteErrorNonIntegerTTLField" => Ok(Self::WriteErrorNonIntegerTtlField),
                    "WriteErrorNonListMatchDestField" => Ok(Self::WriteErrorNonListMatchDestField),
                    "WriteErrorNonSecureContext" => Ok(Self::WriteErrorNonSecureContext),
                    "WriteErrorNonStringIdField" => Ok(Self::WriteErrorNonStringIdField),
                    "WriteErrorNonStringInMatchDestList" => {
                        Ok(Self::WriteErrorNonStringInMatchDestList)
                    }
                    "WriteErrorNonStringMatchField" => Ok(Self::WriteErrorNonStringMatchField),
                    "WriteErrorNonTokenTypeField" => Ok(Self::WriteErrorNonTokenTypeField),
                    "WriteErrorRequestAborted" => Ok(Self::WriteErrorRequestAborted),
                    "WriteErrorShuttingDown" => Ok(Self::WriteErrorShuttingDown),
                    "WriteErrorTooLongIdField" => Ok(Self::WriteErrorTooLongIdField),
                    "WriteErrorUnsupportedType" => Ok(Self::WriteErrorUnsupportedType),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SharedDictionaryError {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SRIMessageSignatureError {
            #[serde(rename = "MissingSignatureHeader")]
            MissingSignatureHeader,
            #[serde(rename = "MissingSignatureInputHeader")]
            MissingSignatureInputHeader,
            #[serde(rename = "InvalidSignatureHeader")]
            InvalidSignatureHeader,
            #[serde(rename = "InvalidSignatureInputHeader")]
            InvalidSignatureInputHeader,
            #[serde(rename = "SignatureHeaderValueIsNotByteSequence")]
            SignatureHeaderValueIsNotByteSequence,
            #[serde(rename = "SignatureHeaderValueIsParameterized")]
            SignatureHeaderValueIsParameterized,
            #[serde(rename = "SignatureHeaderValueIsIncorrectLength")]
            SignatureHeaderValueIsIncorrectLength,
            #[serde(rename = "SignatureInputHeaderMissingLabel")]
            SignatureInputHeaderMissingLabel,
            #[serde(rename = "SignatureInputHeaderValueNotInnerList")]
            SignatureInputHeaderValueNotInnerList,
            #[serde(rename = "SignatureInputHeaderValueMissingComponents")]
            SignatureInputHeaderValueMissingComponents,
            #[serde(rename = "SignatureInputHeaderInvalidComponentType")]
            SignatureInputHeaderInvalidComponentType,
            #[serde(rename = "SignatureInputHeaderInvalidComponentName")]
            SignatureInputHeaderInvalidComponentName,
            #[serde(rename = "SignatureInputHeaderInvalidHeaderComponentParameter")]
            SignatureInputHeaderInvalidHeaderComponentParameter,
            #[serde(rename = "SignatureInputHeaderInvalidDerivedComponentParameter")]
            SignatureInputHeaderInvalidDerivedComponentParameter,
            #[serde(rename = "SignatureInputHeaderKeyIdLength")]
            SignatureInputHeaderKeyIdLength,
            #[serde(rename = "SignatureInputHeaderInvalidParameter")]
            SignatureInputHeaderInvalidParameter,
            #[serde(rename = "SignatureInputHeaderMissingRequiredParameters")]
            SignatureInputHeaderMissingRequiredParameters,
            #[serde(rename = "ValidationFailedSignatureExpired")]
            ValidationFailedSignatureExpired,
            #[serde(rename = "ValidationFailedInvalidLength")]
            ValidationFailedInvalidLength,
            #[serde(rename = "ValidationFailedSignatureMismatch")]
            ValidationFailedSignatureMismatch,
            #[serde(rename = "ValidationFailedIntegrityMismatch")]
            ValidationFailedIntegrityMismatch,
        }
        impl AsRef<str> for SRIMessageSignatureError {
            fn as_ref(&self) -> &str {
                match self {
                    Self::MissingSignatureHeader => "MissingSignatureHeader",
                    Self::MissingSignatureInputHeader => "MissingSignatureInputHeader",
                    Self::InvalidSignatureHeader => "InvalidSignatureHeader",
                    Self::InvalidSignatureInputHeader => "InvalidSignatureInputHeader",
                    Self::SignatureHeaderValueIsNotByteSequence => {
                        "SignatureHeaderValueIsNotByteSequence"
                    }
                    Self::SignatureHeaderValueIsParameterized => {
                        "SignatureHeaderValueIsParameterized"
                    }
                    Self::SignatureHeaderValueIsIncorrectLength => {
                        "SignatureHeaderValueIsIncorrectLength"
                    }
                    Self::SignatureInputHeaderMissingLabel => "SignatureInputHeaderMissingLabel",
                    Self::SignatureInputHeaderValueNotInnerList => {
                        "SignatureInputHeaderValueNotInnerList"
                    }
                    Self::SignatureInputHeaderValueMissingComponents => {
                        "SignatureInputHeaderValueMissingComponents"
                    }
                    Self::SignatureInputHeaderInvalidComponentType => {
                        "SignatureInputHeaderInvalidComponentType"
                    }
                    Self::SignatureInputHeaderInvalidComponentName => {
                        "SignatureInputHeaderInvalidComponentName"
                    }
                    Self::SignatureInputHeaderInvalidHeaderComponentParameter => {
                        "SignatureInputHeaderInvalidHeaderComponentParameter"
                    }
                    Self::SignatureInputHeaderInvalidDerivedComponentParameter => {
                        "SignatureInputHeaderInvalidDerivedComponentParameter"
                    }
                    Self::SignatureInputHeaderKeyIdLength => "SignatureInputHeaderKeyIdLength",
                    Self::SignatureInputHeaderInvalidParameter => {
                        "SignatureInputHeaderInvalidParameter"
                    }
                    Self::SignatureInputHeaderMissingRequiredParameters => {
                        "SignatureInputHeaderMissingRequiredParameters"
                    }
                    Self::ValidationFailedSignatureExpired => "ValidationFailedSignatureExpired",
                    Self::ValidationFailedInvalidLength => "ValidationFailedInvalidLength",
                    Self::ValidationFailedSignatureMismatch => "ValidationFailedSignatureMismatch",
                    Self::ValidationFailedIntegrityMismatch => "ValidationFailedIntegrityMismatch",
                }
            }
        }
        impl std::str::FromStr for SRIMessageSignatureError {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "MissingSignatureHeader" => Ok(Self::MissingSignatureHeader),
                    "MissingSignatureInputHeader" => Ok(Self::MissingSignatureInputHeader),
                    "InvalidSignatureHeader" => Ok(Self::InvalidSignatureHeader),
                    "InvalidSignatureInputHeader" => Ok(Self::InvalidSignatureInputHeader),
                    "SignatureHeaderValueIsNotByteSequence" => {
                        Ok(Self::SignatureHeaderValueIsNotByteSequence)
                    }
                    "SignatureHeaderValueIsParameterized" => {
                        Ok(Self::SignatureHeaderValueIsParameterized)
                    }
                    "SignatureHeaderValueIsIncorrectLength" => {
                        Ok(Self::SignatureHeaderValueIsIncorrectLength)
                    }
                    "SignatureInputHeaderMissingLabel" => {
                        Ok(Self::SignatureInputHeaderMissingLabel)
                    }
                    "SignatureInputHeaderValueNotInnerList" => {
                        Ok(Self::SignatureInputHeaderValueNotInnerList)
                    }
                    "SignatureInputHeaderValueMissingComponents" => {
                        Ok(Self::SignatureInputHeaderValueMissingComponents)
                    }
                    "SignatureInputHeaderInvalidComponentType" => {
                        Ok(Self::SignatureInputHeaderInvalidComponentType)
                    }
                    "SignatureInputHeaderInvalidComponentName" => {
                        Ok(Self::SignatureInputHeaderInvalidComponentName)
                    }
                    "SignatureInputHeaderInvalidHeaderComponentParameter" => {
                        Ok(Self::SignatureInputHeaderInvalidHeaderComponentParameter)
                    }
                    "SignatureInputHeaderInvalidDerivedComponentParameter" => {
                        Ok(Self::SignatureInputHeaderInvalidDerivedComponentParameter)
                    }
                    "SignatureInputHeaderKeyIdLength" => Ok(Self::SignatureInputHeaderKeyIdLength),
                    "SignatureInputHeaderInvalidParameter" => {
                        Ok(Self::SignatureInputHeaderInvalidParameter)
                    }
                    "SignatureInputHeaderMissingRequiredParameters" => {
                        Ok(Self::SignatureInputHeaderMissingRequiredParameters)
                    }
                    "ValidationFailedSignatureExpired" => {
                        Ok(Self::ValidationFailedSignatureExpired)
                    }
                    "ValidationFailedInvalidLength" => Ok(Self::ValidationFailedInvalidLength),
                    "ValidationFailedSignatureMismatch" => {
                        Ok(Self::ValidationFailedSignatureMismatch)
                    }
                    "ValidationFailedIntegrityMismatch" => {
                        Ok(Self::ValidationFailedIntegrityMismatch)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SRIMessageSignatureError {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum UnencodedDigestError {
            #[serde(rename = "MalformedDictionary")]
            MalformedDictionary,
            #[serde(rename = "UnknownAlgorithm")]
            UnknownAlgorithm,
            #[serde(rename = "IncorrectDigestType")]
            IncorrectDigestType,
            #[serde(rename = "IncorrectDigestLength")]
            IncorrectDigestLength,
        }
        impl AsRef<str> for UnencodedDigestError {
            fn as_ref(&self) -> &str {
                match self {
                    Self::MalformedDictionary => "MalformedDictionary",
                    Self::UnknownAlgorithm => "UnknownAlgorithm",
                    Self::IncorrectDigestType => "IncorrectDigestType",
                    Self::IncorrectDigestLength => "IncorrectDigestLength",
                }
            }
        }
        impl std::str::FromStr for UnencodedDigestError {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "MalformedDictionary" => Ok(Self::MalformedDictionary),
                    "UnknownAlgorithm" => Ok(Self::UnknownAlgorithm),
                    "IncorrectDigestType" => Ok(Self::IncorrectDigestType),
                    "IncorrectDigestLength" => Ok(Self::IncorrectDigestLength),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for UnencodedDigestError {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Details for issues around "Attribution Reporting API" usage. Explainer: https://github.com/WICG/attribution-reporting-api
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingIssueDetails {
            pub violation_type: AttributionReportingIssueType,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request: Option<AffectedRequest>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub violating_node_id: Option<dom::types::BackendNodeId>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub invalid_parameter: Option<String>,
        }

        /// Details for issues about documents in Quirks Mode or Limited Quirks Mode that affects page layouting.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QuirksModeIssueDetails {
            /// If false, it means the document's mode is "quirks" instead of "limited-quirks".
            pub is_limited_quirks_mode: bool,
            pub document_node_id: dom::types::BackendNodeId,
            pub url: String,
            pub frame_id: page::types::FrameId,
            pub loader_id: network::types::LoaderId,
        }

        #[deprecated]
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NavigatorUserAgentIssueDetails {
            pub url: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub location: Option<SourceCodeLocation>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedDictionaryIssueDetails {
            pub shared_dictionary_error: SharedDictionaryError,
            pub request: AffectedRequest,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SRIMessageSignatureIssueDetails {
            pub error: SRIMessageSignatureError,
            pub signature_base: String,
            pub integrity_assertions: Vec<String>,
            pub request: AffectedRequest,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UnencodedDigestIssueDetails {
            pub error: UnencodedDigestError,
            pub request: AffectedRequest,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum GenericIssueErrorType {
            #[serde(rename = "FormLabelForNameError")]
            FormLabelForNameError,
            #[serde(rename = "FormDuplicateIdForInputError")]
            FormDuplicateIdForInputError,
            #[serde(rename = "FormInputWithNoLabelError")]
            FormInputWithNoLabelError,
            #[serde(rename = "FormAutocompleteAttributeEmptyError")]
            FormAutocompleteAttributeEmptyError,
            #[serde(rename = "FormEmptyIdAndNameAttributesForInputError")]
            FormEmptyIdAndNameAttributesForInputError,
            #[serde(rename = "FormAriaLabelledByToNonExistingIdError")]
            FormAriaLabelledByToNonExistingIdError,
            #[serde(rename = "FormInputAssignedAutocompleteValueToIdOrNameAttributeError")]
            FormInputAssignedAutocompleteValueToIdOrNameAttributeError,
            #[serde(rename = "FormLabelHasNeitherForNorNestedInputError")]
            FormLabelHasNeitherForNorNestedInputError,
            #[serde(rename = "FormLabelForMatchesNonExistingIdError")]
            FormLabelForMatchesNonExistingIdError,
            #[serde(rename = "FormInputHasWrongButWellIntendedAutocompleteValueError")]
            FormInputHasWrongButWellIntendedAutocompleteValueError,
            #[serde(rename = "ResponseWasBlockedByORB")]
            ResponseWasBlockedByOrb,
            #[serde(rename = "NavigationEntryMarkedSkippable")]
            NavigationEntryMarkedSkippable,
            #[serde(rename = "AutofillAndManualTextPolicyControlledFeaturesInfo")]
            AutofillAndManualTextPolicyControlledFeaturesInfo,
            #[serde(rename = "AutofillPolicyControlledFeatureInfo")]
            AutofillPolicyControlledFeatureInfo,
            #[serde(rename = "ManualTextPolicyControlledFeatureInfo")]
            ManualTextPolicyControlledFeatureInfo,
        }
        impl AsRef<str> for GenericIssueErrorType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::FormLabelForNameError => "FormLabelForNameError",
                    Self::FormDuplicateIdForInputError => "FormDuplicateIdForInputError",
                    Self::FormInputWithNoLabelError => "FormInputWithNoLabelError",
                    Self::FormAutocompleteAttributeEmptyError => {
                        "FormAutocompleteAttributeEmptyError"
                    }
                    Self::FormEmptyIdAndNameAttributesForInputError => {
                        "FormEmptyIdAndNameAttributesForInputError"
                    }
                    Self::FormAriaLabelledByToNonExistingIdError => {
                        "FormAriaLabelledByToNonExistingIdError"
                    }
                    Self::FormInputAssignedAutocompleteValueToIdOrNameAttributeError => {
                        "FormInputAssignedAutocompleteValueToIdOrNameAttributeError"
                    }
                    Self::FormLabelHasNeitherForNorNestedInputError => {
                        "FormLabelHasNeitherForNorNestedInputError"
                    }
                    Self::FormLabelForMatchesNonExistingIdError => {
                        "FormLabelForMatchesNonExistingIdError"
                    }
                    Self::FormInputHasWrongButWellIntendedAutocompleteValueError => {
                        "FormInputHasWrongButWellIntendedAutocompleteValueError"
                    }
                    Self::ResponseWasBlockedByOrb => "ResponseWasBlockedByORB",
                    Self::NavigationEntryMarkedSkippable => "NavigationEntryMarkedSkippable",
                    Self::AutofillAndManualTextPolicyControlledFeaturesInfo => {
                        "AutofillAndManualTextPolicyControlledFeaturesInfo"
                    }
                    Self::AutofillPolicyControlledFeatureInfo => {
                        "AutofillPolicyControlledFeatureInfo"
                    }
                    Self::ManualTextPolicyControlledFeatureInfo => {
                        "ManualTextPolicyControlledFeatureInfo"
                    }
                }
            }
        }
        impl std::str::FromStr for GenericIssueErrorType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "FormLabelForNameError" => Ok(Self::FormLabelForNameError),
                    "FormDuplicateIdForInputError" => Ok(Self::FormDuplicateIdForInputError),
                    "FormInputWithNoLabelError" => Ok(Self::FormInputWithNoLabelError),
                    "FormAutocompleteAttributeEmptyError" => {
                        Ok(Self::FormAutocompleteAttributeEmptyError)
                    }
                    "FormEmptyIdAndNameAttributesForInputError" => {
                        Ok(Self::FormEmptyIdAndNameAttributesForInputError)
                    }
                    "FormAriaLabelledByToNonExistingIdError" => {
                        Ok(Self::FormAriaLabelledByToNonExistingIdError)
                    }
                    "FormInputAssignedAutocompleteValueToIdOrNameAttributeError" => {
                        Ok(Self::FormInputAssignedAutocompleteValueToIdOrNameAttributeError)
                    }
                    "FormLabelHasNeitherForNorNestedInputError" => {
                        Ok(Self::FormLabelHasNeitherForNorNestedInputError)
                    }
                    "FormLabelForMatchesNonExistingIdError" => {
                        Ok(Self::FormLabelForMatchesNonExistingIdError)
                    }
                    "FormInputHasWrongButWellIntendedAutocompleteValueError" => {
                        Ok(Self::FormInputHasWrongButWellIntendedAutocompleteValueError)
                    }
                    "ResponseWasBlockedByORB" => Ok(Self::ResponseWasBlockedByOrb),
                    "NavigationEntryMarkedSkippable" => Ok(Self::NavigationEntryMarkedSkippable),
                    "AutofillAndManualTextPolicyControlledFeaturesInfo" => {
                        Ok(Self::AutofillAndManualTextPolicyControlledFeaturesInfo)
                    }
                    "AutofillPolicyControlledFeatureInfo" => {
                        Ok(Self::AutofillPolicyControlledFeatureInfo)
                    }
                    "ManualTextPolicyControlledFeatureInfo" => {
                        Ok(Self::ManualTextPolicyControlledFeatureInfo)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for GenericIssueErrorType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Depending on the concrete errorType, different properties are set.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GenericIssueDetails {
            /// Issues with the same errorType are aggregated in the frontend.
            pub error_type: GenericIssueErrorType,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub violating_node_id: Option<dom::types::BackendNodeId>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub violating_node_attribute: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request: Option<AffectedRequest>,
        }

        /// This issue tracks information needed to print a deprecation message. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeprecationIssueDetails {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub affected_frame: Option<AffectedFrame>,
            pub source_code_location: SourceCodeLocation,
            /// One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
            pub type_: String,
        }

        /// This issue warns about sites in the redirect chain of a finished navigation that may be flagged as trackers and have their state cleared if they don't receive a user interaction. Note that in this context 'site' means eTLD+1. For example, if the URL `https://example.test:80/bounce` was in the redirect chain, the site reported would be `example.test`.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BounceTrackingIssueDetails {
            pub tracking_sites: Vec<String>,
        }

        /// This issue warns about third-party sites that are accessing cookies on the current page, and have been permitted due to having a global metadata grant. Note that in this context 'site' means eTLD+1. For example, if the URL `https://example.test:80/web_page` was accessing cookies, the site reported would be `example.test`.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CookieDeprecationMetadataIssueDetails {
            pub allowed_sites: Vec<String>,
            pub opt_out_percentage: f64,
            pub is_opt_out_top_level: bool,
            pub operation: CookieOperation,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ClientHintIssueReason {
            #[serde(rename = "MetaTagAllowListInvalidOrigin")]
            MetaTagAllowListInvalidOrigin,
            #[serde(rename = "MetaTagModifiedHTML")]
            MetaTagModifiedHtml,
        }
        impl AsRef<str> for ClientHintIssueReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::MetaTagAllowListInvalidOrigin => "MetaTagAllowListInvalidOrigin",
                    Self::MetaTagModifiedHtml => "MetaTagModifiedHTML",
                }
            }
        }
        impl std::str::FromStr for ClientHintIssueReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "MetaTagAllowListInvalidOrigin" => Ok(Self::MetaTagAllowListInvalidOrigin),
                    "MetaTagModifiedHTML" => Ok(Self::MetaTagModifiedHtml),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ClientHintIssueReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FederatedAuthRequestIssueDetails {
            pub federated_auth_request_issue_reason: FederatedAuthRequestIssueReason,
        }

        /// Represents the failure reason when a federated authentication reason fails. Should be updated alongside RequestIdTokenStatus in third_party/blink/public/mojom/devtools/inspector_issue.mojom to include all cases except for success.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum FederatedAuthRequestIssueReason {
            #[serde(rename = "ShouldEmbargo")]
            ShouldEmbargo,
            #[serde(rename = "TooManyRequests")]
            TooManyRequests,
            #[serde(rename = "WellKnownHttpNotFound")]
            WellKnownHttpNotFound,
            #[serde(rename = "WellKnownNoResponse")]
            WellKnownNoResponse,
            #[serde(rename = "WellKnownInvalidResponse")]
            WellKnownInvalidResponse,
            #[serde(rename = "WellKnownListEmpty")]
            WellKnownListEmpty,
            #[serde(rename = "WellKnownInvalidContentType")]
            WellKnownInvalidContentType,
            #[serde(rename = "ConfigNotInWellKnown")]
            ConfigNotInWellKnown,
            #[serde(rename = "WellKnownTooBig")]
            WellKnownTooBig,
            #[serde(rename = "ConfigHttpNotFound")]
            ConfigHttpNotFound,
            #[serde(rename = "ConfigNoResponse")]
            ConfigNoResponse,
            #[serde(rename = "ConfigInvalidResponse")]
            ConfigInvalidResponse,
            #[serde(rename = "ConfigInvalidContentType")]
            ConfigInvalidContentType,
            #[serde(rename = "ClientMetadataHttpNotFound")]
            ClientMetadataHttpNotFound,
            #[serde(rename = "ClientMetadataNoResponse")]
            ClientMetadataNoResponse,
            #[serde(rename = "ClientMetadataInvalidResponse")]
            ClientMetadataInvalidResponse,
            #[serde(rename = "ClientMetadataInvalidContentType")]
            ClientMetadataInvalidContentType,
            #[serde(rename = "IdpNotPotentiallyTrustworthy")]
            IdpNotPotentiallyTrustworthy,
            #[serde(rename = "DisabledInSettings")]
            DisabledInSettings,
            #[serde(rename = "DisabledInFlags")]
            DisabledInFlags,
            #[serde(rename = "ErrorFetchingSignin")]
            ErrorFetchingSignin,
            #[serde(rename = "InvalidSigninResponse")]
            InvalidSigninResponse,
            #[serde(rename = "AccountsHttpNotFound")]
            AccountsHttpNotFound,
            #[serde(rename = "AccountsNoResponse")]
            AccountsNoResponse,
            #[serde(rename = "AccountsInvalidResponse")]
            AccountsInvalidResponse,
            #[serde(rename = "AccountsListEmpty")]
            AccountsListEmpty,
            #[serde(rename = "AccountsInvalidContentType")]
            AccountsInvalidContentType,
            #[serde(rename = "IdTokenHttpNotFound")]
            IdTokenHttpNotFound,
            #[serde(rename = "IdTokenNoResponse")]
            IdTokenNoResponse,
            #[serde(rename = "IdTokenInvalidResponse")]
            IdTokenInvalidResponse,
            #[serde(rename = "IdTokenIdpErrorResponse")]
            IdTokenIdpErrorResponse,
            #[serde(rename = "IdTokenCrossSiteIdpErrorResponse")]
            IdTokenCrossSiteIdpErrorResponse,
            #[serde(rename = "IdTokenInvalidRequest")]
            IdTokenInvalidRequest,
            #[serde(rename = "IdTokenInvalidContentType")]
            IdTokenInvalidContentType,
            #[serde(rename = "ErrorIdToken")]
            ErrorIdToken,
            #[serde(rename = "Canceled")]
            Canceled,
            #[serde(rename = "RpPageNotVisible")]
            RpPageNotVisible,
            #[serde(rename = "SilentMediationFailure")]
            SilentMediationFailure,
            #[serde(rename = "ThirdPartyCookiesBlocked")]
            ThirdPartyCookiesBlocked,
            #[serde(rename = "NotSignedInWithIdp")]
            NotSignedInWithIdp,
            #[serde(rename = "MissingTransientUserActivation")]
            MissingTransientUserActivation,
            #[serde(rename = "ReplacedByActiveMode")]
            ReplacedByActiveMode,
            #[serde(rename = "InvalidFieldsSpecified")]
            InvalidFieldsSpecified,
            #[serde(rename = "RelyingPartyOriginIsOpaque")]
            RelyingPartyOriginIsOpaque,
            #[serde(rename = "TypeNotMatching")]
            TypeNotMatching,
            #[serde(rename = "UiDismissedNoEmbargo")]
            UiDismissedNoEmbargo,
            #[serde(rename = "CorsError")]
            CorsError,
            #[serde(rename = "SuppressedBySegmentationPlatform")]
            SuppressedBySegmentationPlatform,
        }
        impl AsRef<str> for FederatedAuthRequestIssueReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::ShouldEmbargo => "ShouldEmbargo",
                    Self::TooManyRequests => "TooManyRequests",
                    Self::WellKnownHttpNotFound => "WellKnownHttpNotFound",
                    Self::WellKnownNoResponse => "WellKnownNoResponse",
                    Self::WellKnownInvalidResponse => "WellKnownInvalidResponse",
                    Self::WellKnownListEmpty => "WellKnownListEmpty",
                    Self::WellKnownInvalidContentType => "WellKnownInvalidContentType",
                    Self::ConfigNotInWellKnown => "ConfigNotInWellKnown",
                    Self::WellKnownTooBig => "WellKnownTooBig",
                    Self::ConfigHttpNotFound => "ConfigHttpNotFound",
                    Self::ConfigNoResponse => "ConfigNoResponse",
                    Self::ConfigInvalidResponse => "ConfigInvalidResponse",
                    Self::ConfigInvalidContentType => "ConfigInvalidContentType",
                    Self::ClientMetadataHttpNotFound => "ClientMetadataHttpNotFound",
                    Self::ClientMetadataNoResponse => "ClientMetadataNoResponse",
                    Self::ClientMetadataInvalidResponse => "ClientMetadataInvalidResponse",
                    Self::ClientMetadataInvalidContentType => "ClientMetadataInvalidContentType",
                    Self::IdpNotPotentiallyTrustworthy => "IdpNotPotentiallyTrustworthy",
                    Self::DisabledInSettings => "DisabledInSettings",
                    Self::DisabledInFlags => "DisabledInFlags",
                    Self::ErrorFetchingSignin => "ErrorFetchingSignin",
                    Self::InvalidSigninResponse => "InvalidSigninResponse",
                    Self::AccountsHttpNotFound => "AccountsHttpNotFound",
                    Self::AccountsNoResponse => "AccountsNoResponse",
                    Self::AccountsInvalidResponse => "AccountsInvalidResponse",
                    Self::AccountsListEmpty => "AccountsListEmpty",
                    Self::AccountsInvalidContentType => "AccountsInvalidContentType",
                    Self::IdTokenHttpNotFound => "IdTokenHttpNotFound",
                    Self::IdTokenNoResponse => "IdTokenNoResponse",
                    Self::IdTokenInvalidResponse => "IdTokenInvalidResponse",
                    Self::IdTokenIdpErrorResponse => "IdTokenIdpErrorResponse",
                    Self::IdTokenCrossSiteIdpErrorResponse => "IdTokenCrossSiteIdpErrorResponse",
                    Self::IdTokenInvalidRequest => "IdTokenInvalidRequest",
                    Self::IdTokenInvalidContentType => "IdTokenInvalidContentType",
                    Self::ErrorIdToken => "ErrorIdToken",
                    Self::Canceled => "Canceled",
                    Self::RpPageNotVisible => "RpPageNotVisible",
                    Self::SilentMediationFailure => "SilentMediationFailure",
                    Self::ThirdPartyCookiesBlocked => "ThirdPartyCookiesBlocked",
                    Self::NotSignedInWithIdp => "NotSignedInWithIdp",
                    Self::MissingTransientUserActivation => "MissingTransientUserActivation",
                    Self::ReplacedByActiveMode => "ReplacedByActiveMode",
                    Self::InvalidFieldsSpecified => "InvalidFieldsSpecified",
                    Self::RelyingPartyOriginIsOpaque => "RelyingPartyOriginIsOpaque",
                    Self::TypeNotMatching => "TypeNotMatching",
                    Self::UiDismissedNoEmbargo => "UiDismissedNoEmbargo",
                    Self::CorsError => "CorsError",
                    Self::SuppressedBySegmentationPlatform => "SuppressedBySegmentationPlatform",
                }
            }
        }
        impl std::str::FromStr for FederatedAuthRequestIssueReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "ShouldEmbargo" => Ok(Self::ShouldEmbargo),
                    "TooManyRequests" => Ok(Self::TooManyRequests),
                    "WellKnownHttpNotFound" => Ok(Self::WellKnownHttpNotFound),
                    "WellKnownNoResponse" => Ok(Self::WellKnownNoResponse),
                    "WellKnownInvalidResponse" => Ok(Self::WellKnownInvalidResponse),
                    "WellKnownListEmpty" => Ok(Self::WellKnownListEmpty),
                    "WellKnownInvalidContentType" => Ok(Self::WellKnownInvalidContentType),
                    "ConfigNotInWellKnown" => Ok(Self::ConfigNotInWellKnown),
                    "WellKnownTooBig" => Ok(Self::WellKnownTooBig),
                    "ConfigHttpNotFound" => Ok(Self::ConfigHttpNotFound),
                    "ConfigNoResponse" => Ok(Self::ConfigNoResponse),
                    "ConfigInvalidResponse" => Ok(Self::ConfigInvalidResponse),
                    "ConfigInvalidContentType" => Ok(Self::ConfigInvalidContentType),
                    "ClientMetadataHttpNotFound" => Ok(Self::ClientMetadataHttpNotFound),
                    "ClientMetadataNoResponse" => Ok(Self::ClientMetadataNoResponse),
                    "ClientMetadataInvalidResponse" => Ok(Self::ClientMetadataInvalidResponse),
                    "ClientMetadataInvalidContentType" => {
                        Ok(Self::ClientMetadataInvalidContentType)
                    }
                    "IdpNotPotentiallyTrustworthy" => Ok(Self::IdpNotPotentiallyTrustworthy),
                    "DisabledInSettings" => Ok(Self::DisabledInSettings),
                    "DisabledInFlags" => Ok(Self::DisabledInFlags),
                    "ErrorFetchingSignin" => Ok(Self::ErrorFetchingSignin),
                    "InvalidSigninResponse" => Ok(Self::InvalidSigninResponse),
                    "AccountsHttpNotFound" => Ok(Self::AccountsHttpNotFound),
                    "AccountsNoResponse" => Ok(Self::AccountsNoResponse),
                    "AccountsInvalidResponse" => Ok(Self::AccountsInvalidResponse),
                    "AccountsListEmpty" => Ok(Self::AccountsListEmpty),
                    "AccountsInvalidContentType" => Ok(Self::AccountsInvalidContentType),
                    "IdTokenHttpNotFound" => Ok(Self::IdTokenHttpNotFound),
                    "IdTokenNoResponse" => Ok(Self::IdTokenNoResponse),
                    "IdTokenInvalidResponse" => Ok(Self::IdTokenInvalidResponse),
                    "IdTokenIdpErrorResponse" => Ok(Self::IdTokenIdpErrorResponse),
                    "IdTokenCrossSiteIdpErrorResponse" => {
                        Ok(Self::IdTokenCrossSiteIdpErrorResponse)
                    }
                    "IdTokenInvalidRequest" => Ok(Self::IdTokenInvalidRequest),
                    "IdTokenInvalidContentType" => Ok(Self::IdTokenInvalidContentType),
                    "ErrorIdToken" => Ok(Self::ErrorIdToken),
                    "Canceled" => Ok(Self::Canceled),
                    "RpPageNotVisible" => Ok(Self::RpPageNotVisible),
                    "SilentMediationFailure" => Ok(Self::SilentMediationFailure),
                    "ThirdPartyCookiesBlocked" => Ok(Self::ThirdPartyCookiesBlocked),
                    "NotSignedInWithIdp" => Ok(Self::NotSignedInWithIdp),
                    "MissingTransientUserActivation" => Ok(Self::MissingTransientUserActivation),
                    "ReplacedByActiveMode" => Ok(Self::ReplacedByActiveMode),
                    "InvalidFieldsSpecified" => Ok(Self::InvalidFieldsSpecified),
                    "RelyingPartyOriginIsOpaque" => Ok(Self::RelyingPartyOriginIsOpaque),
                    "TypeNotMatching" => Ok(Self::TypeNotMatching),
                    "UiDismissedNoEmbargo" => Ok(Self::UiDismissedNoEmbargo),
                    "CorsError" => Ok(Self::CorsError),
                    "SuppressedBySegmentationPlatform" => {
                        Ok(Self::SuppressedBySegmentationPlatform)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for FederatedAuthRequestIssueReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FederatedAuthUserInfoRequestIssueDetails {
            pub federated_auth_user_info_request_issue_reason:
                FederatedAuthUserInfoRequestIssueReason,
        }

        /// Represents the failure reason when a getUserInfo() call fails. Should be updated alongside FederatedAuthUserInfoRequestResult in third_party/blink/public/mojom/devtools/inspector_issue.mojom.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum FederatedAuthUserInfoRequestIssueReason {
            #[serde(rename = "NotSameOrigin")]
            NotSameOrigin,
            #[serde(rename = "NotIframe")]
            NotIframe,
            #[serde(rename = "NotPotentiallyTrustworthy")]
            NotPotentiallyTrustworthy,
            #[serde(rename = "NoApiPermission")]
            NoApiPermission,
            #[serde(rename = "NotSignedInWithIdp")]
            NotSignedInWithIdp,
            #[serde(rename = "NoAccountSharingPermission")]
            NoAccountSharingPermission,
            #[serde(rename = "InvalidConfigOrWellKnown")]
            InvalidConfigOrWellKnown,
            #[serde(rename = "InvalidAccountsResponse")]
            InvalidAccountsResponse,
            #[serde(rename = "NoReturningUserFromFetchedAccounts")]
            NoReturningUserFromFetchedAccounts,
        }
        impl AsRef<str> for FederatedAuthUserInfoRequestIssueReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::NotSameOrigin => "NotSameOrigin",
                    Self::NotIframe => "NotIframe",
                    Self::NotPotentiallyTrustworthy => "NotPotentiallyTrustworthy",
                    Self::NoApiPermission => "NoApiPermission",
                    Self::NotSignedInWithIdp => "NotSignedInWithIdp",
                    Self::NoAccountSharingPermission => "NoAccountSharingPermission",
                    Self::InvalidConfigOrWellKnown => "InvalidConfigOrWellKnown",
                    Self::InvalidAccountsResponse => "InvalidAccountsResponse",
                    Self::NoReturningUserFromFetchedAccounts => {
                        "NoReturningUserFromFetchedAccounts"
                    }
                }
            }
        }
        impl std::str::FromStr for FederatedAuthUserInfoRequestIssueReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "NotSameOrigin" => Ok(Self::NotSameOrigin),
                    "NotIframe" => Ok(Self::NotIframe),
                    "NotPotentiallyTrustworthy" => Ok(Self::NotPotentiallyTrustworthy),
                    "NoApiPermission" => Ok(Self::NoApiPermission),
                    "NotSignedInWithIdp" => Ok(Self::NotSignedInWithIdp),
                    "NoAccountSharingPermission" => Ok(Self::NoAccountSharingPermission),
                    "InvalidConfigOrWellKnown" => Ok(Self::InvalidConfigOrWellKnown),
                    "InvalidAccountsResponse" => Ok(Self::InvalidAccountsResponse),
                    "NoReturningUserFromFetchedAccounts" => {
                        Ok(Self::NoReturningUserFromFetchedAccounts)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for FederatedAuthUserInfoRequestIssueReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// This issue tracks client hints related issues. It's used to deprecate old features, encourage the use of new ones, and provide general guidance.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClientHintIssueDetails {
            pub source_code_location: SourceCodeLocation,
            pub client_hint_issue_reason: ClientHintIssueReason,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FailedRequestInfo {
            /// The URL that failed to load.
            pub url: String,
            /// The failure message for the failed request.
            pub failure_message: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_id: Option<network::types::RequestId>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PartitioningBlobURLInfo {
            #[serde(rename = "BlockedCrossPartitionFetching")]
            BlockedCrossPartitionFetching,
            #[serde(rename = "EnforceNoopenerForNavigation")]
            EnforceNoopenerForNavigation,
        }
        impl AsRef<str> for PartitioningBlobURLInfo {
            fn as_ref(&self) -> &str {
                match self {
                    Self::BlockedCrossPartitionFetching => "BlockedCrossPartitionFetching",
                    Self::EnforceNoopenerForNavigation => "EnforceNoopenerForNavigation",
                }
            }
        }
        impl std::str::FromStr for PartitioningBlobURLInfo {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "BlockedCrossPartitionFetching" => Ok(Self::BlockedCrossPartitionFetching),
                    "EnforceNoopenerForNavigation" => Ok(Self::EnforceNoopenerForNavigation),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PartitioningBlobURLInfo {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PartitioningBlobURLIssueDetails {
            /// The BlobURL that failed to load.
            pub url: String,
            /// Additional information about the Partitioning Blob URL issue.
            #[serde(rename = "partitioningBlobURLInfo")]
            pub partitioning_blob_url_info: PartitioningBlobURLInfo,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ElementAccessibilityIssueReason {
            #[serde(rename = "DisallowedSelectChild")]
            DisallowedSelectChild,
            #[serde(rename = "DisallowedOptGroupChild")]
            DisallowedOptGroupChild,
            #[serde(rename = "NonPhrasingContentOptionChild")]
            NonPhrasingContentOptionChild,
            #[serde(rename = "InteractiveContentOptionChild")]
            InteractiveContentOptionChild,
            #[serde(rename = "InteractiveContentLegendChild")]
            InteractiveContentLegendChild,
            #[serde(rename = "InteractiveContentSummaryDescendant")]
            InteractiveContentSummaryDescendant,
        }
        impl AsRef<str> for ElementAccessibilityIssueReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::DisallowedSelectChild => "DisallowedSelectChild",
                    Self::DisallowedOptGroupChild => "DisallowedOptGroupChild",
                    Self::NonPhrasingContentOptionChild => "NonPhrasingContentOptionChild",
                    Self::InteractiveContentOptionChild => "InteractiveContentOptionChild",
                    Self::InteractiveContentLegendChild => "InteractiveContentLegendChild",
                    Self::InteractiveContentSummaryDescendant => {
                        "InteractiveContentSummaryDescendant"
                    }
                }
            }
        }
        impl std::str::FromStr for ElementAccessibilityIssueReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "DisallowedSelectChild" => Ok(Self::DisallowedSelectChild),
                    "DisallowedOptGroupChild" => Ok(Self::DisallowedOptGroupChild),
                    "NonPhrasingContentOptionChild" => Ok(Self::NonPhrasingContentOptionChild),
                    "InteractiveContentOptionChild" => Ok(Self::InteractiveContentOptionChild),
                    "InteractiveContentLegendChild" => Ok(Self::InteractiveContentLegendChild),
                    "InteractiveContentSummaryDescendant" => {
                        Ok(Self::InteractiveContentSummaryDescendant)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ElementAccessibilityIssueReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// This issue warns about errors in the select or summary element content model.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ElementAccessibilityIssueDetails {
            pub node_id: dom::types::BackendNodeId,
            pub element_accessibility_issue_reason: ElementAccessibilityIssueReason,
            pub has_disallowed_attributes: bool,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum StyleSheetLoadingIssueReason {
            #[serde(rename = "LateImportRule")]
            LateImportRule,
            #[serde(rename = "RequestFailed")]
            RequestFailed,
        }
        impl AsRef<str> for StyleSheetLoadingIssueReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::LateImportRule => "LateImportRule",
                    Self::RequestFailed => "RequestFailed",
                }
            }
        }
        impl std::str::FromStr for StyleSheetLoadingIssueReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "LateImportRule" => Ok(Self::LateImportRule),
                    "RequestFailed" => Ok(Self::RequestFailed),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for StyleSheetLoadingIssueReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// This issue warns when a referenced stylesheet couldn't be loaded.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StylesheetLoadingIssueDetails {
            /// Source code position that referenced the failing stylesheet.
            pub source_code_location: SourceCodeLocation,
            /// Reason why the stylesheet couldn't be loaded.
            pub style_sheet_loading_issue_reason: StyleSheetLoadingIssueReason,
            /// Contains additional info when the failure was due to a request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub failed_request_info: Option<FailedRequestInfo>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PropertyRuleIssueReason {
            #[serde(rename = "InvalidSyntax")]
            InvalidSyntax,
            #[serde(rename = "InvalidInitialValue")]
            InvalidInitialValue,
            #[serde(rename = "InvalidInherits")]
            InvalidInherits,
            #[serde(rename = "InvalidName")]
            InvalidName,
        }
        impl AsRef<str> for PropertyRuleIssueReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::InvalidSyntax => "InvalidSyntax",
                    Self::InvalidInitialValue => "InvalidInitialValue",
                    Self::InvalidInherits => "InvalidInherits",
                    Self::InvalidName => "InvalidName",
                }
            }
        }
        impl std::str::FromStr for PropertyRuleIssueReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "InvalidSyntax" => Ok(Self::InvalidSyntax),
                    "InvalidInitialValue" => Ok(Self::InvalidInitialValue),
                    "InvalidInherits" => Ok(Self::InvalidInherits),
                    "InvalidName" => Ok(Self::InvalidName),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PropertyRuleIssueReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// This issue warns about errors in property rules that lead to property registrations being ignored.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PropertyRuleIssueDetails {
            /// Source code position of the property rule.
            pub source_code_location: SourceCodeLocation,
            /// Reason why the property rule was discarded.
            pub property_rule_issue_reason: PropertyRuleIssueReason,
            /// The value of the property rule property that failed to parse
            #[serde(skip_serializing_if = "Option::is_none")]
            pub property_value: Option<String>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum UserReidentificationIssueType {
            #[serde(rename = "BlockedFrameNavigation")]
            BlockedFrameNavigation,
            #[serde(rename = "BlockedSubresource")]
            BlockedSubresource,
            #[serde(rename = "NoisedCanvasReadback")]
            NoisedCanvasReadback,
        }
        impl AsRef<str> for UserReidentificationIssueType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::BlockedFrameNavigation => "BlockedFrameNavigation",
                    Self::BlockedSubresource => "BlockedSubresource",
                    Self::NoisedCanvasReadback => "NoisedCanvasReadback",
                }
            }
        }
        impl std::str::FromStr for UserReidentificationIssueType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "BlockedFrameNavigation" => Ok(Self::BlockedFrameNavigation),
                    "BlockedSubresource" => Ok(Self::BlockedSubresource),
                    "NoisedCanvasReadback" => Ok(Self::NoisedCanvasReadback),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for UserReidentificationIssueType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// This issue warns about uses of APIs that may be considered misuse to re-identify users.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UserReidentificationIssueDetails {
            pub type_: UserReidentificationIssueType,
            /// Applies to BlockedFrameNavigation and BlockedSubresource issue types.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request: Option<AffectedRequest>,
            /// Applies to NoisedCanvasReadback issue type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source_code_location: Option<SourceCodeLocation>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PermissionElementIssueType {
            #[serde(rename = "InvalidType")]
            InvalidType,
            #[serde(rename = "FencedFrameDisallowed")]
            FencedFrameDisallowed,
            #[serde(rename = "CspFrameAncestorsMissing")]
            CspFrameAncestorsMissing,
            #[serde(rename = "PermissionsPolicyBlocked")]
            PermissionsPolicyBlocked,
            #[serde(rename = "PaddingRightUnsupported")]
            PaddingRightUnsupported,
            #[serde(rename = "PaddingBottomUnsupported")]
            PaddingBottomUnsupported,
            #[serde(rename = "InsetBoxShadowUnsupported")]
            InsetBoxShadowUnsupported,
            #[serde(rename = "RequestInProgress")]
            RequestInProgress,
            #[serde(rename = "UntrustedEvent")]
            UntrustedEvent,
            #[serde(rename = "RegistrationFailed")]
            RegistrationFailed,
            #[serde(rename = "TypeNotSupported")]
            TypeNotSupported,
            #[serde(rename = "InvalidTypeActivation")]
            InvalidTypeActivation,
            #[serde(rename = "SecurityChecksFailed")]
            SecurityChecksFailed,
            #[serde(rename = "ActivationDisabled")]
            ActivationDisabled,
            #[serde(rename = "GeolocationDeprecated")]
            GeolocationDeprecated,
            #[serde(rename = "InvalidDisplayStyle")]
            InvalidDisplayStyle,
            #[serde(rename = "NonOpaqueColor")]
            NonOpaqueColor,
            #[serde(rename = "LowContrast")]
            LowContrast,
            #[serde(rename = "FontSizeTooSmall")]
            FontSizeTooSmall,
            #[serde(rename = "FontSizeTooLarge")]
            FontSizeTooLarge,
            #[serde(rename = "InvalidSizeValue")]
            InvalidSizeValue,
        }
        impl AsRef<str> for PermissionElementIssueType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::InvalidType => "InvalidType",
                    Self::FencedFrameDisallowed => "FencedFrameDisallowed",
                    Self::CspFrameAncestorsMissing => "CspFrameAncestorsMissing",
                    Self::PermissionsPolicyBlocked => "PermissionsPolicyBlocked",
                    Self::PaddingRightUnsupported => "PaddingRightUnsupported",
                    Self::PaddingBottomUnsupported => "PaddingBottomUnsupported",
                    Self::InsetBoxShadowUnsupported => "InsetBoxShadowUnsupported",
                    Self::RequestInProgress => "RequestInProgress",
                    Self::UntrustedEvent => "UntrustedEvent",
                    Self::RegistrationFailed => "RegistrationFailed",
                    Self::TypeNotSupported => "TypeNotSupported",
                    Self::InvalidTypeActivation => "InvalidTypeActivation",
                    Self::SecurityChecksFailed => "SecurityChecksFailed",
                    Self::ActivationDisabled => "ActivationDisabled",
                    Self::GeolocationDeprecated => "GeolocationDeprecated",
                    Self::InvalidDisplayStyle => "InvalidDisplayStyle",
                    Self::NonOpaqueColor => "NonOpaqueColor",
                    Self::LowContrast => "LowContrast",
                    Self::FontSizeTooSmall => "FontSizeTooSmall",
                    Self::FontSizeTooLarge => "FontSizeTooLarge",
                    Self::InvalidSizeValue => "InvalidSizeValue",
                }
            }
        }
        impl std::str::FromStr for PermissionElementIssueType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "InvalidType" => Ok(Self::InvalidType),
                    "FencedFrameDisallowed" => Ok(Self::FencedFrameDisallowed),
                    "CspFrameAncestorsMissing" => Ok(Self::CspFrameAncestorsMissing),
                    "PermissionsPolicyBlocked" => Ok(Self::PermissionsPolicyBlocked),
                    "PaddingRightUnsupported" => Ok(Self::PaddingRightUnsupported),
                    "PaddingBottomUnsupported" => Ok(Self::PaddingBottomUnsupported),
                    "InsetBoxShadowUnsupported" => Ok(Self::InsetBoxShadowUnsupported),
                    "RequestInProgress" => Ok(Self::RequestInProgress),
                    "UntrustedEvent" => Ok(Self::UntrustedEvent),
                    "RegistrationFailed" => Ok(Self::RegistrationFailed),
                    "TypeNotSupported" => Ok(Self::TypeNotSupported),
                    "InvalidTypeActivation" => Ok(Self::InvalidTypeActivation),
                    "SecurityChecksFailed" => Ok(Self::SecurityChecksFailed),
                    "ActivationDisabled" => Ok(Self::ActivationDisabled),
                    "GeolocationDeprecated" => Ok(Self::GeolocationDeprecated),
                    "InvalidDisplayStyle" => Ok(Self::InvalidDisplayStyle),
                    "NonOpaqueColor" => Ok(Self::NonOpaqueColor),
                    "LowContrast" => Ok(Self::LowContrast),
                    "FontSizeTooSmall" => Ok(Self::FontSizeTooSmall),
                    "FontSizeTooLarge" => Ok(Self::FontSizeTooLarge),
                    "InvalidSizeValue" => Ok(Self::InvalidSizeValue),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PermissionElementIssueType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// This issue warns about improper usage of the <permission> element.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PermissionElementIssueDetails {
            pub issue_type: PermissionElementIssueType,
            /// The value of the type attribute.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub type_: Option<String>,
            /// The node ID of the <permission> element.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::BackendNodeId>,
            /// True if the issue is a warning, false if it is an error.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_warning: Option<bool>,
            /// Fields for message construction: Used for messages that reference a specific permission name
            #[serde(skip_serializing_if = "Option::is_none")]
            pub permission_name: Option<String>,
            /// Used for messages about occlusion
            #[serde(skip_serializing_if = "Option::is_none")]
            pub occluder_node_info: Option<String>,
            /// Used for messages about occluder's parent
            #[serde(skip_serializing_if = "Option::is_none")]
            pub occluder_parent_node_info: Option<String>,
            /// Used for messages about activation disabled reason
            #[serde(skip_serializing_if = "Option::is_none")]
            pub disable_reason: Option<String>,
        }

        /// A unique identifier for the type of issue. Each type may use one of the optional fields in InspectorIssueDetails to convey more specific information about the kind of issue.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum InspectorIssueCode {
            #[serde(rename = "CookieIssue")]
            CookieIssue,
            #[serde(rename = "MixedContentIssue")]
            MixedContentIssue,
            #[serde(rename = "BlockedByResponseIssue")]
            BlockedByResponseIssue,
            #[serde(rename = "HeavyAdIssue")]
            HeavyAdIssue,
            #[serde(rename = "ContentSecurityPolicyIssue")]
            ContentSecurityPolicyIssue,
            #[serde(rename = "SharedArrayBufferIssue")]
            SharedArrayBufferIssue,
            #[serde(rename = "LowTextContrastIssue")]
            LowTextContrastIssue,
            #[serde(rename = "CorsIssue")]
            CorsIssue,
            #[serde(rename = "AttributionReportingIssue")]
            AttributionReportingIssue,
            #[serde(rename = "QuirksModeIssue")]
            QuirksModeIssue,
            #[serde(rename = "PartitioningBlobURLIssue")]
            PartitioningBlobUrlIssue,
            #[serde(rename = "NavigatorUserAgentIssue")]
            NavigatorUserAgentIssue,
            #[serde(rename = "GenericIssue")]
            GenericIssue,
            #[serde(rename = "DeprecationIssue")]
            DeprecationIssue,
            #[serde(rename = "ClientHintIssue")]
            ClientHintIssue,
            #[serde(rename = "FederatedAuthRequestIssue")]
            FederatedAuthRequestIssue,
            #[serde(rename = "BounceTrackingIssue")]
            BounceTrackingIssue,
            #[serde(rename = "CookieDeprecationMetadataIssue")]
            CookieDeprecationMetadataIssue,
            #[serde(rename = "StylesheetLoadingIssue")]
            StylesheetLoadingIssue,
            #[serde(rename = "FederatedAuthUserInfoRequestIssue")]
            FederatedAuthUserInfoRequestIssue,
            #[serde(rename = "PropertyRuleIssue")]
            PropertyRuleIssue,
            #[serde(rename = "SharedDictionaryIssue")]
            SharedDictionaryIssue,
            #[serde(rename = "ElementAccessibilityIssue")]
            ElementAccessibilityIssue,
            #[serde(rename = "SRIMessageSignatureIssue")]
            SriMessageSignatureIssue,
            #[serde(rename = "UnencodedDigestIssue")]
            UnencodedDigestIssue,
            #[serde(rename = "UserReidentificationIssue")]
            UserReidentificationIssue,
            #[serde(rename = "PermissionElementIssue")]
            PermissionElementIssue,
        }
        impl AsRef<str> for InspectorIssueCode {
            fn as_ref(&self) -> &str {
                match self {
                    Self::CookieIssue => "CookieIssue",
                    Self::MixedContentIssue => "MixedContentIssue",
                    Self::BlockedByResponseIssue => "BlockedByResponseIssue",
                    Self::HeavyAdIssue => "HeavyAdIssue",
                    Self::ContentSecurityPolicyIssue => "ContentSecurityPolicyIssue",
                    Self::SharedArrayBufferIssue => "SharedArrayBufferIssue",
                    Self::LowTextContrastIssue => "LowTextContrastIssue",
                    Self::CorsIssue => "CorsIssue",
                    Self::AttributionReportingIssue => "AttributionReportingIssue",
                    Self::QuirksModeIssue => "QuirksModeIssue",
                    Self::PartitioningBlobUrlIssue => "PartitioningBlobURLIssue",
                    Self::NavigatorUserAgentIssue => "NavigatorUserAgentIssue",
                    Self::GenericIssue => "GenericIssue",
                    Self::DeprecationIssue => "DeprecationIssue",
                    Self::ClientHintIssue => "ClientHintIssue",
                    Self::FederatedAuthRequestIssue => "FederatedAuthRequestIssue",
                    Self::BounceTrackingIssue => "BounceTrackingIssue",
                    Self::CookieDeprecationMetadataIssue => "CookieDeprecationMetadataIssue",
                    Self::StylesheetLoadingIssue => "StylesheetLoadingIssue",
                    Self::FederatedAuthUserInfoRequestIssue => "FederatedAuthUserInfoRequestIssue",
                    Self::PropertyRuleIssue => "PropertyRuleIssue",
                    Self::SharedDictionaryIssue => "SharedDictionaryIssue",
                    Self::ElementAccessibilityIssue => "ElementAccessibilityIssue",
                    Self::SriMessageSignatureIssue => "SRIMessageSignatureIssue",
                    Self::UnencodedDigestIssue => "UnencodedDigestIssue",
                    Self::UserReidentificationIssue => "UserReidentificationIssue",
                    Self::PermissionElementIssue => "PermissionElementIssue",
                }
            }
        }
        impl std::str::FromStr for InspectorIssueCode {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "CookieIssue" => Ok(Self::CookieIssue),
                    "MixedContentIssue" => Ok(Self::MixedContentIssue),
                    "BlockedByResponseIssue" => Ok(Self::BlockedByResponseIssue),
                    "HeavyAdIssue" => Ok(Self::HeavyAdIssue),
                    "ContentSecurityPolicyIssue" => Ok(Self::ContentSecurityPolicyIssue),
                    "SharedArrayBufferIssue" => Ok(Self::SharedArrayBufferIssue),
                    "LowTextContrastIssue" => Ok(Self::LowTextContrastIssue),
                    "CorsIssue" => Ok(Self::CorsIssue),
                    "AttributionReportingIssue" => Ok(Self::AttributionReportingIssue),
                    "QuirksModeIssue" => Ok(Self::QuirksModeIssue),
                    "PartitioningBlobURLIssue" => Ok(Self::PartitioningBlobUrlIssue),
                    "NavigatorUserAgentIssue" => Ok(Self::NavigatorUserAgentIssue),
                    "GenericIssue" => Ok(Self::GenericIssue),
                    "DeprecationIssue" => Ok(Self::DeprecationIssue),
                    "ClientHintIssue" => Ok(Self::ClientHintIssue),
                    "FederatedAuthRequestIssue" => Ok(Self::FederatedAuthRequestIssue),
                    "BounceTrackingIssue" => Ok(Self::BounceTrackingIssue),
                    "CookieDeprecationMetadataIssue" => Ok(Self::CookieDeprecationMetadataIssue),
                    "StylesheetLoadingIssue" => Ok(Self::StylesheetLoadingIssue),
                    "FederatedAuthUserInfoRequestIssue" => {
                        Ok(Self::FederatedAuthUserInfoRequestIssue)
                    }
                    "PropertyRuleIssue" => Ok(Self::PropertyRuleIssue),
                    "SharedDictionaryIssue" => Ok(Self::SharedDictionaryIssue),
                    "ElementAccessibilityIssue" => Ok(Self::ElementAccessibilityIssue),
                    "SRIMessageSignatureIssue" => Ok(Self::SriMessageSignatureIssue),
                    "UnencodedDigestIssue" => Ok(Self::UnencodedDigestIssue),
                    "UserReidentificationIssue" => Ok(Self::UserReidentificationIssue),
                    "PermissionElementIssue" => Ok(Self::PermissionElementIssue),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for InspectorIssueCode {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// This struct holds a list of optional fields with additional information specific to the kind of issue. When adding a new issue code, please also add a new optional field to this type.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InspectorIssueDetails {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cookie_issue_details: Option<CookieIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub mixed_content_issue_details: Option<MixedContentIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub blocked_by_response_issue_details: Option<BlockedByResponseIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub heavy_ad_issue_details: Option<HeavyAdIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_security_policy_issue_details: Option<ContentSecurityPolicyIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shared_array_buffer_issue_details: Option<SharedArrayBufferIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub low_text_contrast_issue_details: Option<LowTextContrastIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cors_issue_details: Option<CorsIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub attribution_reporting_issue_details: Option<AttributionReportingIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub quirks_mode_issue_details: Option<QuirksModeIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "partitioningBlobURLIssueDetails")]
            pub partitioning_blob_url_issue_details: Option<PartitioningBlobURLIssueDetails>,
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub navigator_user_agent_issue_details: Option<NavigatorUserAgentIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generic_issue_details: Option<GenericIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub deprecation_issue_details: Option<DeprecationIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub client_hint_issue_details: Option<ClientHintIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub federated_auth_request_issue_details: Option<FederatedAuthRequestIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub bounce_tracking_issue_details: Option<BounceTrackingIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cookie_deprecation_metadata_issue_details:
                Option<CookieDeprecationMetadataIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stylesheet_loading_issue_details: Option<StylesheetLoadingIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub property_rule_issue_details: Option<PropertyRuleIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub federated_auth_user_info_request_issue_details:
                Option<FederatedAuthUserInfoRequestIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shared_dictionary_issue_details: Option<SharedDictionaryIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub element_accessibility_issue_details: Option<ElementAccessibilityIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sri_message_signature_issue_details: Option<SRIMessageSignatureIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unencoded_digest_issue_details: Option<UnencodedDigestIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_reidentification_issue_details: Option<UserReidentificationIssueDetails>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub permission_element_issue_details: Option<PermissionElementIssueDetails>,
        }

        /// A unique id for a DevTools inspector issue. Allows other entities (e.g. exceptions, CDP message, console messages, etc.) to reference an issue.
        pub type IssueId = String;

        /// An inspector issue reported from the back-end.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InspectorIssue {
            pub code: InspectorIssueCode,
            pub details: InspectorIssueDetails,
            /// A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub issue_id: Option<IssueId>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetEncodedResponseResponse {
            /// The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON)
            pub body: Option<String>,
            /// Size before re-encoding.
            pub original_size: i64,
            /// Size after re-encoding.
            pub encoded_size: i64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CheckFormsIssuesResponse {
            pub form_issues: Vec<types::GenericIssueDetails>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetEncodedResponse {
            /// Identifier of the network request to get content for.
            pub request_id: network::types::RequestId,
            /// The encoding to use.
            pub encoding: String,
            /// The quality of the encoding (0-1). (defaults to 1)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub quality: Option<f64>,
            /// Whether to only return the size information (defaults to false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub size_only: Option<bool>,
        }

        impl GetEncodedResponse {
            pub fn new(request_id: network::types::RequestId, encoding: impl Into<String>) -> Self {
                Self {
                    request_id,
                    encoding: encoding.into(),
                    quality: None,
                    size_only: None,
                }
            }

            pub fn with_quality(mut self, quality: f64) -> Self {
                self.quality = Some(quality);
                self
            }

            pub fn with_size_only(mut self, size_only: bool) -> Self {
                self.size_only = Some(size_only);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetEncodedResponseResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetEncodedResponse {
            type Response = responses::GetEncodedResponseResponse;
            const METHOD: &'static str = "Audits.getEncodedResponse";
        }

        /// Disables issues domain, prevents further issues from being reported to the client.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Audits.disable";
        }

        /// Enables issues domain, sends the issues collected so far to the client by means of the `issueAdded` event.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Audits.enable";
        }

        /// Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CheckContrast {
            /// Whether to report WCAG AAA level issues. Default is false.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "reportAAA")]
            pub report_aaa: Option<bool>,
        }

        impl CheckContrast {
            pub fn new() -> Self {
                Self { report_aaa: None }
            }

            pub fn with_report_aaa(mut self, report_aaa: bool) -> Self {
                self.report_aaa = Some(report_aaa);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CheckContrast {
            type Response = ();
            const METHOD: &'static str = "Audits.checkContrast";
        }

        /// Runs the form issues check for the target page. Found issues are reported using Audits.issueAdded event.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CheckFormsIssues {}

        impl CheckFormsIssues {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CheckFormsIssuesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CheckFormsIssues {
            type Response = responses::CheckFormsIssuesResponse;
            const METHOD: &'static str = "Audits.checkFormsIssues";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct IssueAdded {
            pub issue: types::InspectorIssue,
        }

        impl IssueAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Audits.issueAdded")
            }
        }
    }
}

pub mod autofill {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreditCard {
            /// 16-digit credit card number.
            pub number: String,
            /// Name of the credit card owner.
            pub name: String,
            /// 2-digit expiry month.
            pub expiry_month: String,
            /// 4-digit expiry year.
            pub expiry_year: String,
            /// 3-digit card verification code.
            pub cvc: String,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddressField {
            /// address field name, for example GIVEN_NAME. The full list of supported field names: https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38
            pub name: String,
            /// address field value, for example Jon Doe.
            pub value: String,
        }

        /// A list of address fields.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddressFields {
            pub fields: Vec<AddressField>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Address {
            /// fields and values defining an address.
            pub fields: Vec<AddressField>,
        }

        /// Defines how an address can be displayed like in chrome://settings/addresses. Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such. The following address UI for instance: [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]] should allow the receiver to render: Jon Doe Munich 81456
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddressUI {
            /// A two dimension array containing the representation of values from an address profile.
            pub address_fields: Vec<AddressFields>,
        }

        /// Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum FillingStrategy {
            #[serde(rename = "autocompleteAttribute")]
            AutocompleteAttribute,
            #[serde(rename = "autofillInferred")]
            AutofillInferred,
        }
        impl AsRef<str> for FillingStrategy {
            fn as_ref(&self) -> &str {
                match self {
                    Self::AutocompleteAttribute => "autocompleteAttribute",
                    Self::AutofillInferred => "autofillInferred",
                }
            }
        }
        impl std::str::FromStr for FillingStrategy {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "autocompleteAttribute" => Ok(Self::AutocompleteAttribute),
                    "autofillInferred" => Ok(Self::AutofillInferred),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for FillingStrategy {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FilledField {
            /// The type of the field, e.g text, password etc.
            pub html_type: String,
            /// the html id
            pub id: String,
            /// the html name
            pub name: String,
            /// the field value
            pub value: String,
            /// The actual field type, e.g FAMILY_NAME
            pub autofill_type: String,
            /// The filling strategy
            pub filling_strategy: FillingStrategy,
            /// The frame the field belongs to
            pub frame_id: page::types::FrameId,
            /// The form field's DOM node
            pub field_id: dom::types::BackendNodeId,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Trigger {
            /// Identifies a field that serves as an anchor for autofill.
            pub field_id: dom::types::BackendNodeId,
            /// Identifies the frame that field belongs to.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
            /// Credit card information to fill out the form. Credit card data is not saved. Mutually exclusive with `address`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub card: Option<types::CreditCard>,
            /// Address to fill out the form. Address data is not saved. Mutually exclusive with `card`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub address: Option<types::Address>,
        }

        impl Trigger {
            pub fn new(field_id: dom::types::BackendNodeId) -> Self {
                Self {
                    field_id,
                    frame_id: None,
                    card: None,
                    address: None,
                }
            }

            pub fn with_frame_id(mut self, frame_id: page::types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }

            pub fn with_card(mut self, card: types::CreditCard) -> Self {
                self.card = Some(card);
                self
            }

            pub fn with_address(mut self, address: types::Address) -> Self {
                self.address = Some(address);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Trigger {
            type Response = ();
            const METHOD: &'static str = "Autofill.trigger";
        }

        /// Set addresses so that developers can verify their forms implementation.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAddresses {
            pub addresses: Vec<types::Address>,
        }

        impl SetAddresses {
            pub fn new(addresses: Vec<types::Address>) -> Self {
                Self { addresses }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAddresses {
            type Response = ();
            const METHOD: &'static str = "Autofill.setAddresses";
        }

        /// Disables autofill domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Autofill.disable";
        }

        /// Enables autofill domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Autofill.enable";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Emitted when an address form is filled.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddressFormFilled {
            /// Information about the fields that were filled
            pub filled_fields: Vec<types::FilledField>,
            /// An UI representation of the address used to fill the form. Consists of a 2D array where each child represents an address/profile line.
            pub address_ui: types::AddressUI,
        }

        impl AddressFormFilled {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Autofill.addressFormFilled")
            }
        }
    }
}

pub mod background_service {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// The Background Service that will be associated with the commands/events. Every Background Service operates independently, but they share the same API.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ServiceName {
            #[serde(rename = "backgroundFetch")]
            BackgroundFetch,
            #[serde(rename = "backgroundSync")]
            BackgroundSync,
            #[serde(rename = "pushMessaging")]
            PushMessaging,
            #[serde(rename = "notifications")]
            Notifications,
            #[serde(rename = "paymentHandler")]
            PaymentHandler,
            #[serde(rename = "periodicBackgroundSync")]
            PeriodicBackgroundSync,
        }
        impl AsRef<str> for ServiceName {
            fn as_ref(&self) -> &str {
                match self {
                    Self::BackgroundFetch => "backgroundFetch",
                    Self::BackgroundSync => "backgroundSync",
                    Self::PushMessaging => "pushMessaging",
                    Self::Notifications => "notifications",
                    Self::PaymentHandler => "paymentHandler",
                    Self::PeriodicBackgroundSync => "periodicBackgroundSync",
                }
            }
        }
        impl std::str::FromStr for ServiceName {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "backgroundFetch" => Ok(Self::BackgroundFetch),
                    "backgroundSync" => Ok(Self::BackgroundSync),
                    "pushMessaging" => Ok(Self::PushMessaging),
                    "notifications" => Ok(Self::Notifications),
                    "paymentHandler" => Ok(Self::PaymentHandler),
                    "periodicBackgroundSync" => Ok(Self::PeriodicBackgroundSync),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ServiceName {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// A key-value pair for additional event information to pass along.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EventMetadata {
            pub key: String,
            pub value: String,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BackgroundServiceEvent {
            /// Timestamp of the event (in seconds).
            pub timestamp: network::types::TimeSinceEpoch,
            /// The origin this event belongs to.
            pub origin: String,
            /// The Service Worker ID that initiated the event.
            pub service_worker_registration_id: serviceworker::types::RegistrationID,
            /// The Background Service this event belongs to.
            pub service: ServiceName,
            /// A description of the event.
            pub event_name: String,
            /// An identifier that groups related events together.
            pub instance_id: String,
            /// A list of event-specific information.
            pub event_metadata: Vec<EventMetadata>,
            /// Storage key this event belongs to.
            pub storage_key: String,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Enables event updates for the service.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartObserving {
            pub service: types::ServiceName,
        }

        impl StartObserving {
            pub fn new(service: types::ServiceName) -> Self {
                Self { service }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartObserving {
            type Response = ();
            const METHOD: &'static str = "BackgroundService.startObserving";
        }

        /// Disables event updates for the service.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopObserving {
            pub service: types::ServiceName,
        }

        impl StopObserving {
            pub fn new(service: types::ServiceName) -> Self {
                Self { service }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopObserving {
            type Response = ();
            const METHOD: &'static str = "BackgroundService.stopObserving";
        }

        /// Set the recording state for the service.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetRecording {
            pub should_record: bool,
            pub service: types::ServiceName,
        }

        impl SetRecording {
            pub fn new(should_record: bool, service: types::ServiceName) -> Self {
                Self {
                    should_record,
                    service,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetRecording {
            type Response = ();
            const METHOD: &'static str = "BackgroundService.setRecording";
        }

        /// Clears all stored data for the service.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearEvents {
            pub service: types::ServiceName,
        }

        impl ClearEvents {
            pub fn new(service: types::ServiceName) -> Self {
                Self { service }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearEvents {
            type Response = ();
            const METHOD: &'static str = "BackgroundService.clearEvents";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Called when the recording state for the service has been updated.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RecordingStateChanged {
            pub is_recording: bool,
            pub service: types::ServiceName,
        }

        impl RecordingStateChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("BackgroundService.recordingStateChanged")
            }
        }

        /// Called with all existing backgroundServiceEvents when enabled, and all new events afterwards if enabled and recording.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BackgroundServiceEventReceived {
            pub background_service_event: types::BackgroundServiceEvent,
        }

        impl BackgroundServiceEventReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("BackgroundService.backgroundServiceEventReceived")
            }
        }
    }
}

pub mod bluetooth_emulation {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Indicates the various states of Central.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CentralState {
            #[serde(rename = "absent")]
            Absent,
            #[serde(rename = "powered-off")]
            PoweredOff,
            #[serde(rename = "powered-on")]
            PoweredOn,
        }
        impl AsRef<str> for CentralState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Absent => "absent",
                    Self::PoweredOff => "powered-off",
                    Self::PoweredOn => "powered-on",
                }
            }
        }
        impl std::str::FromStr for CentralState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "absent" => Ok(Self::Absent),
                    "powered-off" => Ok(Self::PoweredOff),
                    "powered-on" => Ok(Self::PoweredOn),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CentralState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Indicates the various types of GATT event.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum GATTOperationType {
            #[serde(rename = "connection")]
            Connection,
            #[serde(rename = "discovery")]
            Discovery,
        }
        impl AsRef<str> for GATTOperationType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Connection => "connection",
                    Self::Discovery => "discovery",
                }
            }
        }
        impl std::str::FromStr for GATTOperationType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "connection" => Ok(Self::Connection),
                    "discovery" => Ok(Self::Discovery),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for GATTOperationType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Indicates the various types of characteristic write.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CharacteristicWriteType {
            #[serde(rename = "write-default-deprecated")]
            WriteDefaultDeprecated,
            #[serde(rename = "write-with-response")]
            WriteWithResponse,
            #[serde(rename = "write-without-response")]
            WriteWithoutResponse,
        }
        impl AsRef<str> for CharacteristicWriteType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::WriteDefaultDeprecated => "write-default-deprecated",
                    Self::WriteWithResponse => "write-with-response",
                    Self::WriteWithoutResponse => "write-without-response",
                }
            }
        }
        impl std::str::FromStr for CharacteristicWriteType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "write-default-deprecated" => Ok(Self::WriteDefaultDeprecated),
                    "write-with-response" => Ok(Self::WriteWithResponse),
                    "write-without-response" => Ok(Self::WriteWithoutResponse),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CharacteristicWriteType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Indicates the various types of characteristic operation.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CharacteristicOperationType {
            #[serde(rename = "read")]
            Read,
            #[serde(rename = "write")]
            Write,
            #[serde(rename = "subscribe-to-notifications")]
            SubscribeToNotifications,
            #[serde(rename = "unsubscribe-from-notifications")]
            UnsubscribeFromNotifications,
        }
        impl AsRef<str> for CharacteristicOperationType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Read => "read",
                    Self::Write => "write",
                    Self::SubscribeToNotifications => "subscribe-to-notifications",
                    Self::UnsubscribeFromNotifications => "unsubscribe-from-notifications",
                }
            }
        }
        impl std::str::FromStr for CharacteristicOperationType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "read" => Ok(Self::Read),
                    "write" => Ok(Self::Write),
                    "subscribe-to-notifications" => Ok(Self::SubscribeToNotifications),
                    "unsubscribe-from-notifications" => Ok(Self::UnsubscribeFromNotifications),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CharacteristicOperationType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Indicates the various types of descriptor operation.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DescriptorOperationType {
            #[serde(rename = "read")]
            Read,
            #[serde(rename = "write")]
            Write,
        }
        impl AsRef<str> for DescriptorOperationType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Read => "read",
                    Self::Write => "write",
                }
            }
        }
        impl std::str::FromStr for DescriptorOperationType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "read" => Ok(Self::Read),
                    "write" => Ok(Self::Write),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DescriptorOperationType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Stores the manufacturer data
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ManufacturerData {
            /// Company identifier https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml https://usb.org/developers
            pub key: i64,
            /// Manufacturer-specific data (Encoded as a base64 string when passed over JSON)
            pub data: String,
        }

        /// Stores the byte data of the advertisement packet sent by a Bluetooth device.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScanRecord {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub uuids: Option<Vec<String>>,
            /// Stores the external appearance description of the device.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub appearance: Option<i64>,
            /// Stores the transmission power of a broadcasting device.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tx_power: Option<i64>,
            /// Key is the company identifier and the value is an array of bytes of manufacturer specific data.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub manufacturer_data: Option<Vec<ManufacturerData>>,
        }

        /// Stores the advertisement packet information that is sent by a Bluetooth device.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScanEntry {
            pub device_address: String,
            pub rssi: i64,
            pub scan_record: ScanRecord,
        }

        /// Describes the properties of a characteristic. This follows Bluetooth Core Specification BT 4.2 Vol 3 Part G 3.3.1. Characteristic Properties.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CharacteristicProperties {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub broadcast: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub read: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub write_without_response: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub write: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub notify: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub indicate: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub authenticated_signed_writes: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub extended_properties: Option<bool>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddServiceResponse {
            /// An identifier that uniquely represents this service.
            pub service_id: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddCharacteristicResponse {
            /// An identifier that uniquely represents this characteristic.
            pub characteristic_id: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddDescriptorResponse {
            /// An identifier that uniquely represents this descriptor.
            pub descriptor_id: String,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Enable the BluetoothEmulation domain.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// State of the simulated central.
            pub state: types::CentralState,
            /// If the simulated central supports low-energy.
            pub le_supported: bool,
        }

        impl Enable {
            pub fn new(state: types::CentralState, le_supported: bool) -> Self {
                Self {
                    state,
                    le_supported,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.enable";
        }

        /// Set the state of the simulated central.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSimulatedCentralState {
            /// State of the simulated central.
            pub state: types::CentralState,
        }

        impl SetSimulatedCentralState {
            pub fn new(state: types::CentralState) -> Self {
                Self { state }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSimulatedCentralState {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.setSimulatedCentralState";
        }

        /// Disable the BluetoothEmulation domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.disable";
        }

        /// Simulates a peripheral with |address|, |name| and |knownServiceUuids| that has already been connected to the system.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SimulatePreconnectedPeripheral {
            pub address: String,
            pub name: String,
            pub manufacturer_data: Vec<types::ManufacturerData>,
            pub known_service_uuids: Vec<String>,
        }

        impl SimulatePreconnectedPeripheral {
            pub fn new(
                address: impl Into<String>,
                name: impl Into<String>,
                manufacturer_data: Vec<types::ManufacturerData>,
                known_service_uuids: Vec<String>,
            ) -> Self {
                Self {
                    address: address.into(),
                    name: name.into(),
                    manufacturer_data,
                    known_service_uuids,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SimulatePreconnectedPeripheral {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.simulatePreconnectedPeripheral";
        }

        /// Simulates an advertisement packet described in |entry| being received by the central.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SimulateAdvertisement {
            pub entry: types::ScanEntry,
        }

        impl SimulateAdvertisement {
            pub fn new(entry: types::ScanEntry) -> Self {
                Self { entry }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SimulateAdvertisement {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.simulateAdvertisement";
        }

        /// Simulates the response code from the peripheral with |address| for a GATT operation of |type|. The |code| value follows the HCI Error Codes from Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SimulateGattOperationResponse {
            pub address: String,
            pub type_: types::GATTOperationType,
            pub code: i64,
        }

        impl SimulateGattOperationResponse {
            pub fn new(
                address: impl Into<String>,
                type_: types::GATTOperationType,
                code: i64,
            ) -> Self {
                Self {
                    address: address.into(),
                    type_,
                    code,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SimulateGattOperationResponse {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.simulateGATTOperationResponse";
        }

        /// Simulates the response from the characteristic with |characteristicId| for a characteristic operation of |type|. The |code| value follows the Error Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The |data| is expected to exist when simulating a successful read operation response.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SimulateCharacteristicOperationResponse {
            pub characteristic_id: String,
            pub type_: types::CharacteristicOperationType,
            pub code: i64,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub data: Option<String>,
        }

        impl SimulateCharacteristicOperationResponse {
            pub fn new(
                characteristic_id: impl Into<String>,
                type_: types::CharacteristicOperationType,
                code: i64,
            ) -> Self {
                Self {
                    characteristic_id: characteristic_id.into(),
                    type_,
                    code,
                    data: None,
                }
            }

            pub fn with_data(mut self, data: impl Into<String>) -> Self {
                self.data = Some(data.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SimulateCharacteristicOperationResponse {
            type Response = ();
            const METHOD: &'static str =
                "BluetoothEmulation.simulateCharacteristicOperationResponse";
        }

        /// Simulates the response from the descriptor with |descriptorId| for a descriptor operation of |type|. The |code| value follows the Error Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The |data| is expected to exist when simulating a successful read operation response.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SimulateDescriptorOperationResponse {
            pub descriptor_id: String,
            pub type_: types::DescriptorOperationType,
            pub code: i64,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub data: Option<String>,
        }

        impl SimulateDescriptorOperationResponse {
            pub fn new(
                descriptor_id: impl Into<String>,
                type_: types::DescriptorOperationType,
                code: i64,
            ) -> Self {
                Self {
                    descriptor_id: descriptor_id.into(),
                    type_,
                    code,
                    data: None,
                }
            }

            pub fn with_data(mut self, data: impl Into<String>) -> Self {
                self.data = Some(data.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SimulateDescriptorOperationResponse {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.simulateDescriptorOperationResponse";
        }

        /// Adds a service with |serviceUuid| to the peripheral with |address|.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddService {
            pub address: String,
            pub service_uuid: String,
        }

        impl AddService {
            pub fn new(address: impl Into<String>, service_uuid: impl Into<String>) -> Self {
                Self {
                    address: address.into(),
                    service_uuid: service_uuid.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddServiceResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddService {
            type Response = responses::AddServiceResponse;
            const METHOD: &'static str = "BluetoothEmulation.addService";
        }

        /// Removes the service respresented by |serviceId| from the simulated central.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveService {
            pub service_id: String,
        }

        impl RemoveService {
            pub fn new(service_id: impl Into<String>) -> Self {
                Self {
                    service_id: service_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveService {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.removeService";
        }

        /// Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId|.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddCharacteristic {
            pub service_id: String,
            pub characteristic_uuid: String,
            pub properties: types::CharacteristicProperties,
        }

        impl AddCharacteristic {
            pub fn new(
                service_id: impl Into<String>,
                characteristic_uuid: impl Into<String>,
                properties: types::CharacteristicProperties,
            ) -> Self {
                Self {
                    service_id: service_id.into(),
                    characteristic_uuid: characteristic_uuid.into(),
                    properties,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddCharacteristicResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddCharacteristic {
            type Response = responses::AddCharacteristicResponse;
            const METHOD: &'static str = "BluetoothEmulation.addCharacteristic";
        }

        /// Removes the characteristic respresented by |characteristicId| from the simulated central.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveCharacteristic {
            pub characteristic_id: String,
        }

        impl RemoveCharacteristic {
            pub fn new(characteristic_id: impl Into<String>) -> Self {
                Self {
                    characteristic_id: characteristic_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveCharacteristic {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.removeCharacteristic";
        }

        /// Adds a descriptor with |descriptorUuid| to the characteristic respresented by |characteristicId|.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddDescriptor {
            pub characteristic_id: String,
            pub descriptor_uuid: String,
        }

        impl AddDescriptor {
            pub fn new(
                characteristic_id: impl Into<String>,
                descriptor_uuid: impl Into<String>,
            ) -> Self {
                Self {
                    characteristic_id: characteristic_id.into(),
                    descriptor_uuid: descriptor_uuid.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddDescriptorResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddDescriptor {
            type Response = responses::AddDescriptorResponse;
            const METHOD: &'static str = "BluetoothEmulation.addDescriptor";
        }

        /// Removes the descriptor with |descriptorId| from the simulated central.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveDescriptor {
            pub descriptor_id: String,
        }

        impl RemoveDescriptor {
            pub fn new(descriptor_id: impl Into<String>) -> Self {
                Self {
                    descriptor_id: descriptor_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveDescriptor {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.removeDescriptor";
        }

        /// Simulates a GATT disconnection from the peripheral with |address|.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SimulateGattDisconnection {
            pub address: String,
        }

        impl SimulateGattDisconnection {
            pub fn new(address: impl Into<String>) -> Self {
                Self {
                    address: address.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SimulateGattDisconnection {
            type Response = ();
            const METHOD: &'static str = "BluetoothEmulation.simulateGATTDisconnection";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Event for when a GATT operation of |type| to the peripheral with |address| happened.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GattOperationReceived {
            pub address: String,
            pub type_: types::GATTOperationType,
        }

        impl GattOperationReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("BluetoothEmulation.gattOperationReceived")
            }
        }

        /// Event for when a characteristic operation of |type| to the characteristic respresented by |characteristicId| happened. |data| and |writeType| is expected to exist when |type| is write.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CharacteristicOperationReceived {
            pub characteristic_id: String,
            pub type_: types::CharacteristicOperationType,
            pub data: Option<String>,
            pub write_type: Option<types::CharacteristicWriteType>,
        }

        impl CharacteristicOperationReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("BluetoothEmulation.characteristicOperationReceived")
            }
        }

        /// Event for when a descriptor operation of |type| to the descriptor respresented by |descriptorId| happened. |data| is expected to exist when |type| is write.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DescriptorOperationReceived {
            pub descriptor_id: String,
            pub type_: types::DescriptorOperationType,
            pub data: Option<String>,
        }

        impl DescriptorOperationReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("BluetoothEmulation.descriptorOperationReceived")
            }
        }
    }
}

pub mod browser {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type BrowserContextID = String;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type WindowID = i64;

        /// The state of the browser window.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum WindowState {
            #[serde(rename = "normal")]
            Normal,
            #[serde(rename = "minimized")]
            Minimized,
            #[serde(rename = "maximized")]
            Maximized,
            #[serde(rename = "fullscreen")]
            Fullscreen,
        }
        impl AsRef<str> for WindowState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Normal => "normal",
                    Self::Minimized => "minimized",
                    Self::Maximized => "maximized",
                    Self::Fullscreen => "fullscreen",
                }
            }
        }
        impl std::str::FromStr for WindowState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "normal" => Ok(Self::Normal),
                    "minimized" => Ok(Self::Minimized),
                    "maximized" => Ok(Self::Maximized),
                    "fullscreen" => Ok(Self::Fullscreen),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for WindowState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Browser window bounds information
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Bounds {
            /// The offset from the left edge of the screen to the window in pixels.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub left: Option<i64>,
            /// The offset from the top edge of the screen to the window in pixels.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub top: Option<i64>,
            /// The window width in pixels.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub width: Option<i64>,
            /// The window height in pixels.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub height: Option<i64>,
            /// The window state. Default to normal.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub window_state: Option<WindowState>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PermissionType {
            #[serde(rename = "ar")]
            Ar,
            #[serde(rename = "audioCapture")]
            AudioCapture,
            #[serde(rename = "automaticFullscreen")]
            AutomaticFullscreen,
            #[serde(rename = "backgroundFetch")]
            BackgroundFetch,
            #[serde(rename = "backgroundSync")]
            BackgroundSync,
            #[serde(rename = "cameraPanTiltZoom")]
            CameraPanTiltZoom,
            #[serde(rename = "capturedSurfaceControl")]
            CapturedSurfaceControl,
            #[serde(rename = "clipboardReadWrite")]
            ClipboardReadWrite,
            #[serde(rename = "clipboardSanitizedWrite")]
            ClipboardSanitizedWrite,
            #[serde(rename = "displayCapture")]
            DisplayCapture,
            #[serde(rename = "durableStorage")]
            DurableStorage,
            #[serde(rename = "geolocation")]
            Geolocation,
            #[serde(rename = "handTracking")]
            HandTracking,
            #[serde(rename = "idleDetection")]
            IdleDetection,
            #[serde(rename = "keyboardLock")]
            KeyboardLock,
            #[serde(rename = "localFonts")]
            LocalFonts,
            #[serde(rename = "localNetwork")]
            LocalNetwork,
            #[serde(rename = "localNetworkAccess")]
            LocalNetworkAccess,
            #[serde(rename = "loopbackNetwork")]
            LoopbackNetwork,
            #[serde(rename = "midi")]
            Midi,
            #[serde(rename = "midiSysex")]
            MidiSysex,
            #[serde(rename = "nfc")]
            Nfc,
            #[serde(rename = "notifications")]
            Notifications,
            #[serde(rename = "paymentHandler")]
            PaymentHandler,
            #[serde(rename = "periodicBackgroundSync")]
            PeriodicBackgroundSync,
            #[serde(rename = "pointerLock")]
            PointerLock,
            #[serde(rename = "protectedMediaIdentifier")]
            ProtectedMediaIdentifier,
            #[serde(rename = "sensors")]
            Sensors,
            #[serde(rename = "smartCard")]
            SmartCard,
            #[serde(rename = "speakerSelection")]
            SpeakerSelection,
            #[serde(rename = "storageAccess")]
            StorageAccess,
            #[serde(rename = "topLevelStorageAccess")]
            TopLevelStorageAccess,
            #[serde(rename = "videoCapture")]
            VideoCapture,
            #[serde(rename = "vr")]
            Vr,
            #[serde(rename = "wakeLockScreen")]
            WakeLockScreen,
            #[serde(rename = "wakeLockSystem")]
            WakeLockSystem,
            #[serde(rename = "webAppInstallation")]
            WebAppInstallation,
            #[serde(rename = "webPrinting")]
            WebPrinting,
            #[serde(rename = "windowManagement")]
            WindowManagement,
        }
        impl AsRef<str> for PermissionType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Ar => "ar",
                    Self::AudioCapture => "audioCapture",
                    Self::AutomaticFullscreen => "automaticFullscreen",
                    Self::BackgroundFetch => "backgroundFetch",
                    Self::BackgroundSync => "backgroundSync",
                    Self::CameraPanTiltZoom => "cameraPanTiltZoom",
                    Self::CapturedSurfaceControl => "capturedSurfaceControl",
                    Self::ClipboardReadWrite => "clipboardReadWrite",
                    Self::ClipboardSanitizedWrite => "clipboardSanitizedWrite",
                    Self::DisplayCapture => "displayCapture",
                    Self::DurableStorage => "durableStorage",
                    Self::Geolocation => "geolocation",
                    Self::HandTracking => "handTracking",
                    Self::IdleDetection => "idleDetection",
                    Self::KeyboardLock => "keyboardLock",
                    Self::LocalFonts => "localFonts",
                    Self::LocalNetwork => "localNetwork",
                    Self::LocalNetworkAccess => "localNetworkAccess",
                    Self::LoopbackNetwork => "loopbackNetwork",
                    Self::Midi => "midi",
                    Self::MidiSysex => "midiSysex",
                    Self::Nfc => "nfc",
                    Self::Notifications => "notifications",
                    Self::PaymentHandler => "paymentHandler",
                    Self::PeriodicBackgroundSync => "periodicBackgroundSync",
                    Self::PointerLock => "pointerLock",
                    Self::ProtectedMediaIdentifier => "protectedMediaIdentifier",
                    Self::Sensors => "sensors",
                    Self::SmartCard => "smartCard",
                    Self::SpeakerSelection => "speakerSelection",
                    Self::StorageAccess => "storageAccess",
                    Self::TopLevelStorageAccess => "topLevelStorageAccess",
                    Self::VideoCapture => "videoCapture",
                    Self::Vr => "vr",
                    Self::WakeLockScreen => "wakeLockScreen",
                    Self::WakeLockSystem => "wakeLockSystem",
                    Self::WebAppInstallation => "webAppInstallation",
                    Self::WebPrinting => "webPrinting",
                    Self::WindowManagement => "windowManagement",
                }
            }
        }
        impl std::str::FromStr for PermissionType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "ar" => Ok(Self::Ar),
                    "audioCapture" => Ok(Self::AudioCapture),
                    "automaticFullscreen" => Ok(Self::AutomaticFullscreen),
                    "backgroundFetch" => Ok(Self::BackgroundFetch),
                    "backgroundSync" => Ok(Self::BackgroundSync),
                    "cameraPanTiltZoom" => Ok(Self::CameraPanTiltZoom),
                    "capturedSurfaceControl" => Ok(Self::CapturedSurfaceControl),
                    "clipboardReadWrite" => Ok(Self::ClipboardReadWrite),
                    "clipboardSanitizedWrite" => Ok(Self::ClipboardSanitizedWrite),
                    "displayCapture" => Ok(Self::DisplayCapture),
                    "durableStorage" => Ok(Self::DurableStorage),
                    "geolocation" => Ok(Self::Geolocation),
                    "handTracking" => Ok(Self::HandTracking),
                    "idleDetection" => Ok(Self::IdleDetection),
                    "keyboardLock" => Ok(Self::KeyboardLock),
                    "localFonts" => Ok(Self::LocalFonts),
                    "localNetwork" => Ok(Self::LocalNetwork),
                    "localNetworkAccess" => Ok(Self::LocalNetworkAccess),
                    "loopbackNetwork" => Ok(Self::LoopbackNetwork),
                    "midi" => Ok(Self::Midi),
                    "midiSysex" => Ok(Self::MidiSysex),
                    "nfc" => Ok(Self::Nfc),
                    "notifications" => Ok(Self::Notifications),
                    "paymentHandler" => Ok(Self::PaymentHandler),
                    "periodicBackgroundSync" => Ok(Self::PeriodicBackgroundSync),
                    "pointerLock" => Ok(Self::PointerLock),
                    "protectedMediaIdentifier" => Ok(Self::ProtectedMediaIdentifier),
                    "sensors" => Ok(Self::Sensors),
                    "smartCard" => Ok(Self::SmartCard),
                    "speakerSelection" => Ok(Self::SpeakerSelection),
                    "storageAccess" => Ok(Self::StorageAccess),
                    "topLevelStorageAccess" => Ok(Self::TopLevelStorageAccess),
                    "videoCapture" => Ok(Self::VideoCapture),
                    "vr" => Ok(Self::Vr),
                    "wakeLockScreen" => Ok(Self::WakeLockScreen),
                    "wakeLockSystem" => Ok(Self::WakeLockSystem),
                    "webAppInstallation" => Ok(Self::WebAppInstallation),
                    "webPrinting" => Ok(Self::WebPrinting),
                    "windowManagement" => Ok(Self::WindowManagement),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PermissionType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PermissionSetting {
            #[serde(rename = "granted")]
            Granted,
            #[serde(rename = "denied")]
            Denied,
            #[serde(rename = "prompt")]
            Prompt,
        }
        impl AsRef<str> for PermissionSetting {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Granted => "granted",
                    Self::Denied => "denied",
                    Self::Prompt => "prompt",
                }
            }
        }
        impl std::str::FromStr for PermissionSetting {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "granted" => Ok(Self::Granted),
                    "denied" => Ok(Self::Denied),
                    "prompt" => Ok(Self::Prompt),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PermissionSetting {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Definition of PermissionDescriptor defined in the Permissions API: https://w3c.github.io/permissions/#dom-permissiondescriptor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PermissionDescriptor {
            /// Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
            pub name: String,
            /// For "midi" permission, may also specify sysex control.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sysex: Option<bool>,
            /// For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_visible_only: Option<bool>,
            /// For "clipboard" permission, may specify allowWithoutSanitization.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub allow_without_sanitization: Option<bool>,
            /// For "fullscreen" permission, must specify allowWithoutGesture:true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub allow_without_gesture: Option<bool>,
            /// For "camera" permission, may specify panTiltZoom.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pan_tilt_zoom: Option<bool>,
        }

        /// Browser command ids used by executeBrowserCommand.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum BrowserCommandId {
            #[serde(rename = "openTabSearch")]
            OpenTabSearch,
            #[serde(rename = "closeTabSearch")]
            CloseTabSearch,
            #[serde(rename = "openGlic")]
            OpenGlic,
        }
        impl AsRef<str> for BrowserCommandId {
            fn as_ref(&self) -> &str {
                match self {
                    Self::OpenTabSearch => "openTabSearch",
                    Self::CloseTabSearch => "closeTabSearch",
                    Self::OpenGlic => "openGlic",
                }
            }
        }
        impl std::str::FromStr for BrowserCommandId {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "openTabSearch" => Ok(Self::OpenTabSearch),
                    "closeTabSearch" => Ok(Self::CloseTabSearch),
                    "openGlic" => Ok(Self::OpenGlic),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for BrowserCommandId {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Chrome histogram bucket.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Bucket {
            /// Minimum value (inclusive).
            pub low: i64,
            /// Maximum value (exclusive).
            pub high: i64,
            /// Number of samples.
            pub count: i64,
        }

        /// Chrome histogram.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Histogram {
            /// Name.
            pub name: String,
            /// Sum of sample values.
            pub sum: i64,
            /// Total number of samples.
            pub count: i64,
            /// Buckets.
            pub buckets: Vec<Bucket>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PrivacySandboxAPI {
            #[serde(rename = "BiddingAndAuctionServices")]
            BiddingAndAuctionServices,
            #[serde(rename = "TrustedKeyValue")]
            TrustedKeyValue,
        }
        impl AsRef<str> for PrivacySandboxAPI {
            fn as_ref(&self) -> &str {
                match self {
                    Self::BiddingAndAuctionServices => "BiddingAndAuctionServices",
                    Self::TrustedKeyValue => "TrustedKeyValue",
                }
            }
        }
        impl std::str::FromStr for PrivacySandboxAPI {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "BiddingAndAuctionServices" => Ok(Self::BiddingAndAuctionServices),
                    "TrustedKeyValue" => Ok(Self::TrustedKeyValue),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PrivacySandboxAPI {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetVersionResponse {
            /// Protocol version.
            pub protocol_version: String,
            /// Product name.
            pub product: String,
            /// Product revision.
            pub revision: String,
            /// User-Agent.
            pub user_agent: String,
            /// V8 version.
            pub js_version: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBrowserCommandLineResponse {
            /// Commandline parameters
            pub arguments: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHistogramsResponse {
            /// Histograms.
            pub histograms: Vec<types::Histogram>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHistogramResponse {
            /// Histogram.
            pub histogram: types::Histogram,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetWindowBoundsResponse {
            /// Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
            pub bounds: types::Bounds,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetWindowForTargetResponse {
            /// Browser window id.
            pub window_id: types::WindowID,
            /// Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
            pub bounds: types::Bounds,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Set permission settings for given embedding and embedded origins.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPermission {
            /// Descriptor of permission to override.
            pub permission: types::PermissionDescriptor,
            /// Setting of the permission.
            pub setting: types::PermissionSetting,
            /// Embedding origin the permission applies to, all origins if not specified.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub origin: Option<String>,
            /// Embedded origin the permission applies to. It is ignored unless the embedding origin is present and valid. If the embedding origin is provided but the embedded origin isn't, the embedding origin is used as the embedded origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub embedded_origin: Option<String>,
            /// Context to override. When omitted, default browser context is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<types::BrowserContextID>,
        }

        impl SetPermission {
            pub fn new(
                permission: types::PermissionDescriptor,
                setting: types::PermissionSetting,
            ) -> Self {
                Self {
                    permission,
                    setting,
                    origin: None,
                    embedded_origin: None,
                    browser_context_id: None,
                }
            }

            pub fn with_origin(mut self, origin: impl Into<String>) -> Self {
                self.origin = Some(origin.into());
                self
            }

            pub fn with_embedded_origin(mut self, embedded_origin: impl Into<String>) -> Self {
                self.embedded_origin = Some(embedded_origin.into());
                self
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPermission {
            type Response = ();
            const METHOD: &'static str = "Browser.setPermission";
        }

        /// Grant specific permissions to the given origin and reject all others. Deprecated. Use setPermission instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GrantPermissions {
            pub permissions: Vec<types::PermissionType>,
            /// Origin the permission applies to, all origins if not specified.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub origin: Option<String>,
            /// BrowserContext to override permissions. When omitted, default browser context is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<types::BrowserContextID>,
        }

        impl GrantPermissions {
            pub fn new(permissions: Vec<types::PermissionType>) -> Self {
                Self {
                    permissions,
                    origin: None,
                    browser_context_id: None,
                }
            }

            pub fn with_origin(mut self, origin: impl Into<String>) -> Self {
                self.origin = Some(origin.into());
                self
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GrantPermissions {
            type Response = ();
            const METHOD: &'static str = "Browser.grantPermissions";
        }

        /// Reset all permission management for all origins.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResetPermissions {
            /// BrowserContext to reset permissions. When omitted, default browser context is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<types::BrowserContextID>,
        }

        impl ResetPermissions {
            pub fn new() -> Self {
                Self {
                    browser_context_id: None,
                }
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResetPermissions {
            type Response = ();
            const METHOD: &'static str = "Browser.resetPermissions";
        }

        /// Set the behavior when downloading a file.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDownloadBehavior {
            /// Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.
            pub behavior: String,
            /// BrowserContext to set download behavior. When omitted, default browser context is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<types::BrowserContextID>,
            /// The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub download_path: Option<String>,
            /// Whether to emit download events (defaults to false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub events_enabled: Option<bool>,
        }

        impl SetDownloadBehavior {
            pub fn new(behavior: impl Into<String>) -> Self {
                Self {
                    behavior: behavior.into(),
                    browser_context_id: None,
                    download_path: None,
                    events_enabled: None,
                }
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }

            pub fn with_download_path(mut self, download_path: impl Into<String>) -> Self {
                self.download_path = Some(download_path.into());
                self
            }

            pub fn with_events_enabled(mut self, events_enabled: bool) -> Self {
                self.events_enabled = Some(events_enabled);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDownloadBehavior {
            type Response = ();
            const METHOD: &'static str = "Browser.setDownloadBehavior";
        }

        /// Cancel a download if in progress
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CancelDownload {
            /// Global unique identifier of the download.
            pub guid: String,
            /// BrowserContext to perform the action in. When omitted, default browser context is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<types::BrowserContextID>,
        }

        impl CancelDownload {
            pub fn new(guid: impl Into<String>) -> Self {
                Self {
                    guid: guid.into(),
                    browser_context_id: None,
                }
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CancelDownload {
            type Response = ();
            const METHOD: &'static str = "Browser.cancelDownload";
        }

        /// Close browser gracefully.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Close {}

        impl Close {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Close {
            type Response = ();
            const METHOD: &'static str = "Browser.close";
        }

        /// Crashes browser on the main thread.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Crash {}

        impl Crash {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Crash {
            type Response = ();
            const METHOD: &'static str = "Browser.crash";
        }

        /// Crashes GPU process.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CrashGpuProcess {}

        impl CrashGpuProcess {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CrashGpuProcess {
            type Response = ();
            const METHOD: &'static str = "Browser.crashGpuProcess";
        }

        /// Returns version information.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetVersion {}

        impl GetVersion {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetVersionResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetVersion {
            type Response = responses::GetVersionResponse;
            const METHOD: &'static str = "Browser.getVersion";
        }

        /// Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBrowserCommandLine {}

        impl GetBrowserCommandLine {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetBrowserCommandLineResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetBrowserCommandLine {
            type Response = responses::GetBrowserCommandLineResponse;
            const METHOD: &'static str = "Browser.getBrowserCommandLine";
        }

        /// Get Chrome histograms.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHistograms {
            /// Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub query: Option<String>,
            /// If true, retrieve delta since last delta call.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub delta: Option<bool>,
        }

        impl GetHistograms {
            pub fn new() -> Self {
                Self {
                    query: None,
                    delta: None,
                }
            }

            pub fn with_query(mut self, query: impl Into<String>) -> Self {
                self.query = Some(query.into());
                self
            }

            pub fn with_delta(mut self, delta: bool) -> Self {
                self.delta = Some(delta);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetHistogramsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetHistograms {
            type Response = responses::GetHistogramsResponse;
            const METHOD: &'static str = "Browser.getHistograms";
        }

        /// Get a Chrome histogram by name.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHistogram {
            /// Requested histogram name.
            pub name: String,
            /// If true, retrieve delta since last delta call.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub delta: Option<bool>,
        }

        impl GetHistogram {
            pub fn new(name: impl Into<String>) -> Self {
                Self {
                    name: name.into(),
                    delta: None,
                }
            }

            pub fn with_delta(mut self, delta: bool) -> Self {
                self.delta = Some(delta);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetHistogramResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetHistogram {
            type Response = responses::GetHistogramResponse;
            const METHOD: &'static str = "Browser.getHistogram";
        }

        /// Get position and size of the browser window.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetWindowBounds {
            /// Browser window id.
            pub window_id: types::WindowID,
        }

        impl GetWindowBounds {
            pub fn new(window_id: types::WindowID) -> Self {
                Self { window_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetWindowBoundsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetWindowBounds {
            type Response = responses::GetWindowBoundsResponse;
            const METHOD: &'static str = "Browser.getWindowBounds";
        }

        /// Get the browser window that contains the devtools target.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetWindowForTarget {
            /// Devtools agent host id. If called as a part of the session, associated targetId is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_id: Option<target::types::TargetID>,
        }

        impl GetWindowForTarget {
            pub fn new() -> Self {
                Self { target_id: None }
            }

            pub fn with_target_id(mut self, target_id: target::types::TargetID) -> Self {
                self.target_id = Some(target_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetWindowForTargetResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetWindowForTarget {
            type Response = responses::GetWindowForTargetResponse;
            const METHOD: &'static str = "Browser.getWindowForTarget";
        }

        /// Set position and/or size of the browser window.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetWindowBounds {
            /// Browser window id.
            pub window_id: types::WindowID,
            /// New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
            pub bounds: types::Bounds,
        }

        impl SetWindowBounds {
            pub fn new(window_id: types::WindowID, bounds: types::Bounds) -> Self {
                Self { window_id, bounds }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetWindowBounds {
            type Response = ();
            const METHOD: &'static str = "Browser.setWindowBounds";
        }

        /// Set size of the browser contents resizing browser window as necessary.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetContentsSize {
            /// Browser window id.
            pub window_id: types::WindowID,
            /// The window contents width in DIP. Assumes current width if omitted. Must be specified if 'height' is omitted.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub width: Option<i64>,
            /// The window contents height in DIP. Assumes current height if omitted. Must be specified if 'width' is omitted.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub height: Option<i64>,
        }

        impl SetContentsSize {
            pub fn new(window_id: types::WindowID) -> Self {
                Self {
                    window_id,
                    width: None,
                    height: None,
                }
            }

            pub fn with_width(mut self, width: i64) -> Self {
                self.width = Some(width);
                self
            }

            pub fn with_height(mut self, height: i64) -> Self {
                self.height = Some(height);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetContentsSize {
            type Response = ();
            const METHOD: &'static str = "Browser.setContentsSize";
        }

        /// Set dock tile details, platform-specific.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDockTile {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub badge_label: Option<String>,
            /// Png encoded image. (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub image: Option<String>,
        }

        impl SetDockTile {
            pub fn new() -> Self {
                Self {
                    badge_label: None,
                    image: None,
                }
            }

            pub fn with_badge_label(mut self, badge_label: impl Into<String>) -> Self {
                self.badge_label = Some(badge_label.into());
                self
            }

            pub fn with_image(mut self, image: impl Into<String>) -> Self {
                self.image = Some(image.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDockTile {
            type Response = ();
            const METHOD: &'static str = "Browser.setDockTile";
        }

        /// Invoke custom browser commands used by telemetry.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExecuteBrowserCommand {
            pub command_id: types::BrowserCommandId,
        }

        impl ExecuteBrowserCommand {
            pub fn new(command_id: types::BrowserCommandId) -> Self {
                Self { command_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ExecuteBrowserCommand {
            type Response = ();
            const METHOD: &'static str = "Browser.executeBrowserCommand";
        }

        /// Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddPrivacySandboxEnrollmentOverride {
            pub url: String,
        }

        impl AddPrivacySandboxEnrollmentOverride {
            pub fn new(url: impl Into<String>) -> Self {
                Self { url: url.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddPrivacySandboxEnrollmentOverride {
            type Response = ();
            const METHOD: &'static str = "Browser.addPrivacySandboxEnrollmentOverride";
        }

        /// Configures encryption keys used with a given privacy sandbox API to talk to a trusted coordinator. Since this is intended for test automation only, coordinatorOrigin must be a .test domain. No existing coordinator configuration for the origin may exist.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddPrivacySandboxCoordinatorKeyConfig {
            pub api: types::PrivacySandboxAPI,
            pub coordinator_origin: String,
            pub key_config: String,
            /// BrowserContext to perform the action in. When omitted, default browser context is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<types::BrowserContextID>,
        }

        impl AddPrivacySandboxCoordinatorKeyConfig {
            pub fn new(
                api: types::PrivacySandboxAPI,
                coordinator_origin: impl Into<String>,
                key_config: impl Into<String>,
            ) -> Self {
                Self {
                    api,
                    coordinator_origin: coordinator_origin.into(),
                    key_config: key_config.into(),
                    browser_context_id: None,
                }
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddPrivacySandboxCoordinatorKeyConfig {
            type Response = ();
            const METHOD: &'static str = "Browser.addPrivacySandboxCoordinatorKeyConfig";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Fired when page is about to start a download.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DownloadWillBegin {
            /// Id of the frame that caused the download to begin.
            pub frame_id: page::types::FrameId,
            /// Global unique identifier of the download.
            pub guid: String,
            /// URL of the resource being downloaded.
            pub url: String,
            /// Suggested file name of the resource (the actual name of the file saved on disk may differ).
            pub suggested_filename: String,
        }

        impl DownloadWillBegin {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Browser.downloadWillBegin")
            }
        }

        /// Fired when download makes progress. Last call has |done| == true.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DownloadProgress {
            /// Global unique identifier of the download.
            pub guid: String,
            /// Total expected bytes to download.
            pub total_bytes: f64,
            /// Total bytes received.
            pub received_bytes: f64,
            /// Download status.
            pub state: String,
            /// If download is "completed", provides the path of the downloaded file. Depending on the platform, it is not guaranteed to be set, nor the file is guaranteed to exist.
            /// **EXPERIMENTAL**
            pub file_path: Option<String>,
        }

        impl DownloadProgress {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Browser.downloadProgress")
            }
        }
    }
}

pub mod css {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via inspector" rules), "regular" for regular stylesheets.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum StyleSheetOrigin {
            #[serde(rename = "injected")]
            Injected,
            #[serde(rename = "user-agent")]
            UserAgent,
            #[serde(rename = "inspector")]
            Inspector,
            #[serde(rename = "regular")]
            Regular,
        }
        impl AsRef<str> for StyleSheetOrigin {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Injected => "injected",
                    Self::UserAgent => "user-agent",
                    Self::Inspector => "inspector",
                    Self::Regular => "regular",
                }
            }
        }
        impl std::str::FromStr for StyleSheetOrigin {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "injected" => Ok(Self::Injected),
                    "user-agent" => Ok(Self::UserAgent),
                    "inspector" => Ok(Self::Inspector),
                    "regular" => Ok(Self::Regular),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for StyleSheetOrigin {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// CSS rule collection for a single pseudo style.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PseudoElementMatches {
            /// Pseudo element type.
            pub pseudo_type: dom::types::PseudoType,
            /// Pseudo element custom ident.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_identifier: Option<String>,
            /// Matches of CSS rules applicable to the pseudo style.
            pub matches: Vec<RuleMatch>,
        }

        /// CSS style coming from animations with the name of the animation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSAnimationStyle {
            /// The name of the animation.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            /// The style coming from the animation.
            pub style: CSSStyle,
        }

        /// Inherited CSS rule collection from ancestor node.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InheritedStyleEntry {
            /// The ancestor node's inline style, if any, in the style inheritance chain.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub inline_style: Option<CSSStyle>,
            /// Matches of CSS rules matching the ancestor node in the style inheritance chain.
            #[serde(rename = "matchedCSSRules")]
            pub matched_css_rules: Vec<RuleMatch>,
        }

        /// Inherited CSS style collection for animated styles from ancestor node.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InheritedAnimatedStyleEntry {
            /// Styles coming from the animations of the ancestor, if any, in the style inheritance chain.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub animation_styles: Option<Vec<CSSAnimationStyle>>,
            /// The style coming from the transitions of the ancestor, if any, in the style inheritance chain.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub transitions_style: Option<CSSStyle>,
        }

        /// Inherited pseudo element matches from pseudos of an ancestor node.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InheritedPseudoElementMatches {
            /// Matches of pseudo styles from the pseudos of an ancestor node.
            pub pseudo_elements: Vec<PseudoElementMatches>,
        }

        /// Match data for a CSS rule.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RuleMatch {
            /// CSS rule in the match.
            pub rule: CSSRule,
            /// Matching selector indices in the rule's selectorList selectors (0-based).
            pub matching_selectors: Vec<i64>,
        }

        /// Data for a simple selector (these are delimited by commas in a selector list).
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Value {
            /// Value text.
            pub text: String,
            /// Value range in the underlying resource (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Specificity of the selector.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub specificity: Option<Specificity>,
        }

        /// Specificity: https://drafts.csswg.org/selectors/#specificity-rules
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Specificity {
            /// The a component, which represents the number of ID selectors.
            pub a: i64,
            /// The b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.
            pub b: i64,
            /// The c component, which represents the number of type selectors and pseudo-elements.
            pub c: i64,
        }

        /// Selector list data.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SelectorList {
            /// Selectors in the list.
            pub selectors: Vec<Value>,
            /// Rule selector text.
            pub text: String,
        }

        /// CSS stylesheet metainformation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSStyleSheetHeader {
            /// The stylesheet identifier.
            pub style_sheet_id: dom::types::StyleSheetId,
            /// Owner frame identifier.
            pub frame_id: page::types::FrameId,
            /// Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported as a CSS module script).
            #[serde(rename = "sourceURL")]
            pub source_url: String,
            /// URL of source map associated with the stylesheet (if any).
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "sourceMapURL")]
            pub source_map_url: Option<String>,
            /// Stylesheet origin.
            pub origin: StyleSheetOrigin,
            /// Stylesheet title.
            pub title: String,
            /// The backend id for the owner node of the stylesheet.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub owner_node: Option<dom::types::BackendNodeId>,
            /// Denotes whether the stylesheet is disabled.
            pub disabled: bool,
            /// Whether the sourceURL field value comes from the sourceURL comment.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "hasSourceURL")]
            pub has_source_url: Option<bool>,
            /// Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
            pub is_inline: bool,
            /// Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. `<link>` element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
            pub is_mutable: bool,
            /// True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.
            pub is_constructed: bool,
            /// Line offset of the stylesheet within the resource (zero based).
            pub start_line: f64,
            /// Column offset of the stylesheet within the resource (zero based).
            pub start_column: f64,
            /// Size of the content (in characters).
            pub length: f64,
            /// Line offset of the end of the stylesheet within the resource (zero based).
            pub end_line: f64,
            /// Column offset of the end of the stylesheet within the resource (zero based).
            pub end_column: f64,
            /// If the style sheet was loaded from a network resource, this indicates when the resource failed to load
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub loading_failed: Option<bool>,
        }

        /// CSS rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSRule {
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Rule selector data.
            pub selector_list: SelectorList,
            /// Array of selectors from ancestor style rules, sorted by distance from the current rule.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub nesting_selectors: Option<Vec<String>>,
            /// Parent stylesheet's origin.
            pub origin: StyleSheetOrigin,
            /// Associated style declaration.
            pub style: CSSStyle,
            /// The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub origin_tree_scope_node_id: Option<dom::types::BackendNodeId>,
            /// Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub media: Option<Vec<CSSMedia>>,
            /// Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub container_queries: Option<Vec<CSSContainerQuery>>,
            /// @supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub supports: Option<Vec<CSSSupports>>,
            /// Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub layers: Option<Vec<CSSLayer>>,
            /// @scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scopes: Option<Vec<CSSScope>>,
            /// The array keeps the types of ancestor CSSRules from the innermost going outwards.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub rule_types: Option<Vec<CSSRuleType>>,
            /// @starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub starting_styles: Option<Vec<CSSStartingStyle>>,
        }

        /// Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors. This list only contains rule types that are collected during the ancestor rule collection.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CSSRuleType {
            #[serde(rename = "MediaRule")]
            MediaRule,
            #[serde(rename = "SupportsRule")]
            SupportsRule,
            #[serde(rename = "ContainerRule")]
            ContainerRule,
            #[serde(rename = "LayerRule")]
            LayerRule,
            #[serde(rename = "ScopeRule")]
            ScopeRule,
            #[serde(rename = "StyleRule")]
            StyleRule,
            #[serde(rename = "StartingStyleRule")]
            StartingStyleRule,
        }
        impl AsRef<str> for CSSRuleType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::MediaRule => "MediaRule",
                    Self::SupportsRule => "SupportsRule",
                    Self::ContainerRule => "ContainerRule",
                    Self::LayerRule => "LayerRule",
                    Self::ScopeRule => "ScopeRule",
                    Self::StyleRule => "StyleRule",
                    Self::StartingStyleRule => "StartingStyleRule",
                }
            }
        }
        impl std::str::FromStr for CSSRuleType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "MediaRule" => Ok(Self::MediaRule),
                    "SupportsRule" => Ok(Self::SupportsRule),
                    "ContainerRule" => Ok(Self::ContainerRule),
                    "LayerRule" => Ok(Self::LayerRule),
                    "ScopeRule" => Ok(Self::ScopeRule),
                    "StyleRule" => Ok(Self::StyleRule),
                    "StartingStyleRule" => Ok(Self::StartingStyleRule),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CSSRuleType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// CSS coverage information.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RuleUsage {
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            pub style_sheet_id: dom::types::StyleSheetId,
            /// Offset of the start of the rule (including selector) from the beginning of the stylesheet.
            pub start_offset: f64,
            /// Offset of the end of the rule body from the beginning of the stylesheet.
            pub end_offset: f64,
            /// Indicates whether the rule was actually used by some element in the page.
            pub used: bool,
        }

        /// Text range within a resource. All numbers are zero-based.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SourceRange {
            /// Start line of range.
            pub start_line: i64,
            /// Start column of range (inclusive).
            pub start_column: i64,
            /// End line of range
            pub end_line: i64,
            /// End column of range (exclusive).
            pub end_column: i64,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ShorthandEntry {
            /// Shorthand name.
            pub name: String,
            /// Shorthand value.
            pub value: String,
            /// Whether the property has "!important" annotation (implies `false` if absent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub important: Option<bool>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSComputedStyleProperty {
            /// Computed style property name.
            pub name: String,
            /// Computed style property value.
            pub value: String,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ComputedStyleExtraFields {
            /// Returns whether or not this node is being rendered with base appearance, which happens when it has its appearance property set to base/base-select or it is in the subtree of an element being rendered with base appearance.
            pub is_appearance_base: bool,
        }

        /// CSS style representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSStyle {
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// CSS properties in the style.
            pub css_properties: Vec<CSSProperty>,
            /// Computed values for all shorthands found in the style.
            pub shorthand_entries: Vec<ShorthandEntry>,
            /// Style declaration text (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub css_text: Option<String>,
            /// Style declaration range in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
        }

        /// CSS property declaration data.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSProperty {
            /// The property name.
            pub name: String,
            /// The property value.
            pub value: String,
            /// Whether the property has "!important" annotation (implies `false` if absent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub important: Option<bool>,
            /// Whether the property is implicit (implies `false` if absent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub implicit: Option<bool>,
            /// The full property text as specified in the style.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub text: Option<String>,
            /// Whether the property is understood by the browser (implies `true` if absent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parsed_ok: Option<bool>,
            /// Whether the property is disabled by the user (present for source-based properties only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub disabled: Option<bool>,
            /// The entire property range in the enclosing style declaration (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Parsed longhand components of this property if it is a shorthand. This field will be empty if the given property is not a shorthand.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub longhand_properties: Option<Vec<CSSProperty>>,
        }

        /// CSS media rule descriptor.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSMedia {
            /// Media query text.
            pub text: String,
            /// Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
            pub source: String,
            /// URL of the document containing the media query description.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "sourceURL")]
            pub source_url: Option<String>,
            /// The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Identifier of the stylesheet containing this object (if exists).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Array of media queries.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub media_list: Option<Vec<MediaQuery>>,
        }

        /// Media query descriptor.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MediaQuery {
            /// Array of media query expressions.
            pub expressions: Vec<MediaQueryExpression>,
            /// Whether the media query condition is satisfied.
            pub active: bool,
        }

        /// Media query expression descriptor.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MediaQueryExpression {
            /// Media query expression value.
            pub value: f64,
            /// Media query expression units.
            pub unit: String,
            /// Media query expression feature.
            pub feature: String,
            /// The associated range of the value text in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value_range: Option<SourceRange>,
            /// Computed length of media query expression (if applicable).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub computed_length: Option<f64>,
        }

        /// CSS container query rule descriptor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSContainerQuery {
            /// Container query text.
            pub text: String,
            /// The associated rule header range in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Identifier of the stylesheet containing this object (if exists).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Optional name for the container.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            /// Optional physical axes queried for the container.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub physical_axes: Option<dom::types::PhysicalAxes>,
            /// Optional logical axes queried for the container.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub logical_axes: Option<dom::types::LogicalAxes>,
            /// true if the query contains scroll-state() queries.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub queries_scroll_state: Option<bool>,
            /// true if the query contains anchored() queries.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub queries_anchored: Option<bool>,
        }

        /// CSS Supports at-rule descriptor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSSupports {
            /// Supports rule text.
            pub text: String,
            /// Whether the supports condition is satisfied.
            pub active: bool,
            /// The associated rule header range in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Identifier of the stylesheet containing this object (if exists).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
        }

        /// CSS Scope at-rule descriptor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSScope {
            /// Scope rule text.
            pub text: String,
            /// The associated rule header range in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Identifier of the stylesheet containing this object (if exists).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
        }

        /// CSS Layer at-rule descriptor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSLayer {
            /// Layer name.
            pub text: String,
            /// The associated rule header range in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Identifier of the stylesheet containing this object (if exists).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
        }

        /// CSS Starting Style at-rule descriptor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSStartingStyle {
            /// The associated rule header range in the enclosing stylesheet (if available).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub range: Option<SourceRange>,
            /// Identifier of the stylesheet containing this object (if exists).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
        }

        /// CSS Layer data.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSLayerData {
            /// Layer name.
            pub name: String,
            /// Direct sub-layers
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sub_layers: Option<Vec<CSSLayerData>>,
            /// Layer order. The order determines the order of the layer in the cascade order. A higher number has higher priority in the cascade order.
            pub order: f64,
        }

        /// Information about amount of glyphs that were rendered with given font.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlatformFontUsage {
            /// Font's family name reported by platform.
            pub family_name: String,
            /// Font's PostScript name reported by platform.
            pub post_script_name: String,
            /// Indicates if the font was downloaded or resolved locally.
            pub is_custom_font: bool,
            /// Amount of glyphs that were rendered with this font.
            pub glyph_count: f64,
        }

        /// Information about font variation axes for variable fonts
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FontVariationAxis {
            /// The font-variation-setting tag (a.k.a. "axis tag").
            pub tag: String,
            /// Human-readable variation name in the default language (normally, "en").
            pub name: String,
            /// The minimum value (inclusive) the font supports for this tag.
            pub min_value: f64,
            /// The maximum value (inclusive) the font supports for this tag.
            pub max_value: f64,
            /// The default value.
            pub default_value: f64,
        }

        /// Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions and additional information such as platformFontFamily and fontVariationAxes.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FontFace {
            /// The font-family.
            pub font_family: String,
            /// The font-style.
            pub font_style: String,
            /// The font-variant.
            pub font_variant: String,
            /// The font-weight.
            pub font_weight: String,
            /// The font-stretch.
            pub font_stretch: String,
            /// The font-display.
            pub font_display: String,
            /// The unicode-range.
            pub unicode_range: String,
            /// The src.
            pub src: String,
            /// The resolved platform font family
            pub platform_font_family: String,
            /// Available variation settings (a.k.a. "axes").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub font_variation_axes: Option<Vec<FontVariationAxis>>,
        }

        /// CSS try rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSTryRule {
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Parent stylesheet's origin.
            pub origin: StyleSheetOrigin,
            /// Associated style declaration.
            pub style: CSSStyle,
        }

        /// CSS @position-try rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSPositionTryRule {
            /// The prelude dashed-ident name
            pub name: Value,
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Parent stylesheet's origin.
            pub origin: StyleSheetOrigin,
            /// Associated style declaration.
            pub style: CSSStyle,
            pub active: bool,
        }

        /// CSS keyframes rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSKeyframesRule {
            /// Animation name.
            pub animation_name: Value,
            /// List of keyframes.
            pub keyframes: Vec<CSSKeyframeRule>,
        }

        /// Representation of a custom property registration through CSS.registerProperty
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSPropertyRegistration {
            pub property_name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub initial_value: Option<Value>,
            pub inherits: bool,
            pub syntax: String,
        }

        /// CSS generic @rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSAtRule {
            /// Type of at-rule.
            pub type_: String,
            /// Subsection of font-feature-values, if this is a subsection.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub subsection: Option<String>,
            /// LINT.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType) Associated name, if applicable.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<Value>,
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Parent stylesheet's origin.
            pub origin: StyleSheetOrigin,
            /// Associated style declaration.
            pub style: CSSStyle,
        }

        /// CSS property at-rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSPropertyRule {
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Parent stylesheet's origin.
            pub origin: StyleSheetOrigin,
            /// Associated property name.
            pub property_name: Value,
            /// Associated style declaration.
            pub style: CSSStyle,
        }

        /// CSS function argument representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSFunctionParameter {
            /// The parameter name.
            pub name: String,
            /// The parameter type.
            pub type_: String,
        }

        /// CSS function conditional block representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSFunctionConditionNode {
            /// Media query for this conditional block. Only one type of condition should be set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub media: Option<CSSMedia>,
            /// Container query for this conditional block. Only one type of condition should be set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub container_queries: Option<CSSContainerQuery>,
            /// @supports CSS at-rule condition. Only one type of condition should be set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub supports: Option<CSSSupports>,
            /// Block body.
            pub children: Vec<CSSFunctionNode>,
            /// The condition text.
            pub condition_text: String,
        }

        /// Section of the body of a CSS function rule.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSFunctionNode {
            /// A conditional block. If set, style should not be set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub condition: Option<CSSFunctionConditionNode>,
            /// Values set by this node. If set, condition should not be set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style: Option<CSSStyle>,
        }

        /// CSS function at-rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSFunctionRule {
            /// Name of the function.
            pub name: Value,
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Parent stylesheet's origin.
            pub origin: StyleSheetOrigin,
            /// List of parameters.
            pub parameters: Vec<CSSFunctionParameter>,
            /// Function body.
            pub children: Vec<CSSFunctionNode>,
        }

        /// CSS keyframe rule representation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSKeyframeRule {
            /// The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_sheet_id: Option<dom::types::StyleSheetId>,
            /// Parent stylesheet's origin.
            pub origin: StyleSheetOrigin,
            /// Associated key text.
            pub key_text: Value,
            /// Associated style declaration.
            pub style: CSSStyle,
        }

        /// A descriptor of operation to mutate style declaration text.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StyleDeclarationEdit {
            /// The css style sheet identifier.
            pub style_sheet_id: dom::types::StyleSheetId,
            /// The range of the style text in the enclosing stylesheet.
            pub range: SourceRange,
            /// New style text.
            pub text: String,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddRuleResponse {
            /// The newly created rule.
            pub rule: types::CSSRule,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CollectClassNamesResponse {
            /// Class name list.
            pub class_names: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateStyleSheetResponse {
            /// Identifier of the created "via-inspector" stylesheet.
            pub style_sheet_id: dom::types::StyleSheetId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBackgroundColorsResponse {
            /// The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).
            pub background_colors: Option<Vec<String>>,
            /// The computed font size for this node, as a CSS computed value string (e.g. '12px').
            pub computed_font_size: Option<String>,
            /// The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').
            pub computed_font_weight: Option<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetComputedStyleForNodeResponse {
            /// Computed style for the specified DOM node.
            pub computed_style: Vec<types::CSSComputedStyleProperty>,
            /// A list of non-standard "extra fields" which blink stores alongside each computed style.
            /// **EXPERIMENTAL**
            pub extra_fields: Option<types::ComputedStyleExtraFields>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveValuesResponse {
            pub results: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLonghandPropertiesResponse {
            pub longhand_properties: Vec<types::CSSProperty>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInlineStylesForNodeResponse {
            /// Inline style for the specified DOM node.
            pub inline_style: Option<types::CSSStyle>,
            /// Attribute-defined element style (e.g. resulting from "width=20 height=100%").
            pub attributes_style: Option<types::CSSStyle>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAnimatedStylesForNodeResponse {
            /// Styles coming from animations.
            pub animation_styles: Option<Vec<types::CSSAnimationStyle>>,
            /// Style coming from transitions.
            pub transitions_style: Option<types::CSSStyle>,
            /// Inherited style entries for animationsStyle and transitionsStyle from the inheritance chain of the element.
            pub inherited: Option<Vec<types::InheritedAnimatedStyleEntry>>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMatchedStylesForNodeResponse {
            /// Inline style for the specified DOM node.
            pub inline_style: Option<types::CSSStyle>,
            /// Attribute-defined element style (e.g. resulting from "width=20 height=100%").
            pub attributes_style: Option<types::CSSStyle>,
            /// CSS rules matching this node, from all applicable stylesheets.
            #[serde(rename = "matchedCSSRules")]
            pub matched_css_rules: Option<Vec<types::RuleMatch>>,
            /// Pseudo style matches for this node.
            pub pseudo_elements: Option<Vec<types::PseudoElementMatches>>,
            /// A chain of inherited styles (from the immediate node parent up to the DOM tree root).
            pub inherited: Option<Vec<types::InheritedStyleEntry>>,
            /// A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
            pub inherited_pseudo_elements: Option<Vec<types::InheritedPseudoElementMatches>>,
            /// A list of CSS keyframed animations matching this node.
            pub css_keyframes_rules: Option<Vec<types::CSSKeyframesRule>>,
            /// A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.
            pub css_position_try_rules: Option<Vec<types::CSSPositionTryRule>>,
            /// Index of the active fallback in the applied position-try-fallback property, will not be set if there is no active position-try fallback.
            pub active_position_fallback_index: Option<i64>,
            /// A list of CSS at-property rules matching this node.
            pub css_property_rules: Option<Vec<types::CSSPropertyRule>>,
            /// A list of CSS property registrations matching this node.
            pub css_property_registrations: Option<Vec<types::CSSPropertyRegistration>>,
            /// A list of simple @rules matching this node or its pseudo-elements.
            pub css_at_rules: Option<Vec<types::CSSAtRule>>,
            /// Id of the first parent element that does not have display: contents.
            /// **EXPERIMENTAL**
            pub parent_layout_node_id: Option<dom::types::NodeId>,
            /// A list of CSS at-function rules referenced by styles of this node.
            /// **EXPERIMENTAL**
            pub css_function_rules: Option<Vec<types::CSSFunctionRule>>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetEnvironmentVariablesResponse {
            pub environment_variables: serde_json::Value,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMediaQueriesResponse {
            pub medias: Vec<types::CSSMedia>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPlatformFontsForNodeResponse {
            /// Usage statistics for every employed platform font.
            pub fonts: Vec<types::PlatformFontUsage>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStyleSheetTextResponse {
            /// The stylesheet text.
            pub text: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLayersForNodeResponse {
            pub root_layer: types::CSSLayerData,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLocationForSelectorResponse {
            pub ranges: Vec<types::SourceRange>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeComputedStyleUpdatesResponse {
            /// The list of node Ids that have their tracked computed styles updated.
            pub node_ids: Vec<dom::types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPropertyRulePropertyNameResponse {
            /// The resulting key text after modification.
            pub property_name: types::Value,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetKeyframeKeyResponse {
            /// The resulting key text after modification.
            pub key_text: types::Value,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetMediaTextResponse {
            /// The resulting CSS media rule after modification.
            pub media: types::CSSMedia,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetContainerQueryTextResponse {
            /// The resulting CSS container query rule after modification.
            pub container_query: types::CSSContainerQuery,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSupportsTextResponse {
            /// The resulting CSS Supports rule after modification.
            pub supports: types::CSSSupports,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetScopeTextResponse {
            /// The resulting CSS Scope rule after modification.
            pub scope: types::CSSScope,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetRuleSelectorResponse {
            /// The resulting selector list after modification.
            pub selector_list: types::SelectorList,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetStyleSheetTextResponse {
            /// URL of source map associated with script (if any).
            #[serde(rename = "sourceMapURL")]
            pub source_map_url: Option<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetStyleTextsResponse {
            /// The resulting styles after modification.
            pub styles: Vec<types::CSSStyle>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopRuleUsageTrackingResponse {
            pub rule_usage: Vec<types::RuleUsage>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeCoverageDeltaResponse {
            pub coverage: Vec<types::RuleUsage>,
            /// Monotonically increasing time, in seconds.
            pub timestamp: f64,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the position specified by `location`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddRule {
            /// The css style sheet identifier where a new rule should be inserted.
            pub style_sheet_id: dom::types::StyleSheetId,
            /// The text of a new rule.
            pub rule_text: String,
            /// Text position of a new rule in the target style sheet.
            pub location: types::SourceRange,
            /// NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_for_property_syntax_validation: Option<dom::types::NodeId>,
        }

        impl AddRule {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                rule_text: impl Into<String>,
                location: types::SourceRange,
            ) -> Self {
                Self {
                    style_sheet_id,
                    rule_text: rule_text.into(),
                    location,
                    node_for_property_syntax_validation: None,
                }
            }

            pub fn with_node_for_property_syntax_validation(
                mut self,
                node_for_property_syntax_validation: dom::types::NodeId,
            ) -> Self {
                self.node_for_property_syntax_validation =
                    Some(node_for_property_syntax_validation);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddRuleResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddRule {
            type Response = responses::AddRuleResponse;
            const METHOD: &'static str = "CSS.addRule";
        }

        /// Returns all class names from specified stylesheet.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CollectClassNames {
            pub style_sheet_id: dom::types::StyleSheetId,
        }

        impl CollectClassNames {
            pub fn new(style_sheet_id: dom::types::StyleSheetId) -> Self {
                Self { style_sheet_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CollectClassNamesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CollectClassNames {
            type Response = responses::CollectClassNamesResponse;
            const METHOD: &'static str = "CSS.collectClassNames";
        }

        /// Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateStyleSheet {
            /// Identifier of the frame where "via-inspector" stylesheet should be created.
            pub frame_id: page::types::FrameId,
            /// If true, creates a new stylesheet for every call. If false, returns a stylesheet previously created by a call with force=false for the frame's document if it exists or creates a new stylesheet (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub force: Option<bool>,
        }

        impl CreateStyleSheet {
            pub fn new(frame_id: page::types::FrameId) -> Self {
                Self {
                    frame_id,
                    force: None,
                }
            }

            pub fn with_force(mut self, force: bool) -> Self {
                self.force = Some(force);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CreateStyleSheetResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CreateStyleSheet {
            type Response = responses::CreateStyleSheetResponse;
            const METHOD: &'static str = "CSS.createStyleSheet";
        }

        /// Disables the CSS agent for the given page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "CSS.disable";
        }

        /// Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "CSS.enable";
        }

        /// Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ForcePseudoState {
            /// The element id for which to force the pseudo state.
            pub node_id: dom::types::NodeId,
            /// Element pseudo classes to force when computing the element's style.
            pub forced_pseudo_classes: Vec<String>,
        }

        impl ForcePseudoState {
            pub fn new(node_id: dom::types::NodeId, forced_pseudo_classes: Vec<String>) -> Self {
                Self {
                    node_id,
                    forced_pseudo_classes,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ForcePseudoState {
            type Response = ();
            const METHOD: &'static str = "CSS.forcePseudoState";
        }

        /// Ensures that the given node is in its starting-style state.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ForceStartingStyle {
            /// The element id for which to force the starting-style state.
            pub node_id: dom::types::NodeId,
            /// Boolean indicating if this is on or off.
            pub forced: bool,
        }

        impl ForceStartingStyle {
            pub fn new(node_id: dom::types::NodeId, forced: bool) -> Self {
                Self { node_id, forced }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ForceStartingStyle {
            type Response = ();
            const METHOD: &'static str = "CSS.forceStartingStyle";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBackgroundColors {
            /// Id of the node to get background colors for.
            pub node_id: dom::types::NodeId,
        }

        impl GetBackgroundColors {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetBackgroundColorsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetBackgroundColors {
            type Response = responses::GetBackgroundColorsResponse;
            const METHOD: &'static str = "CSS.getBackgroundColors";
        }

        /// Returns the computed style for a DOM node identified by `nodeId`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetComputedStyleForNode {
            pub node_id: dom::types::NodeId,
        }

        impl GetComputedStyleForNode {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetComputedStyleForNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetComputedStyleForNode {
            type Response = responses::GetComputedStyleForNodeResponse;
            const METHOD: &'static str = "CSS.getComputedStyleForNode";
        }

        /// Resolve the specified values in the context of the provided element. For example, a value of '1em' is evaluated according to the computed 'font-size' of the element and a value 'calc(1px + 2px)' will be resolved to '3px'. If the `propertyName` was specified the `values` are resolved as if they were property's declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null `propertyName` was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.`
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveValues {
            /// Cascade-dependent keywords (revert/revert-layer) do not work.
            pub values: Vec<String>,
            /// Id of the node in whose context the expression is evaluated
            pub node_id: dom::types::NodeId,
            /// Only longhands and custom property names are accepted.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub property_name: Option<String>,
            /// Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_type: Option<dom::types::PseudoType>,
            /// Pseudo element custom ident.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_identifier: Option<String>,
        }

        impl ResolveValues {
            pub fn new(values: Vec<String>, node_id: dom::types::NodeId) -> Self {
                Self {
                    values,
                    node_id,
                    property_name: None,
                    pseudo_type: None,
                    pseudo_identifier: None,
                }
            }

            pub fn with_property_name(mut self, property_name: impl Into<String>) -> Self {
                self.property_name = Some(property_name.into());
                self
            }

            pub fn with_pseudo_type(mut self, pseudo_type: dom::types::PseudoType) -> Self {
                self.pseudo_type = Some(pseudo_type);
                self
            }

            pub fn with_pseudo_identifier(mut self, pseudo_identifier: impl Into<String>) -> Self {
                self.pseudo_identifier = Some(pseudo_identifier.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ResolveValuesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResolveValues {
            type Response = responses::ResolveValuesResponse;
            const METHOD: &'static str = "CSS.resolveValues";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLonghandProperties {
            pub shorthand_name: String,
            pub value: String,
        }

        impl GetLonghandProperties {
            pub fn new(shorthand_name: impl Into<String>, value: impl Into<String>) -> Self {
                Self {
                    shorthand_name: shorthand_name.into(),
                    value: value.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetLonghandPropertiesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetLonghandProperties {
            type Response = responses::GetLonghandPropertiesResponse;
            const METHOD: &'static str = "CSS.getLonghandProperties";
        }

        /// Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by `nodeId`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInlineStylesForNode {
            pub node_id: dom::types::NodeId,
        }

        impl GetInlineStylesForNode {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetInlineStylesForNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetInlineStylesForNode {
            type Response = responses::GetInlineStylesForNodeResponse;
            const METHOD: &'static str = "CSS.getInlineStylesForNode";
        }

        /// Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAnimatedStylesForNode {
            pub node_id: dom::types::NodeId,
        }

        impl GetAnimatedStylesForNode {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAnimatedStylesForNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAnimatedStylesForNode {
            type Response = responses::GetAnimatedStylesForNodeResponse;
            const METHOD: &'static str = "CSS.getAnimatedStylesForNode";
        }

        /// Returns requested styles for a DOM node identified by `nodeId`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMatchedStylesForNode {
            pub node_id: dom::types::NodeId,
        }

        impl GetMatchedStylesForNode {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetMatchedStylesForNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetMatchedStylesForNode {
            type Response = responses::GetMatchedStylesForNodeResponse;
            const METHOD: &'static str = "CSS.getMatchedStylesForNode";
        }

        /// Returns the values of the default UA-defined environment variables used in env()
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetEnvironmentVariables {}

        impl GetEnvironmentVariables {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetEnvironmentVariablesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetEnvironmentVariables {
            type Response = responses::GetEnvironmentVariablesResponse;
            const METHOD: &'static str = "CSS.getEnvironmentVariables";
        }

        /// Returns all media queries parsed by the rendering engine.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMediaQueries {}

        impl GetMediaQueries {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetMediaQueriesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetMediaQueries {
            type Response = responses::GetMediaQueriesResponse;
            const METHOD: &'static str = "CSS.getMediaQueries";
        }

        /// Requests information about platform fonts which we used to render child TextNodes in the given node.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPlatformFontsForNode {
            pub node_id: dom::types::NodeId,
        }

        impl GetPlatformFontsForNode {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetPlatformFontsForNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetPlatformFontsForNode {
            type Response = responses::GetPlatformFontsForNodeResponse;
            const METHOD: &'static str = "CSS.getPlatformFontsForNode";
        }

        /// Returns the current textual content for a stylesheet.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStyleSheetText {
            pub style_sheet_id: dom::types::StyleSheetId,
        }

        impl GetStyleSheetText {
            pub fn new(style_sheet_id: dom::types::StyleSheetId) -> Self {
                Self { style_sheet_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetStyleSheetTextResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetStyleSheetText {
            type Response = responses::GetStyleSheetTextResponse;
            const METHOD: &'static str = "CSS.getStyleSheetText";
        }

        /// Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLayersForNode {
            pub node_id: dom::types::NodeId,
        }

        impl GetLayersForNode {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetLayersForNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetLayersForNode {
            type Response = responses::GetLayersForNodeResponse;
            const METHOD: &'static str = "CSS.getLayersForNode";
        }

        /// Given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLocationForSelector {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub selector_text: String,
        }

        impl GetLocationForSelector {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                selector_text: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    selector_text: selector_text.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetLocationForSelectorResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetLocationForSelector {
            type Response = responses::GetLocationForSelectorResponse;
            const METHOD: &'static str = "CSS.getLocationForSelector";
        }

        /// Starts tracking the given node for the computed style updates and whenever the computed style is updated for node, it queues a `computedStyleUpdated` event with throttling. There can only be 1 node tracked for computed style updates so passing a new node id removes tracking from the previous node. Pass `undefined` to disable tracking.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrackComputedStyleUpdatesForNode {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::NodeId>,
        }

        impl TrackComputedStyleUpdatesForNode {
            pub fn new() -> Self {
                Self { node_id: None }
            }

            pub fn with_node_id(mut self, node_id: dom::types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TrackComputedStyleUpdatesForNode {
            type Response = ();
            const METHOD: &'static str = "CSS.trackComputedStyleUpdatesForNode";
        }

        /// Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrackComputedStyleUpdates {
            pub properties_to_track: Vec<types::CSSComputedStyleProperty>,
        }

        impl TrackComputedStyleUpdates {
            pub fn new(properties_to_track: Vec<types::CSSComputedStyleProperty>) -> Self {
                Self {
                    properties_to_track,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TrackComputedStyleUpdates {
            type Response = ();
            const METHOD: &'static str = "CSS.trackComputedStyleUpdates";
        }

        /// Polls the next batch of computed style updates.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeComputedStyleUpdates {}

        impl TakeComputedStyleUpdates {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::TakeComputedStyleUpdatesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TakeComputedStyleUpdates {
            type Response = responses::TakeComputedStyleUpdatesResponse;
            const METHOD: &'static str = "CSS.takeComputedStyleUpdates";
        }

        /// Find a rule with the given active property for the given node and set the new value for this property
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetEffectivePropertyValueForNode {
            /// The element id for which to set property.
            pub node_id: dom::types::NodeId,
            pub property_name: String,
            pub value: String,
        }

        impl SetEffectivePropertyValueForNode {
            pub fn new(
                node_id: dom::types::NodeId,
                property_name: impl Into<String>,
                value: impl Into<String>,
            ) -> Self {
                Self {
                    node_id,
                    property_name: property_name.into(),
                    value: value.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetEffectivePropertyValueForNode {
            type Response = ();
            const METHOD: &'static str = "CSS.setEffectivePropertyValueForNode";
        }

        /// Modifies the property rule property name.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPropertyRulePropertyName {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub range: types::SourceRange,
            pub property_name: String,
        }

        impl SetPropertyRulePropertyName {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                range: types::SourceRange,
                property_name: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    range,
                    property_name: property_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetPropertyRulePropertyNameResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPropertyRulePropertyName {
            type Response = responses::SetPropertyRulePropertyNameResponse;
            const METHOD: &'static str = "CSS.setPropertyRulePropertyName";
        }

        /// Modifies the keyframe rule key text.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetKeyframeKey {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub range: types::SourceRange,
            pub key_text: String,
        }

        impl SetKeyframeKey {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                range: types::SourceRange,
                key_text: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    range,
                    key_text: key_text.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetKeyframeKeyResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetKeyframeKey {
            type Response = responses::SetKeyframeKeyResponse;
            const METHOD: &'static str = "CSS.setKeyframeKey";
        }

        /// Modifies the rule selector.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetMediaText {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub range: types::SourceRange,
            pub text: String,
        }

        impl SetMediaText {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                range: types::SourceRange,
                text: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    range,
                    text: text.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetMediaTextResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetMediaText {
            type Response = responses::SetMediaTextResponse;
            const METHOD: &'static str = "CSS.setMediaText";
        }

        /// Modifies the expression of a container query.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetContainerQueryText {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub range: types::SourceRange,
            pub text: String,
        }

        impl SetContainerQueryText {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                range: types::SourceRange,
                text: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    range,
                    text: text.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetContainerQueryTextResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetContainerQueryText {
            type Response = responses::SetContainerQueryTextResponse;
            const METHOD: &'static str = "CSS.setContainerQueryText";
        }

        /// Modifies the expression of a supports at-rule.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSupportsText {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub range: types::SourceRange,
            pub text: String,
        }

        impl SetSupportsText {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                range: types::SourceRange,
                text: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    range,
                    text: text.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetSupportsTextResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSupportsText {
            type Response = responses::SetSupportsTextResponse;
            const METHOD: &'static str = "CSS.setSupportsText";
        }

        /// Modifies the expression of a scope at-rule.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetScopeText {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub range: types::SourceRange,
            pub text: String,
        }

        impl SetScopeText {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                range: types::SourceRange,
                text: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    range,
                    text: text.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetScopeTextResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetScopeText {
            type Response = responses::SetScopeTextResponse;
            const METHOD: &'static str = "CSS.setScopeText";
        }

        /// Modifies the rule selector.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetRuleSelector {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub range: types::SourceRange,
            pub selector: String,
        }

        impl SetRuleSelector {
            pub fn new(
                style_sheet_id: dom::types::StyleSheetId,
                range: types::SourceRange,
                selector: impl Into<String>,
            ) -> Self {
                Self {
                    style_sheet_id,
                    range,
                    selector: selector.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetRuleSelectorResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetRuleSelector {
            type Response = responses::SetRuleSelectorResponse;
            const METHOD: &'static str = "CSS.setRuleSelector";
        }

        /// Sets the new stylesheet text.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetStyleSheetText {
            pub style_sheet_id: dom::types::StyleSheetId,
            pub text: String,
        }

        impl SetStyleSheetText {
            pub fn new(style_sheet_id: dom::types::StyleSheetId, text: impl Into<String>) -> Self {
                Self {
                    style_sheet_id,
                    text: text.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetStyleSheetTextResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetStyleSheetText {
            type Response = responses::SetStyleSheetTextResponse;
            const METHOD: &'static str = "CSS.setStyleSheetText";
        }

        /// Applies specified style edits one after another in the given order.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetStyleTexts {
            pub edits: Vec<types::StyleDeclarationEdit>,
            /// NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_for_property_syntax_validation: Option<dom::types::NodeId>,
        }

        impl SetStyleTexts {
            pub fn new(edits: Vec<types::StyleDeclarationEdit>) -> Self {
                Self {
                    edits,
                    node_for_property_syntax_validation: None,
                }
            }

            pub fn with_node_for_property_syntax_validation(
                mut self,
                node_for_property_syntax_validation: dom::types::NodeId,
            ) -> Self {
                self.node_for_property_syntax_validation =
                    Some(node_for_property_syntax_validation);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetStyleTextsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetStyleTexts {
            type Response = responses::SetStyleTextsResponse;
            const METHOD: &'static str = "CSS.setStyleTexts";
        }

        /// Enables the selector recording.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartRuleUsageTracking {}

        impl StartRuleUsageTracking {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartRuleUsageTracking {
            type Response = ();
            const METHOD: &'static str = "CSS.startRuleUsageTracking";
        }

        /// Stop tracking rule usage and return the list of rules that were used since last call to `takeCoverageDelta` (or since start of coverage instrumentation).
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopRuleUsageTracking {}

        impl StopRuleUsageTracking {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::StopRuleUsageTrackingResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopRuleUsageTracking {
            type Response = responses::StopRuleUsageTrackingResponse;
            const METHOD: &'static str = "CSS.stopRuleUsageTracking";
        }

        /// Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation).
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeCoverageDelta {}

        impl TakeCoverageDelta {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::TakeCoverageDeltaResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TakeCoverageDelta {
            type Response = responses::TakeCoverageDeltaResponse;
            const METHOD: &'static str = "CSS.takeCoverageDelta";
        }

        /// Enables/disables rendering of local CSS fonts (enabled by default).
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetLocalFontsEnabled {
            /// Whether rendering of local fonts is enabled.
            pub enabled: bool,
        }

        impl SetLocalFontsEnabled {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetLocalFontsEnabled {
            type Response = ();
            const METHOD: &'static str = "CSS.setLocalFontsEnabled";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FontsUpdated {
            /// The web font that has loaded.
            pub font: Option<types::FontFace>,
        }

        impl FontsUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("CSS.fontsUpdated")
            }
        }

        /// Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MediaQueryResultChanged {}

        impl MediaQueryResultChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("CSS.mediaQueryResultChanged")
            }
        }

        /// Fired whenever an active document stylesheet is added.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StyleSheetAdded {
            /// Added stylesheet metainfo.
            pub header: types::CSSStyleSheetHeader,
        }

        impl StyleSheetAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("CSS.styleSheetAdded")
            }
        }

        /// Fired whenever a stylesheet is changed as a result of the client operation.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StyleSheetChanged {
            pub style_sheet_id: dom::types::StyleSheetId,
        }

        impl StyleSheetChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("CSS.styleSheetChanged")
            }
        }

        /// Fired whenever an active document stylesheet is removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StyleSheetRemoved {
            /// Identifier of the removed stylesheet.
            pub style_sheet_id: dom::types::StyleSheetId,
        }

        impl StyleSheetRemoved {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("CSS.styleSheetRemoved")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ComputedStyleUpdated {
            /// The node id that has updated computed styles.
            pub node_id: dom::types::NodeId,
        }

        impl ComputedStyleUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("CSS.computedStyleUpdated")
            }
        }
    }
}

pub mod cache_storage {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique identifier of the Cache object.
        pub type CacheId = String;

        /// type of HTTP response cached
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CachedResponseType {
            #[serde(rename = "basic")]
            Basic,
            #[serde(rename = "cors")]
            Cors,
            #[serde(rename = "default")]
            Default,
            #[serde(rename = "error")]
            Error,
            #[serde(rename = "opaqueResponse")]
            OpaqueResponse,
            #[serde(rename = "opaqueRedirect")]
            OpaqueRedirect,
        }
        impl AsRef<str> for CachedResponseType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Basic => "basic",
                    Self::Cors => "cors",
                    Self::Default => "default",
                    Self::Error => "error",
                    Self::OpaqueResponse => "opaqueResponse",
                    Self::OpaqueRedirect => "opaqueRedirect",
                }
            }
        }
        impl std::str::FromStr for CachedResponseType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "basic" => Ok(Self::Basic),
                    "cors" => Ok(Self::Cors),
                    "default" => Ok(Self::Default),
                    "error" => Ok(Self::Error),
                    "opaqueResponse" => Ok(Self::OpaqueResponse),
                    "opaqueRedirect" => Ok(Self::OpaqueRedirect),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CachedResponseType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Data entry.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DataEntry {
            /// Request URL.
            #[serde(rename = "requestURL")]
            pub request_url: String,
            /// Request method.
            pub request_method: String,
            /// Request headers
            pub request_headers: Vec<Header>,
            /// Number of seconds since epoch.
            pub response_time: f64,
            /// HTTP response status code.
            pub response_status: i64,
            /// HTTP response status text.
            pub response_status_text: String,
            /// HTTP response type
            pub response_type: CachedResponseType,
            /// Response headers
            pub response_headers: Vec<Header>,
        }

        /// Cache identifier.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Cache {
            /// An opaque unique id of the cache.
            pub cache_id: CacheId,
            /// Security origin of the cache.
            pub security_origin: String,
            /// Storage key of the cache.
            pub storage_key: String,
            /// Storage bucket of the cache.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
            /// The name of the cache.
            pub cache_name: String,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Header {
            pub name: String,
            pub value: String,
        }

        /// Cached response
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CachedResponse {
            /// Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON)
            pub body: String,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestCacheNamesResponse {
            /// Caches for the security origin.
            pub caches: Vec<types::Cache>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestCachedResponseResponse {
            /// Response read from the cache.
            pub response: types::CachedResponse,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestEntriesResponse {
            /// Array of object store data entries.
            pub cache_data_entries: Vec<types::DataEntry>,
            /// Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.
            pub return_count: f64,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Deletes a cache.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteCache {
            /// Id of cache for deletion.
            pub cache_id: types::CacheId,
        }

        impl DeleteCache {
            pub fn new(cache_id: types::CacheId) -> Self {
                Self { cache_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteCache {
            type Response = ();
            const METHOD: &'static str = "CacheStorage.deleteCache";
        }

        /// Deletes a cache entry.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteEntry {
            /// Id of cache where the entry will be deleted.
            pub cache_id: types::CacheId,
            /// URL spec of the request.
            pub request: String,
        }

        impl DeleteEntry {
            pub fn new(cache_id: types::CacheId, request: impl Into<String>) -> Self {
                Self {
                    cache_id,
                    request: request.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteEntry {
            type Response = ();
            const METHOD: &'static str = "CacheStorage.deleteEntry";
        }

        /// Requests cache names.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestCacheNames {
            /// At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
        }

        impl RequestCacheNames {
            pub fn new() -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestCacheNamesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestCacheNames {
            type Response = responses::RequestCacheNamesResponse;
            const METHOD: &'static str = "CacheStorage.requestCacheNames";
        }

        /// Fetches cache entry.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestCachedResponse {
            /// Id of cache that contains the entry.
            pub cache_id: types::CacheId,
            /// URL spec of the request.
            #[serde(rename = "requestURL")]
            pub request_url: String,
            /// headers of the request.
            pub request_headers: Vec<types::Header>,
        }

        impl RequestCachedResponse {
            pub fn new(
                cache_id: types::CacheId,
                request_url: impl Into<String>,
                request_headers: Vec<types::Header>,
            ) -> Self {
                Self {
                    cache_id,
                    request_url: request_url.into(),
                    request_headers,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestCachedResponseResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestCachedResponse {
            type Response = responses::RequestCachedResponseResponse;
            const METHOD: &'static str = "CacheStorage.requestCachedResponse";
        }

        /// Requests data from cache.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestEntries {
            /// ID of cache to get entries from.
            pub cache_id: types::CacheId,
            /// Number of records to skip.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub skip_count: Option<i64>,
            /// Number of records to fetch.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub page_size: Option<i64>,
            /// If present, only return the entries containing this substring in the path
            #[serde(skip_serializing_if = "Option::is_none")]
            pub path_filter: Option<String>,
        }

        impl RequestEntries {
            pub fn new(cache_id: types::CacheId) -> Self {
                Self {
                    cache_id,
                    skip_count: None,
                    page_size: None,
                    path_filter: None,
                }
            }

            pub fn with_skip_count(mut self, skip_count: i64) -> Self {
                self.skip_count = Some(skip_count);
                self
            }

            pub fn with_page_size(mut self, page_size: i64) -> Self {
                self.page_size = Some(page_size);
                self
            }

            pub fn with_path_filter(mut self, path_filter: impl Into<String>) -> Self {
                self.path_filter = Some(path_filter.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestEntriesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestEntries {
            type Response = responses::RequestEntriesResponse;
            const METHOD: &'static str = "CacheStorage.requestEntries";
        }
    }
}

pub mod cast {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Sink {
            pub name: String,
            pub id: String,
            /// Text describing the current session. Present only if there is an active session on the sink.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub session: Option<String>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub presentation_url: Option<String>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self {
                    presentation_url: None,
                }
            }

            pub fn with_presentation_url(mut self, presentation_url: impl Into<String>) -> Self {
                self.presentation_url = Some(presentation_url.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Cast.enable";
        }

        /// Stops observing for sinks and issues.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Cast.disable";
        }

        /// Sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSinkToUse {
            pub sink_name: String,
        }

        impl SetSinkToUse {
            pub fn new(sink_name: impl Into<String>) -> Self {
                Self {
                    sink_name: sink_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSinkToUse {
            type Response = ();
            const METHOD: &'static str = "Cast.setSinkToUse";
        }

        /// Starts mirroring the desktop to the sink.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartDesktopMirroring {
            pub sink_name: String,
        }

        impl StartDesktopMirroring {
            pub fn new(sink_name: impl Into<String>) -> Self {
                Self {
                    sink_name: sink_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartDesktopMirroring {
            type Response = ();
            const METHOD: &'static str = "Cast.startDesktopMirroring";
        }

        /// Starts mirroring the tab to the sink.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartTabMirroring {
            pub sink_name: String,
        }

        impl StartTabMirroring {
            pub fn new(sink_name: impl Into<String>) -> Self {
                Self {
                    sink_name: sink_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartTabMirroring {
            type Response = ();
            const METHOD: &'static str = "Cast.startTabMirroring";
        }

        /// Stops the active Cast session on the sink.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopCasting {
            pub sink_name: String,
        }

        impl StopCasting {
            pub fn new(sink_name: impl Into<String>) -> Self {
                Self {
                    sink_name: sink_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopCasting {
            type Response = ();
            const METHOD: &'static str = "Cast.stopCasting";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// This is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SinksUpdated {
            pub sinks: Vec<types::Sink>,
        }

        impl SinksUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Cast.sinksUpdated")
            }
        }

        /// This is fired whenever the outstanding issue/error message changes. |issueMessage| is empty if there is no issue.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct IssueUpdated {
            pub issue_message: String,
        }

        impl IssueUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Cast.issueUpdated")
            }
        }
    }
}

pub mod dom {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique DOM node identifier.
        pub type NodeId = i64;

        /// Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.
        pub type BackendNodeId = i64;

        /// Unique identifier for a CSS stylesheet.
        pub type StyleSheetId = String;

        /// Backend node with a friendly name.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BackendNode {
            /// `Node`'s nodeType.
            pub node_type: i64,
            /// `Node`'s nodeName.
            pub node_name: String,
            pub backend_node_id: BackendNodeId,
        }

        /// Pseudo element type.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PseudoType {
            #[serde(rename = "first-line")]
            FirstLine,
            #[serde(rename = "first-letter")]
            FirstLetter,
            #[serde(rename = "checkmark")]
            Checkmark,
            #[serde(rename = "before")]
            Before,
            #[serde(rename = "after")]
            After,
            #[serde(rename = "picker-icon")]
            PickerIcon,
            #[serde(rename = "interest-hint")]
            InterestHint,
            #[serde(rename = "marker")]
            Marker,
            #[serde(rename = "backdrop")]
            Backdrop,
            #[serde(rename = "column")]
            Column,
            #[serde(rename = "selection")]
            Selection,
            #[serde(rename = "search-text")]
            SearchText,
            #[serde(rename = "target-text")]
            TargetText,
            #[serde(rename = "spelling-error")]
            SpellingError,
            #[serde(rename = "grammar-error")]
            GrammarError,
            #[serde(rename = "highlight")]
            Highlight,
            #[serde(rename = "first-line-inherited")]
            FirstLineInherited,
            #[serde(rename = "scroll-marker")]
            ScrollMarker,
            #[serde(rename = "scroll-marker-group")]
            ScrollMarkerGroup,
            #[serde(rename = "scroll-button")]
            ScrollButton,
            #[serde(rename = "scrollbar")]
            Scrollbar,
            #[serde(rename = "scrollbar-thumb")]
            ScrollbarThumb,
            #[serde(rename = "scrollbar-button")]
            ScrollbarButton,
            #[serde(rename = "scrollbar-track")]
            ScrollbarTrack,
            #[serde(rename = "scrollbar-track-piece")]
            ScrollbarTrackPiece,
            #[serde(rename = "scrollbar-corner")]
            ScrollbarCorner,
            #[serde(rename = "resizer")]
            Resizer,
            #[serde(rename = "input-list-button")]
            InputListButton,
            #[serde(rename = "view-transition")]
            ViewTransition,
            #[serde(rename = "view-transition-group")]
            ViewTransitionGroup,
            #[serde(rename = "view-transition-image-pair")]
            ViewTransitionImagePair,
            #[serde(rename = "view-transition-group-children")]
            ViewTransitionGroupChildren,
            #[serde(rename = "view-transition-old")]
            ViewTransitionOld,
            #[serde(rename = "view-transition-new")]
            ViewTransitionNew,
            #[serde(rename = "placeholder")]
            Placeholder,
            #[serde(rename = "file-selector-button")]
            FileSelectorButton,
            #[serde(rename = "details-content")]
            DetailsContent,
            #[serde(rename = "picker")]
            Picker,
            #[serde(rename = "permission-icon")]
            PermissionIcon,
            #[serde(rename = "overscroll-area-parent")]
            OverscrollAreaParent,
        }
        impl AsRef<str> for PseudoType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::FirstLine => "first-line",
                    Self::FirstLetter => "first-letter",
                    Self::Checkmark => "checkmark",
                    Self::Before => "before",
                    Self::After => "after",
                    Self::PickerIcon => "picker-icon",
                    Self::InterestHint => "interest-hint",
                    Self::Marker => "marker",
                    Self::Backdrop => "backdrop",
                    Self::Column => "column",
                    Self::Selection => "selection",
                    Self::SearchText => "search-text",
                    Self::TargetText => "target-text",
                    Self::SpellingError => "spelling-error",
                    Self::GrammarError => "grammar-error",
                    Self::Highlight => "highlight",
                    Self::FirstLineInherited => "first-line-inherited",
                    Self::ScrollMarker => "scroll-marker",
                    Self::ScrollMarkerGroup => "scroll-marker-group",
                    Self::ScrollButton => "scroll-button",
                    Self::Scrollbar => "scrollbar",
                    Self::ScrollbarThumb => "scrollbar-thumb",
                    Self::ScrollbarButton => "scrollbar-button",
                    Self::ScrollbarTrack => "scrollbar-track",
                    Self::ScrollbarTrackPiece => "scrollbar-track-piece",
                    Self::ScrollbarCorner => "scrollbar-corner",
                    Self::Resizer => "resizer",
                    Self::InputListButton => "input-list-button",
                    Self::ViewTransition => "view-transition",
                    Self::ViewTransitionGroup => "view-transition-group",
                    Self::ViewTransitionImagePair => "view-transition-image-pair",
                    Self::ViewTransitionGroupChildren => "view-transition-group-children",
                    Self::ViewTransitionOld => "view-transition-old",
                    Self::ViewTransitionNew => "view-transition-new",
                    Self::Placeholder => "placeholder",
                    Self::FileSelectorButton => "file-selector-button",
                    Self::DetailsContent => "details-content",
                    Self::Picker => "picker",
                    Self::PermissionIcon => "permission-icon",
                    Self::OverscrollAreaParent => "overscroll-area-parent",
                }
            }
        }
        impl std::str::FromStr for PseudoType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "first-line" => Ok(Self::FirstLine),
                    "first-letter" => Ok(Self::FirstLetter),
                    "checkmark" => Ok(Self::Checkmark),
                    "before" => Ok(Self::Before),
                    "after" => Ok(Self::After),
                    "picker-icon" => Ok(Self::PickerIcon),
                    "interest-hint" => Ok(Self::InterestHint),
                    "marker" => Ok(Self::Marker),
                    "backdrop" => Ok(Self::Backdrop),
                    "column" => Ok(Self::Column),
                    "selection" => Ok(Self::Selection),
                    "search-text" => Ok(Self::SearchText),
                    "target-text" => Ok(Self::TargetText),
                    "spelling-error" => Ok(Self::SpellingError),
                    "grammar-error" => Ok(Self::GrammarError),
                    "highlight" => Ok(Self::Highlight),
                    "first-line-inherited" => Ok(Self::FirstLineInherited),
                    "scroll-marker" => Ok(Self::ScrollMarker),
                    "scroll-marker-group" => Ok(Self::ScrollMarkerGroup),
                    "scroll-button" => Ok(Self::ScrollButton),
                    "scrollbar" => Ok(Self::Scrollbar),
                    "scrollbar-thumb" => Ok(Self::ScrollbarThumb),
                    "scrollbar-button" => Ok(Self::ScrollbarButton),
                    "scrollbar-track" => Ok(Self::ScrollbarTrack),
                    "scrollbar-track-piece" => Ok(Self::ScrollbarTrackPiece),
                    "scrollbar-corner" => Ok(Self::ScrollbarCorner),
                    "resizer" => Ok(Self::Resizer),
                    "input-list-button" => Ok(Self::InputListButton),
                    "view-transition" => Ok(Self::ViewTransition),
                    "view-transition-group" => Ok(Self::ViewTransitionGroup),
                    "view-transition-image-pair" => Ok(Self::ViewTransitionImagePair),
                    "view-transition-group-children" => Ok(Self::ViewTransitionGroupChildren),
                    "view-transition-old" => Ok(Self::ViewTransitionOld),
                    "view-transition-new" => Ok(Self::ViewTransitionNew),
                    "placeholder" => Ok(Self::Placeholder),
                    "file-selector-button" => Ok(Self::FileSelectorButton),
                    "details-content" => Ok(Self::DetailsContent),
                    "picker" => Ok(Self::Picker),
                    "permission-icon" => Ok(Self::PermissionIcon),
                    "overscroll-area-parent" => Ok(Self::OverscrollAreaParent),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PseudoType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Shadow root type.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ShadowRootType {
            #[serde(rename = "user-agent")]
            UserAgent,
            #[serde(rename = "open")]
            Open,
            #[serde(rename = "closed")]
            Closed,
        }
        impl AsRef<str> for ShadowRootType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::UserAgent => "user-agent",
                    Self::Open => "open",
                    Self::Closed => "closed",
                }
            }
        }
        impl std::str::FromStr for ShadowRootType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "user-agent" => Ok(Self::UserAgent),
                    "open" => Ok(Self::Open),
                    "closed" => Ok(Self::Closed),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ShadowRootType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Document compatibility mode.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CompatibilityMode {
            #[serde(rename = "QuirksMode")]
            QuirksMode,
            #[serde(rename = "LimitedQuirksMode")]
            LimitedQuirksMode,
            #[serde(rename = "NoQuirksMode")]
            NoQuirksMode,
        }
        impl AsRef<str> for CompatibilityMode {
            fn as_ref(&self) -> &str {
                match self {
                    Self::QuirksMode => "QuirksMode",
                    Self::LimitedQuirksMode => "LimitedQuirksMode",
                    Self::NoQuirksMode => "NoQuirksMode",
                }
            }
        }
        impl std::str::FromStr for CompatibilityMode {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "QuirksMode" => Ok(Self::QuirksMode),
                    "LimitedQuirksMode" => Ok(Self::LimitedQuirksMode),
                    "NoQuirksMode" => Ok(Self::NoQuirksMode),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CompatibilityMode {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// ContainerSelector physical axes
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PhysicalAxes {
            #[serde(rename = "Horizontal")]
            Horizontal,
            #[serde(rename = "Vertical")]
            Vertical,
            #[serde(rename = "Both")]
            Both,
        }
        impl AsRef<str> for PhysicalAxes {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Horizontal => "Horizontal",
                    Self::Vertical => "Vertical",
                    Self::Both => "Both",
                }
            }
        }
        impl std::str::FromStr for PhysicalAxes {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Horizontal" => Ok(Self::Horizontal),
                    "Vertical" => Ok(Self::Vertical),
                    "Both" => Ok(Self::Both),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PhysicalAxes {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// ContainerSelector logical axes
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum LogicalAxes {
            #[serde(rename = "Inline")]
            Inline,
            #[serde(rename = "Block")]
            Block,
            #[serde(rename = "Both")]
            Both,
        }
        impl AsRef<str> for LogicalAxes {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Inline => "Inline",
                    Self::Block => "Block",
                    Self::Both => "Both",
                }
            }
        }
        impl std::str::FromStr for LogicalAxes {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Inline" => Ok(Self::Inline),
                    "Block" => Ok(Self::Block),
                    "Both" => Ok(Self::Both),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for LogicalAxes {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Physical scroll orientation
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ScrollOrientation {
            #[serde(rename = "horizontal")]
            Horizontal,
            #[serde(rename = "vertical")]
            Vertical,
        }
        impl AsRef<str> for ScrollOrientation {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Horizontal => "horizontal",
                    Self::Vertical => "vertical",
                }
            }
        }
        impl std::str::FromStr for ScrollOrientation {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "horizontal" => Ok(Self::Horizontal),
                    "vertical" => Ok(Self::Vertical),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ScrollOrientation {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Node {
            /// Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
            pub node_id: NodeId,
            /// The id of the parent node if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_id: Option<NodeId>,
            /// The BackendNodeId for this node.
            pub backend_node_id: BackendNodeId,
            /// `Node`'s nodeType.
            pub node_type: i64,
            /// `Node`'s nodeName.
            pub node_name: String,
            /// `Node`'s localName.
            pub local_name: String,
            /// `Node`'s nodeValue.
            pub node_value: String,
            /// Child count for `Container` nodes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub child_node_count: Option<i64>,
            /// Child nodes of this node when requested with children.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub children: Option<Vec<Node>>,
            /// Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub attributes: Option<Vec<String>>,
            /// Document URL that `Document` or `FrameOwner` node points to.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "documentURL")]
            pub document_url: Option<String>,
            /// Base URL that `Document` or `FrameOwner` node uses for URL completion.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "baseURL")]
            pub base_url: Option<String>,
            /// `DocumentType`'s publicId.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub public_id: Option<String>,
            /// `DocumentType`'s systemId.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub system_id: Option<String>,
            /// `DocumentType`'s internalSubset.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub internal_subset: Option<String>,
            /// `Document`'s XML version in case of XML documents.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub xml_version: Option<String>,
            /// `Attr`'s name.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            /// `Attr`'s value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<String>,
            /// Pseudo element type for this node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_type: Option<PseudoType>,
            /// Pseudo element identifier for this node. Only present if there is a valid pseudoType.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_identifier: Option<String>,
            /// Shadow root type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shadow_root_type: Option<ShadowRootType>,
            /// Frame ID for frame owner elements.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
            /// Content document for frame owner elements.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_document: Option<Box<Node>>,
            /// Shadow root list for given element host.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shadow_roots: Option<Vec<Node>>,
            /// Content document fragment for template elements.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub template_content: Option<Box<Node>>,
            /// Pseudo elements associated with this node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_elements: Option<Vec<Node>>,
            /// Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub imported_document: Option<Box<Node>>,
            /// Distributed nodes for given insertion point.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub distributed_nodes: Option<Vec<BackendNode>>,
            /// Whether the node is SVG.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "isSVG")]
            pub is_svg: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub compatibility_mode: Option<CompatibilityMode>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub assigned_slot: Option<BackendNode>,
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_scrollable: Option<bool>,
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub affected_by_starting_styles: Option<bool>,
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub adopted_style_sheets: Option<Vec<StyleSheetId>>,
        }

        /// A structure to hold the top-level node of a detached tree and an array of its retained descendants.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DetachedElementInfo {
            pub tree_node: Node,
            pub retained_node_ids: Vec<NodeId>,
        }

        /// A structure holding an RGBA color.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RGBA {
            /// The red component, in the [0-255] range.
            pub r: i64,
            /// The green component, in the [0-255] range.
            pub g: i64,
            /// The blue component, in the [0-255] range.
            pub b: i64,
            /// The alpha component, in the [0-1] range (default: 1).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub a: Option<f64>,
        }

        /// An array of quad vertices, x immediately followed by y for each point, points clock-wise.
        pub type Quad = Vec<f64>;

        /// Box model.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BoxModel {
            /// Content box
            pub content: Quad,
            /// Padding box
            pub padding: Quad,
            /// Border box
            pub border: Quad,
            /// Margin box
            pub margin: Quad,
            /// Node width
            pub width: i64,
            /// Node height
            pub height: i64,
            /// Shape outside coordinates
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shape_outside: Option<ShapeOutsideInfo>,
        }

        /// CSS Shape Outside details.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ShapeOutsideInfo {
            /// Shape bounds
            pub bounds: Quad,
            /// Shape coordinate details
            pub shape: Vec<serde_json::Value>,
            /// Margin shape bounds
            pub margin_shape: Vec<serde_json::Value>,
        }

        /// Rectangle.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Rect {
            /// X coordinate
            pub x: f64,
            /// Y coordinate
            pub y: f64,
            /// Rectangle width
            pub width: f64,
            /// Rectangle height
            pub height: f64,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CSSComputedStyleProperty {
            /// Computed style property name.
            pub name: String,
            /// Computed style property value.
            pub value: String,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CollectClassNamesFromSubtreeResponse {
            /// Class name list.
            pub class_names: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CopyToResponse {
            /// Id of the node clone.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DescribeNodeResponse {
            /// Node description.
            pub node: types::Node,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAttributesResponse {
            /// An interleaved array of node attribute names and values.
            pub attributes: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBoxModelResponse {
            /// Box model for the node.
            pub model: types::BoxModel,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetContentQuadsResponse {
            /// Quads that describe node layout relative to viewport.
            pub quads: Vec<types::Quad>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDocumentResponse {
            /// Resulting node.
            pub root: types::Node,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFlattenedDocumentResponse {
            /// Resulting node.
            pub nodes: Vec<types::Node>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNodesForSubtreeByStyleResponse {
            /// Resulting nodes.
            pub node_ids: Vec<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNodeForLocationResponse {
            /// Resulting node.
            pub backend_node_id: types::BackendNodeId,
            /// Frame this node belongs to.
            pub frame_id: page::types::FrameId,
            /// Id of the node at given coordinates, only when enabled and requested document.
            pub node_id: Option<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOuterHtmlResponse {
            /// Outer HTML markup.
            #[serde(rename = "outerHTML")]
            pub outer_html: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRelayoutBoundaryResponse {
            /// Relayout boundary node id for the given node.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSearchResultsResponse {
            /// Ids of the search result nodes.
            pub node_ids: Vec<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MoveToResponse {
            /// New id of the moved node.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PerformSearchResponse {
            /// Unique search session identifier.
            pub search_id: String,
            /// Number of search results.
            pub result_count: i64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PushNodeByPathToFrontendResponse {
            /// Id of the node for given path.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PushNodesByBackendIdsToFrontendResponse {
            /// The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
            pub node_ids: Vec<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QuerySelectorResponse {
            /// Query selector result.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QuerySelectorAllResponse {
            /// Query selector result.
            pub node_ids: Vec<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTopLayerElementsResponse {
            /// NodeIds of top layer elements
            pub node_ids: Vec<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetElementByRelationResponse {
            /// NodeId of the element matching the queried relation.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestNodeResponse {
            /// Node id for given object.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveNodeResponse {
            /// JavaScript object wrapper for given node.
            pub object: runtime::types::RemoteObject,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNodeStackTracesResponse {
            /// Creation stack trace, if available.
            pub creation: Option<runtime::types::StackTrace>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFileInfoResponse {
            pub path: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDetachedDomNodesResponse {
            /// The list of detached nodes
            pub detached_nodes: Vec<types::DetachedElementInfo>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetNodeNameResponse {
            /// New node's id.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFrameOwnerResponse {
            /// Resulting node.
            pub backend_node_id: types::BackendNodeId,
            /// Id of the node at given coordinates, only when enabled and requested document.
            pub node_id: Option<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetContainerForNodeResponse {
            /// The container node for the given node, or null if not found.
            pub node_id: Option<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetQueryingDescendantsForContainerResponse {
            /// Descendant nodes with container queries against the given container.
            pub node_ids: Vec<types::NodeId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAnchorElementResponse {
            /// The anchor element of the given anchor query.
            pub node_id: types::NodeId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ForceShowPopoverResponse {
            /// List of popovers that were closed in order to respect popover stacking order.
            pub node_ids: Vec<types::NodeId>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Collects class names for the node with given id and all of it's child nodes.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CollectClassNamesFromSubtree {
            /// Id of the node to collect class names.
            pub node_id: types::NodeId,
        }

        impl CollectClassNamesFromSubtree {
            pub fn new(node_id: types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CollectClassNamesFromSubtreeResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for CollectClassNamesFromSubtree {
            type Response = responses::CollectClassNamesFromSubtreeResponse;
            const METHOD: &'static str = "DOM.collectClassNamesFromSubtree";
        }

        /// Creates a deep copy of the specified node and places it into the target container before the given anchor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CopyTo {
            /// Id of the node to copy.
            pub node_id: types::NodeId,
            /// Id of the element to drop the copy into.
            pub target_node_id: types::NodeId,
            /// Drop the copy before this node (if absent, the copy becomes the last child of `targetNodeId`).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub insert_before_node_id: Option<types::NodeId>,
        }

        impl CopyTo {
            pub fn new(node_id: types::NodeId, target_node_id: types::NodeId) -> Self {
                Self {
                    node_id,
                    target_node_id,
                    insert_before_node_id: None,
                }
            }

            pub fn with_insert_before_node_id(
                mut self,
                insert_before_node_id: types::NodeId,
            ) -> Self {
                self.insert_before_node_id = Some(insert_before_node_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CopyToResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CopyTo {
            type Response = responses::CopyToResponse;
            const METHOD: &'static str = "DOM.copyTo";
        }

        /// Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DescribeNode {
            /// Identifier of the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Identifier of the backend node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<types::BackendNodeId>,
            /// JavaScript object id of the node wrapper.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
            /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub depth: Option<i64>,
            /// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pierce: Option<bool>,
        }

        impl DescribeNode {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                    depth: None,
                    pierce: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(mut self, backend_node_id: types::BackendNodeId) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }

            pub fn with_depth(mut self, depth: i64) -> Self {
                self.depth = Some(depth);
                self
            }

            pub fn with_pierce(mut self, pierce: bool) -> Self {
                self.pierce = Some(pierce);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::DescribeNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DescribeNode {
            type Response = responses::DescribeNodeResponse;
            const METHOD: &'static str = "DOM.describeNode";
        }

        /// Scrolls the specified rect of the given node into view if not already visible. Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScrollIntoViewIfNeeded {
            /// Identifier of the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Identifier of the backend node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<types::BackendNodeId>,
            /// JavaScript object id of the node wrapper.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
            /// The rect to be scrolled into view, relative to the node's border box, in CSS pixels. When omitted, center of the node will be used, similar to Element.scrollIntoView.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub rect: Option<types::Rect>,
        }

        impl ScrollIntoViewIfNeeded {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                    rect: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(mut self, backend_node_id: types::BackendNodeId) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }

            pub fn with_rect(mut self, rect: types::Rect) -> Self {
                self.rect = Some(rect);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ScrollIntoViewIfNeeded {
            type Response = ();
            const METHOD: &'static str = "DOM.scrollIntoViewIfNeeded";
        }

        /// Disables DOM agent for the given page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "DOM.disable";
        }

        /// Discards search results from the session with the given id. `getSearchResults` should no longer be called for that search.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DiscardSearchResults {
            /// Unique search session identifier.
            pub search_id: String,
        }

        impl DiscardSearchResults {
            pub fn new(search_id: impl Into<String>) -> Self {
                Self {
                    search_id: search_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DiscardSearchResults {
            type Response = ();
            const METHOD: &'static str = "DOM.discardSearchResults";
        }

        /// Enables DOM agent for the given page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// Whether to include whitespaces in the children array of returned Nodes.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_whitespace: Option<String>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self {
                    include_whitespace: None,
                }
            }

            pub fn with_include_whitespace(
                mut self,
                include_whitespace: impl Into<String>,
            ) -> Self {
                self.include_whitespace = Some(include_whitespace.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "DOM.enable";
        }

        /// Focuses the given element.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Focus {
            /// Identifier of the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Identifier of the backend node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<types::BackendNodeId>,
            /// JavaScript object id of the node wrapper.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
        }

        impl Focus {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(mut self, backend_node_id: types::BackendNodeId) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Focus {
            type Response = ();
            const METHOD: &'static str = "DOM.focus";
        }

        /// Returns attributes for the specified node.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAttributes {
            /// Id of the node to retrieve attributes for.
            pub node_id: types::NodeId,
        }

        impl GetAttributes {
            pub fn new(node_id: types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAttributesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAttributes {
            type Response = responses::GetAttributesResponse;
            const METHOD: &'static str = "DOM.getAttributes";
        }

        /// Returns boxes for the given node.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBoxModel {
            /// Identifier of the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Identifier of the backend node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<types::BackendNodeId>,
            /// JavaScript object id of the node wrapper.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
        }

        impl GetBoxModel {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(mut self, backend_node_id: types::BackendNodeId) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetBoxModelResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetBoxModel {
            type Response = responses::GetBoxModelResponse;
            const METHOD: &'static str = "DOM.getBoxModel";
        }

        /// Returns quads that describe node position on the page. This method might return multiple quads for inline nodes.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetContentQuads {
            /// Identifier of the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Identifier of the backend node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<types::BackendNodeId>,
            /// JavaScript object id of the node wrapper.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
        }

        impl GetContentQuads {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(mut self, backend_node_id: types::BackendNodeId) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetContentQuadsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetContentQuads {
            type Response = responses::GetContentQuadsResponse;
            const METHOD: &'static str = "DOM.getContentQuads";
        }

        /// Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDocument {
            /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub depth: Option<i64>,
            /// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pierce: Option<bool>,
        }

        impl GetDocument {
            pub fn new() -> Self {
                Self {
                    depth: None,
                    pierce: None,
                }
            }

            pub fn with_depth(mut self, depth: i64) -> Self {
                self.depth = Some(depth);
                self
            }

            pub fn with_pierce(mut self, pierce: bool) -> Self {
                self.pierce = Some(pierce);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDocumentResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDocument {
            type Response = responses::GetDocumentResponse;
            const METHOD: &'static str = "DOM.getDocument";
        }

        /// Returns the root DOM node (and optionally the subtree) to the caller. Deprecated, as it is not designed to work well with the rest of the DOM agent. Use DOMSnapshot.captureSnapshot instead.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFlattenedDocument {
            /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub depth: Option<i64>,
            /// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pierce: Option<bool>,
        }

        impl GetFlattenedDocument {
            pub fn new() -> Self {
                Self {
                    depth: None,
                    pierce: None,
                }
            }

            pub fn with_depth(mut self, depth: i64) -> Self {
                self.depth = Some(depth);
                self
            }

            pub fn with_pierce(mut self, pierce: bool) -> Self {
                self.pierce = Some(pierce);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetFlattenedDocumentResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetFlattenedDocument {
            type Response = responses::GetFlattenedDocumentResponse;
            const METHOD: &'static str = "DOM.getFlattenedDocument";
        }

        /// Finds nodes with a given computed style in a subtree.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNodesForSubtreeByStyle {
            /// Node ID pointing to the root of a subtree.
            pub node_id: types::NodeId,
            /// The style to filter nodes by (includes nodes if any of properties matches).
            pub computed_styles: Vec<types::CSSComputedStyleProperty>,
            /// Whether or not iframes and shadow roots in the same target should be traversed when returning the results (default is false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pierce: Option<bool>,
        }

        impl GetNodesForSubtreeByStyle {
            pub fn new(
                node_id: types::NodeId,
                computed_styles: Vec<types::CSSComputedStyleProperty>,
            ) -> Self {
                Self {
                    node_id,
                    computed_styles,
                    pierce: None,
                }
            }

            pub fn with_pierce(mut self, pierce: bool) -> Self {
                self.pierce = Some(pierce);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetNodesForSubtreeByStyleResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetNodesForSubtreeByStyle {
            type Response = responses::GetNodesForSubtreeByStyleResponse;
            const METHOD: &'static str = "DOM.getNodesForSubtreeByStyle";
        }

        /// Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNodeForLocation {
            /// X coordinate.
            pub x: i64,
            /// Y coordinate.
            pub y: i64,
            /// False to skip to the nearest non-UA shadow root ancestor (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeUserAgentShadowDOM")]
            pub include_user_agent_shadow_dom: Option<bool>,
            /// Whether to ignore pointer-events: none on elements and hit test them.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ignore_pointer_events_none: Option<bool>,
        }

        impl GetNodeForLocation {
            pub fn new(x: i64, y: i64) -> Self {
                Self {
                    x,
                    y,
                    include_user_agent_shadow_dom: None,
                    ignore_pointer_events_none: None,
                }
            }

            pub fn with_include_user_agent_shadow_dom(
                mut self,
                include_user_agent_shadow_dom: bool,
            ) -> Self {
                self.include_user_agent_shadow_dom = Some(include_user_agent_shadow_dom);
                self
            }

            pub fn with_ignore_pointer_events_none(
                mut self,
                ignore_pointer_events_none: bool,
            ) -> Self {
                self.ignore_pointer_events_none = Some(ignore_pointer_events_none);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetNodeForLocationResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetNodeForLocation {
            type Response = responses::GetNodeForLocationResponse;
            const METHOD: &'static str = "DOM.getNodeForLocation";
        }

        /// Returns node's HTML markup.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOuterHtml {
            /// Identifier of the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Identifier of the backend node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<types::BackendNodeId>,
            /// JavaScript object id of the node wrapper.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
            /// Include all shadow roots. Equals to false if not specified.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeShadowDOM")]
            pub include_shadow_dom: Option<bool>,
        }

        impl GetOuterHtml {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                    include_shadow_dom: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(mut self, backend_node_id: types::BackendNodeId) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }

            pub fn with_include_shadow_dom(mut self, include_shadow_dom: bool) -> Self {
                self.include_shadow_dom = Some(include_shadow_dom);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetOuterHtmlResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetOuterHtml {
            type Response = responses::GetOuterHtmlResponse;
            const METHOD: &'static str = "DOM.getOuterHTML";
        }

        /// Returns the id of the nearest ancestor that is a relayout boundary.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRelayoutBoundary {
            /// Id of the node.
            pub node_id: types::NodeId,
        }

        impl GetRelayoutBoundary {
            pub fn new(node_id: types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetRelayoutBoundaryResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetRelayoutBoundary {
            type Response = responses::GetRelayoutBoundaryResponse;
            const METHOD: &'static str = "DOM.getRelayoutBoundary";
        }

        /// Returns search results from given `fromIndex` to given `toIndex` from the search with the given identifier.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSearchResults {
            /// Unique search session identifier.
            pub search_id: String,
            /// Start index of the search result to be returned.
            pub from_index: i64,
            /// End index of the search result to be returned.
            pub to_index: i64,
        }

        impl GetSearchResults {
            pub fn new(search_id: impl Into<String>, from_index: i64, to_index: i64) -> Self {
                Self {
                    search_id: search_id.into(),
                    from_index,
                    to_index,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSearchResultsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSearchResults {
            type Response = responses::GetSearchResultsResponse;
            const METHOD: &'static str = "DOM.getSearchResults";
        }

        /// Hides any highlight.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HideHighlight {}

        impl HideHighlight {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HideHighlight {
            type Response = ();
            const METHOD: &'static str = "DOM.hideHighlight";
        }

        /// Highlights DOM node.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightNode {}

        impl HighlightNode {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HighlightNode {
            type Response = ();
            const METHOD: &'static str = "DOM.highlightNode";
        }

        /// Highlights given rectangle.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightRect {}

        impl HighlightRect {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HighlightRect {
            type Response = ();
            const METHOD: &'static str = "DOM.highlightRect";
        }

        /// Marks last undoable state.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MarkUndoableState {}

        impl MarkUndoableState {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for MarkUndoableState {
            type Response = ();
            const METHOD: &'static str = "DOM.markUndoableState";
        }

        /// Moves node into the new container, places it before the given anchor.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MoveTo {
            /// Id of the node to move.
            pub node_id: types::NodeId,
            /// Id of the element to drop the moved node into.
            pub target_node_id: types::NodeId,
            /// Drop node before this one (if absent, the moved node becomes the last child of `targetNodeId`).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub insert_before_node_id: Option<types::NodeId>,
        }

        impl MoveTo {
            pub fn new(node_id: types::NodeId, target_node_id: types::NodeId) -> Self {
                Self {
                    node_id,
                    target_node_id,
                    insert_before_node_id: None,
                }
            }

            pub fn with_insert_before_node_id(
                mut self,
                insert_before_node_id: types::NodeId,
            ) -> Self {
                self.insert_before_node_id = Some(insert_before_node_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::MoveToResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for MoveTo {
            type Response = responses::MoveToResponse;
            const METHOD: &'static str = "DOM.moveTo";
        }

        /// Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or `cancelSearch` to end this search session.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PerformSearch {
            /// Plain text or query selector or XPath search query.
            pub query: String,
            /// True to search in user agent shadow DOM.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeUserAgentShadowDOM")]
            pub include_user_agent_shadow_dom: Option<bool>,
        }

        impl PerformSearch {
            pub fn new(query: impl Into<String>) -> Self {
                Self {
                    query: query.into(),
                    include_user_agent_shadow_dom: None,
                }
            }

            pub fn with_include_user_agent_shadow_dom(
                mut self,
                include_user_agent_shadow_dom: bool,
            ) -> Self {
                self.include_user_agent_shadow_dom = Some(include_user_agent_shadow_dom);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::PerformSearchResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for PerformSearch {
            type Response = responses::PerformSearchResponse;
            const METHOD: &'static str = "DOM.performSearch";
        }

        /// Requests that the node is sent to the caller given its path. // FIXME, use XPath
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PushNodeByPathToFrontend {
            /// Path to node in the proprietary format.
            pub path: String,
        }

        impl PushNodeByPathToFrontend {
            pub fn new(path: impl Into<String>) -> Self {
                Self { path: path.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::PushNodeByPathToFrontendResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for PushNodeByPathToFrontend {
            type Response = responses::PushNodeByPathToFrontendResponse;
            const METHOD: &'static str = "DOM.pushNodeByPathToFrontend";
        }

        /// Requests that a batch of nodes is sent to the caller given their backend node ids.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PushNodesByBackendIdsToFrontend {
            /// The array of backend node ids.
            pub backend_node_ids: Vec<types::BackendNodeId>,
        }

        impl PushNodesByBackendIdsToFrontend {
            pub fn new(backend_node_ids: Vec<types::BackendNodeId>) -> Self {
                Self { backend_node_ids }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::PushNodesByBackendIdsToFrontendResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for PushNodesByBackendIdsToFrontend {
            type Response = responses::PushNodesByBackendIdsToFrontendResponse;
            const METHOD: &'static str = "DOM.pushNodesByBackendIdsToFrontend";
        }

        /// Executes `querySelector` on a given node.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QuerySelector {
            /// Id of the node to query upon.
            pub node_id: types::NodeId,
            /// Selector string.
            pub selector: String,
        }

        impl QuerySelector {
            pub fn new(node_id: types::NodeId, selector: impl Into<String>) -> Self {
                Self {
                    node_id,
                    selector: selector.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::QuerySelectorResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for QuerySelector {
            type Response = responses::QuerySelectorResponse;
            const METHOD: &'static str = "DOM.querySelector";
        }

        /// Executes `querySelectorAll` on a given node.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QuerySelectorAll {
            /// Id of the node to query upon.
            pub node_id: types::NodeId,
            /// Selector string.
            pub selector: String,
        }

        impl QuerySelectorAll {
            pub fn new(node_id: types::NodeId, selector: impl Into<String>) -> Self {
                Self {
                    node_id,
                    selector: selector.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::QuerySelectorAllResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for QuerySelectorAll {
            type Response = responses::QuerySelectorAllResponse;
            const METHOD: &'static str = "DOM.querySelectorAll";
        }

        /// Returns NodeIds of current top layer elements. Top layer is rendered closest to the user within a viewport, therefore its elements always appear on top of all other content.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTopLayerElements {}

        impl GetTopLayerElements {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetTopLayerElementsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetTopLayerElements {
            type Response = responses::GetTopLayerElementsResponse;
            const METHOD: &'static str = "DOM.getTopLayerElements";
        }

        /// Returns the NodeId of the matched element according to certain relations.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetElementByRelation {
            /// Id of the node from which to query the relation.
            pub node_id: types::NodeId,
            /// Type of relation to get.
            pub relation: String,
        }

        impl GetElementByRelation {
            pub fn new(node_id: types::NodeId, relation: impl Into<String>) -> Self {
                Self {
                    node_id,
                    relation: relation.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetElementByRelationResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetElementByRelation {
            type Response = responses::GetElementByRelationResponse;
            const METHOD: &'static str = "DOM.getElementByRelation";
        }

        /// Re-does the last undone action.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Redo {}

        impl Redo {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Redo {
            type Response = ();
            const METHOD: &'static str = "DOM.redo";
        }

        /// Removes attribute with given name from an element with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveAttribute {
            /// Id of the element to remove attribute from.
            pub node_id: types::NodeId,
            /// Name of the attribute to remove.
            pub name: String,
        }

        impl RemoveAttribute {
            pub fn new(node_id: types::NodeId, name: impl Into<String>) -> Self {
                Self {
                    node_id,
                    name: name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveAttribute {
            type Response = ();
            const METHOD: &'static str = "DOM.removeAttribute";
        }

        /// Removes node with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveNode {
            /// Id of the node to remove.
            pub node_id: types::NodeId,
        }

        impl RemoveNode {
            pub fn new(node_id: types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveNode {
            type Response = ();
            const METHOD: &'static str = "DOM.removeNode";
        }

        /// Requests that children of the node with given id are returned to the caller in form of `setChildNodes` events where not only immediate children are retrieved, but all children down to the specified depth.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestChildNodes {
            /// Id of the node to get children for.
            pub node_id: types::NodeId,
            /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub depth: Option<i64>,
            /// Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pierce: Option<bool>,
        }

        impl RequestChildNodes {
            pub fn new(node_id: types::NodeId) -> Self {
                Self {
                    node_id,
                    depth: None,
                    pierce: None,
                }
            }

            pub fn with_depth(mut self, depth: i64) -> Self {
                self.depth = Some(depth);
                self
            }

            pub fn with_pierce(mut self, pierce: bool) -> Self {
                self.pierce = Some(pierce);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestChildNodes {
            type Response = ();
            const METHOD: &'static str = "DOM.requestChildNodes";
        }

        /// Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of `setChildNodes` notifications.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestNode {
            /// JavaScript object id to convert into node.
            pub object_id: runtime::types::RemoteObjectId,
        }

        impl RequestNode {
            pub fn new(object_id: runtime::types::RemoteObjectId) -> Self {
                Self { object_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestNode {
            type Response = responses::RequestNodeResponse;
            const METHOD: &'static str = "DOM.requestNode";
        }

        /// Resolves the JavaScript node object for a given NodeId or BackendNodeId.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveNode {
            /// Id of the node to resolve.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Backend identifier of the node to resolve.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// Symbolic group name that can be used to release multiple objects.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_group: Option<String>,
            /// Execution context in which to resolve the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_id: Option<runtime::types::ExecutionContextId>,
        }

        impl ResolveNode {
            pub fn new() -> Self {
                Self {
                    node_id: None,
                    backend_node_id: None,
                    object_group: None,
                    execution_context_id: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(
                mut self,
                backend_node_id: dom::types::BackendNodeId,
            ) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_group(mut self, object_group: impl Into<String>) -> Self {
                self.object_group = Some(object_group.into());
                self
            }

            pub fn with_execution_context_id(
                mut self,
                execution_context_id: runtime::types::ExecutionContextId,
            ) -> Self {
                self.execution_context_id = Some(execution_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ResolveNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResolveNode {
            type Response = responses::ResolveNodeResponse;
            const METHOD: &'static str = "DOM.resolveNode";
        }

        /// Sets attribute for an element with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAttributeValue {
            /// Id of the element to set attribute for.
            pub node_id: types::NodeId,
            /// Attribute name.
            pub name: String,
            /// Attribute value.
            pub value: String,
        }

        impl SetAttributeValue {
            pub fn new(
                node_id: types::NodeId,
                name: impl Into<String>,
                value: impl Into<String>,
            ) -> Self {
                Self {
                    node_id,
                    name: name.into(),
                    value: value.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAttributeValue {
            type Response = ();
            const METHOD: &'static str = "DOM.setAttributeValue";
        }

        /// Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAttributesAsText {
            /// Id of the element to set attributes for.
            pub node_id: types::NodeId,
            /// Text with a number of attributes. Will parse this text using HTML parser.
            pub text: String,
            /// Attribute name to replace with new attributes derived from text in case text parsed successfully.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
        }

        impl SetAttributesAsText {
            pub fn new(node_id: types::NodeId, text: impl Into<String>) -> Self {
                Self {
                    node_id,
                    text: text.into(),
                    name: None,
                }
            }

            pub fn with_name(mut self, name: impl Into<String>) -> Self {
                self.name = Some(name.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAttributesAsText {
            type Response = ();
            const METHOD: &'static str = "DOM.setAttributesAsText";
        }

        /// Sets files for the given file input element.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetFileInputFiles {
            /// Array of file paths to set.
            pub files: Vec<String>,
            /// Identifier of the node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<types::NodeId>,
            /// Identifier of the backend node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<types::BackendNodeId>,
            /// JavaScript object id of the node wrapper.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
        }

        impl SetFileInputFiles {
            pub fn new(files: Vec<String>) -> Self {
                Self {
                    files,
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                }
            }

            pub fn with_node_id(mut self, node_id: types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(mut self, backend_node_id: types::BackendNodeId) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetFileInputFiles {
            type Response = ();
            const METHOD: &'static str = "DOM.setFileInputFiles";
        }

        /// Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetNodeStackTracesEnabled {
            /// Enable or disable.
            pub enable: bool,
        }

        impl SetNodeStackTracesEnabled {
            pub fn new(enable: bool) -> Self {
                Self { enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetNodeStackTracesEnabled {
            type Response = ();
            const METHOD: &'static str = "DOM.setNodeStackTracesEnabled";
        }

        /// Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNodeStackTraces {
            /// Id of the node to get stack traces for.
            pub node_id: types::NodeId,
        }

        impl GetNodeStackTraces {
            pub fn new(node_id: types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetNodeStackTracesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetNodeStackTraces {
            type Response = responses::GetNodeStackTracesResponse;
            const METHOD: &'static str = "DOM.getNodeStackTraces";
        }

        /// Returns file information for the given File wrapper.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFileInfo {
            /// JavaScript object id of the node wrapper.
            pub object_id: runtime::types::RemoteObjectId,
        }

        impl GetFileInfo {
            pub fn new(object_id: runtime::types::RemoteObjectId) -> Self {
                Self { object_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetFileInfoResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetFileInfo {
            type Response = responses::GetFileInfoResponse;
            const METHOD: &'static str = "DOM.getFileInfo";
        }

        /// Returns list of detached nodes
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDetachedDomNodes {}

        impl GetDetachedDomNodes {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDetachedDomNodesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDetachedDomNodes {
            type Response = responses::GetDetachedDomNodesResponse;
            const METHOD: &'static str = "DOM.getDetachedDomNodes";
        }

        /// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInspectedNode {
            /// DOM node id to be accessible by means of $x command line API.
            pub node_id: types::NodeId,
        }

        impl SetInspectedNode {
            pub fn new(node_id: types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInspectedNode {
            type Response = ();
            const METHOD: &'static str = "DOM.setInspectedNode";
        }

        /// Sets node name for a node with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetNodeName {
            /// Id of the node to set name for.
            pub node_id: types::NodeId,
            /// New node's name.
            pub name: String,
        }

        impl SetNodeName {
            pub fn new(node_id: types::NodeId, name: impl Into<String>) -> Self {
                Self {
                    node_id,
                    name: name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetNodeNameResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetNodeName {
            type Response = responses::SetNodeNameResponse;
            const METHOD: &'static str = "DOM.setNodeName";
        }

        /// Sets node value for a node with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetNodeValue {
            /// Id of the node to set value for.
            pub node_id: types::NodeId,
            /// New node's value.
            pub value: String,
        }

        impl SetNodeValue {
            pub fn new(node_id: types::NodeId, value: impl Into<String>) -> Self {
                Self {
                    node_id,
                    value: value.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetNodeValue {
            type Response = ();
            const METHOD: &'static str = "DOM.setNodeValue";
        }

        /// Sets node HTML markup, returns new node id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetOuterHtml {
            /// Id of the node to set markup for.
            pub node_id: types::NodeId,
            /// Outer HTML markup to set.
            #[serde(rename = "outerHTML")]
            pub outer_html: String,
        }

        impl SetOuterHtml {
            pub fn new(node_id: types::NodeId, outer_html: impl Into<String>) -> Self {
                Self {
                    node_id,
                    outer_html: outer_html.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetOuterHtml {
            type Response = ();
            const METHOD: &'static str = "DOM.setOuterHTML";
        }

        /// Undoes the last performed action.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Undo {}

        impl Undo {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Undo {
            type Response = ();
            const METHOD: &'static str = "DOM.undo";
        }

        /// Returns iframe node that owns iframe with the given domain.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFrameOwner {
            pub frame_id: page::types::FrameId,
        }

        impl GetFrameOwner {
            pub fn new(frame_id: page::types::FrameId) -> Self {
                Self { frame_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetFrameOwnerResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetFrameOwner {
            type Response = responses::GetFrameOwnerResponse;
            const METHOD: &'static str = "DOM.getFrameOwner";
        }

        /// Returns the query container of the given node based on container query conditions: containerName, physical and logical axes, and whether it queries scroll-state or anchored elements. If no axes are provided and queriesScrollState is false, the style container is returned, which is the direct parent or the closest element with a matching container-name.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetContainerForNode {
            pub node_id: types::NodeId,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub container_name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub physical_axes: Option<types::PhysicalAxes>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub logical_axes: Option<types::LogicalAxes>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub queries_scroll_state: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub queries_anchored: Option<bool>,
        }

        impl GetContainerForNode {
            pub fn new(node_id: types::NodeId) -> Self {
                Self {
                    node_id,
                    container_name: None,
                    physical_axes: None,
                    logical_axes: None,
                    queries_scroll_state: None,
                    queries_anchored: None,
                }
            }

            pub fn with_container_name(mut self, container_name: impl Into<String>) -> Self {
                self.container_name = Some(container_name.into());
                self
            }

            pub fn with_physical_axes(mut self, physical_axes: types::PhysicalAxes) -> Self {
                self.physical_axes = Some(physical_axes);
                self
            }

            pub fn with_logical_axes(mut self, logical_axes: types::LogicalAxes) -> Self {
                self.logical_axes = Some(logical_axes);
                self
            }

            pub fn with_queries_scroll_state(mut self, queries_scroll_state: bool) -> Self {
                self.queries_scroll_state = Some(queries_scroll_state);
                self
            }

            pub fn with_queries_anchored(mut self, queries_anchored: bool) -> Self {
                self.queries_anchored = Some(queries_anchored);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetContainerForNodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetContainerForNode {
            type Response = responses::GetContainerForNodeResponse;
            const METHOD: &'static str = "DOM.getContainerForNode";
        }

        /// Returns the descendants of a container query container that have container queries against this container.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetQueryingDescendantsForContainer {
            /// Id of the container node to find querying descendants from.
            pub node_id: types::NodeId,
        }

        impl GetQueryingDescendantsForContainer {
            pub fn new(node_id: types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetQueryingDescendantsForContainerResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for GetQueryingDescendantsForContainer {
            type Response = responses::GetQueryingDescendantsForContainerResponse;
            const METHOD: &'static str = "DOM.getQueryingDescendantsForContainer";
        }

        /// Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAnchorElement {
            /// Id of the positioned element from which to find the anchor.
            pub node_id: types::NodeId,
            /// An optional anchor specifier, as defined in https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier. If not provided, it will return the implicit anchor element for the given positioned element.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub anchor_specifier: Option<String>,
        }

        impl GetAnchorElement {
            pub fn new(node_id: types::NodeId) -> Self {
                Self {
                    node_id,
                    anchor_specifier: None,
                }
            }

            pub fn with_anchor_specifier(mut self, anchor_specifier: impl Into<String>) -> Self {
                self.anchor_specifier = Some(anchor_specifier.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAnchorElementResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAnchorElement {
            type Response = responses::GetAnchorElementResponse;
            const METHOD: &'static str = "DOM.getAnchorElement";
        }

        /// When enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ForceShowPopover {
            /// Id of the popover HTMLElement
            pub node_id: types::NodeId,
            /// If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.
            pub enable: bool,
        }

        impl ForceShowPopover {
            pub fn new(node_id: types::NodeId, enable: bool) -> Self {
                Self { node_id, enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ForceShowPopoverResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ForceShowPopover {
            type Response = responses::ForceShowPopoverResponse;
            const METHOD: &'static str = "DOM.forceShowPopover";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Fired when `Element`'s attribute is modified.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributeModified {
            /// Id of the node that has changed.
            pub node_id: types::NodeId,
            /// Attribute name.
            pub name: String,
            /// Attribute value.
            pub value: String,
        }

        impl AttributeModified {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.attributeModified")
            }
        }

        /// Fired when `Element`'s adoptedStyleSheets are modified.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AdoptedStyleSheetsModified {
            /// Id of the node that has changed.
            pub node_id: types::NodeId,
            /// New adoptedStyleSheets array.
            /// **EXPERIMENTAL**
            pub adopted_style_sheets: Vec<types::StyleSheetId>,
        }

        impl AdoptedStyleSheetsModified {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.adoptedStyleSheetsModified")
            }
        }

        /// Fired when `Element`'s attribute is removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributeRemoved {
            /// Id of the node that has changed.
            pub node_id: types::NodeId,
            /// A ttribute name.
            pub name: String,
        }

        impl AttributeRemoved {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.attributeRemoved")
            }
        }

        /// Mirrors `DOMCharacterDataModified` event.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CharacterDataModified {
            /// Id of the node that has changed.
            pub node_id: types::NodeId,
            /// New text value.
            pub character_data: String,
        }

        impl CharacterDataModified {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.characterDataModified")
            }
        }

        /// Fired when `Container`'s child node count has changed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ChildNodeCountUpdated {
            /// Id of the node that has changed.
            pub node_id: types::NodeId,
            /// New node count.
            pub child_node_count: i64,
        }

        impl ChildNodeCountUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.childNodeCountUpdated")
            }
        }

        /// Mirrors `DOMNodeInserted` event.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ChildNodeInserted {
            /// Id of the node that has changed.
            pub parent_node_id: types::NodeId,
            /// Id of the previous sibling.
            pub previous_node_id: types::NodeId,
            /// Inserted node data.
            pub node: types::Node,
        }

        impl ChildNodeInserted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.childNodeInserted")
            }
        }

        /// Mirrors `DOMNodeRemoved` event.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ChildNodeRemoved {
            /// Parent id.
            pub parent_node_id: types::NodeId,
            /// Id of the node that has been removed.
            pub node_id: types::NodeId,
        }

        impl ChildNodeRemoved {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.childNodeRemoved")
            }
        }

        /// Called when distribution is changed.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DistributedNodesUpdated {
            /// Insertion point where distributed nodes were updated.
            pub insertion_point_id: types::NodeId,
            /// Distributed nodes for given insertion point.
            pub distributed_nodes: Vec<types::BackendNode>,
        }

        impl DistributedNodesUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.distributedNodesUpdated")
            }
        }

        /// Fired when `Document` has been totally updated. Node ids are no longer valid.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DocumentUpdated {}

        impl DocumentUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.documentUpdated")
            }
        }

        /// Fired when `Element`'s inline style is modified via a CSS property modification.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InlineStyleInvalidated {
            /// Ids of the nodes for which the inline styles have been invalidated.
            pub node_ids: Vec<types::NodeId>,
        }

        impl InlineStyleInvalidated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.inlineStyleInvalidated")
            }
        }

        /// Called when a pseudo element is added to an element.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PseudoElementAdded {
            /// Pseudo element's parent element id.
            pub parent_id: types::NodeId,
            /// The added pseudo element.
            pub pseudo_element: types::Node,
        }

        impl PseudoElementAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.pseudoElementAdded")
            }
        }

        /// Called when top layer elements are changed.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TopLayerElementsUpdated {}

        impl TopLayerElementsUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.topLayerElementsUpdated")
            }
        }

        /// Fired when a node's scrollability state changes.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScrollableFlagUpdated {
            /// The id of the node.
            pub node_id: dom::types::NodeId,
            /// If the node is scrollable.
            pub is_scrollable: bool,
        }

        impl ScrollableFlagUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.scrollableFlagUpdated")
            }
        }

        /// Fired when a node's starting styles changes.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AffectedByStartingStylesFlagUpdated {
            /// The id of the node.
            pub node_id: dom::types::NodeId,
            /// If the node has starting styles.
            pub affected_by_starting_styles: bool,
        }

        impl AffectedByStartingStylesFlagUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.affectedByStartingStylesFlagUpdated")
            }
        }

        /// Called when a pseudo element is removed from an element.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PseudoElementRemoved {
            /// Pseudo element's parent element id.
            pub parent_id: types::NodeId,
            /// The removed pseudo element id.
            pub pseudo_element_id: types::NodeId,
        }

        impl PseudoElementRemoved {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.pseudoElementRemoved")
            }
        }

        /// Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetChildNodes {
            /// Parent node id to populate with children.
            pub parent_id: types::NodeId,
            /// Child nodes array.
            pub nodes: Vec<types::Node>,
        }

        impl SetChildNodes {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.setChildNodes")
            }
        }

        /// Called when shadow root is popped from the element.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ShadowRootPopped {
            /// Host element id.
            pub host_id: types::NodeId,
            /// Shadow root id.
            pub root_id: types::NodeId,
        }

        impl ShadowRootPopped {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.shadowRootPopped")
            }
        }

        /// Called when shadow root is pushed into the element.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ShadowRootPushed {
            /// Host element id.
            pub host_id: types::NodeId,
            /// Shadow root.
            pub root: types::Node,
        }

        impl ShadowRootPushed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOM.shadowRootPushed")
            }
        }
    }
}

pub mod dom_debugger {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// DOM breakpoint type.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DOMBreakpointType {
            #[serde(rename = "subtree-modified")]
            SubtreeModified,
            #[serde(rename = "attribute-modified")]
            AttributeModified,
            #[serde(rename = "node-removed")]
            NodeRemoved,
        }
        impl AsRef<str> for DOMBreakpointType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SubtreeModified => "subtree-modified",
                    Self::AttributeModified => "attribute-modified",
                    Self::NodeRemoved => "node-removed",
                }
            }
        }
        impl std::str::FromStr for DOMBreakpointType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "subtree-modified" => Ok(Self::SubtreeModified),
                    "attribute-modified" => Ok(Self::AttributeModified),
                    "node-removed" => Ok(Self::NodeRemoved),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DOMBreakpointType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// CSP Violation type.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CSPViolationType {
            #[serde(rename = "trustedtype-sink-violation")]
            TrustedtypeSinkViolation,
            #[serde(rename = "trustedtype-policy-violation")]
            TrustedtypePolicyViolation,
        }
        impl AsRef<str> for CSPViolationType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::TrustedtypeSinkViolation => "trustedtype-sink-violation",
                    Self::TrustedtypePolicyViolation => "trustedtype-policy-violation",
                }
            }
        }
        impl std::str::FromStr for CSPViolationType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "trustedtype-sink-violation" => Ok(Self::TrustedtypeSinkViolation),
                    "trustedtype-policy-violation" => Ok(Self::TrustedtypePolicyViolation),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CSPViolationType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Object event listener.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EventListener {
            /// `EventListener`'s type.
            pub type_: String,
            /// `EventListener`'s useCapture.
            pub use_capture: bool,
            /// `EventListener`'s passive flag.
            pub passive: bool,
            /// `EventListener`'s once flag.
            pub once: bool,
            /// Script id of the handler code.
            pub script_id: runtime::types::ScriptId,
            /// Line number in the script (0-based).
            pub line_number: i64,
            /// Column number in the script (0-based).
            pub column_number: i64,
            /// Event handler function value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub handler: Option<runtime::types::RemoteObject>,
            /// Event original handler function value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub original_handler: Option<runtime::types::RemoteObject>,
            /// Node the listener is added to (if any).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetEventListenersResponse {
            /// Array of relevant listeners.
            pub listeners: Vec<types::EventListener>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Returns event listeners of the given object.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetEventListeners {
            /// Identifier of the object to return listeners for.
            pub object_id: runtime::types::RemoteObjectId,
            /// The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub depth: Option<i64>,
            /// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pierce: Option<bool>,
        }

        impl GetEventListeners {
            pub fn new(object_id: runtime::types::RemoteObjectId) -> Self {
                Self {
                    object_id,
                    depth: None,
                    pierce: None,
                }
            }

            pub fn with_depth(mut self, depth: i64) -> Self {
                self.depth = Some(depth);
                self
            }

            pub fn with_pierce(mut self, pierce: bool) -> Self {
                self.pierce = Some(pierce);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetEventListenersResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetEventListeners {
            type Response = responses::GetEventListenersResponse;
            const METHOD: &'static str = "DOMDebugger.getEventListeners";
        }

        /// Removes DOM breakpoint that was set using `setDOMBreakpoint`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveDomBreakpoint {
            /// Identifier of the node to remove breakpoint from.
            pub node_id: dom::types::NodeId,
            /// Type of the breakpoint to remove.
            pub type_: types::DOMBreakpointType,
        }

        impl RemoveDomBreakpoint {
            pub fn new(node_id: dom::types::NodeId, type_: types::DOMBreakpointType) -> Self {
                Self { node_id, type_ }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveDomBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.removeDOMBreakpoint";
        }

        /// Removes breakpoint on particular DOM event.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveEventListenerBreakpoint {
            /// Event name.
            pub event_name: String,
            /// EventTarget interface name.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_name: Option<String>,
        }

        impl RemoveEventListenerBreakpoint {
            pub fn new(event_name: impl Into<String>) -> Self {
                Self {
                    event_name: event_name.into(),
                    target_name: None,
                }
            }

            pub fn with_target_name(mut self, target_name: impl Into<String>) -> Self {
                self.target_name = Some(target_name.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveEventListenerBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.removeEventListenerBreakpoint";
        }

        /// Removes breakpoint on particular native event.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveInstrumentationBreakpoint {
            /// Instrumentation name to stop on.
            pub event_name: String,
        }

        impl RemoveInstrumentationBreakpoint {
            pub fn new(event_name: impl Into<String>) -> Self {
                Self {
                    event_name: event_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveInstrumentationBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.removeInstrumentationBreakpoint";
        }

        /// Removes breakpoint from XMLHttpRequest.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveXhrBreakpoint {
            /// Resource URL substring.
            pub url: String,
        }

        impl RemoveXhrBreakpoint {
            pub fn new(url: impl Into<String>) -> Self {
                Self { url: url.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveXhrBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.removeXHRBreakpoint";
        }

        /// Sets breakpoint on particular CSP violations.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakOnCspViolation {
            /// CSP Violations to stop upon.
            pub violation_types: Vec<types::CSPViolationType>,
        }

        impl SetBreakOnCspViolation {
            pub fn new(violation_types: Vec<types::CSPViolationType>) -> Self {
                Self { violation_types }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBreakOnCspViolation {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.setBreakOnCSPViolation";
        }

        /// Sets breakpoint on particular operation with DOM.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDomBreakpoint {
            /// Identifier of the node to set breakpoint on.
            pub node_id: dom::types::NodeId,
            /// Type of the operation to stop upon.
            pub type_: types::DOMBreakpointType,
        }

        impl SetDomBreakpoint {
            pub fn new(node_id: dom::types::NodeId, type_: types::DOMBreakpointType) -> Self {
                Self { node_id, type_ }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDomBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.setDOMBreakpoint";
        }

        /// Sets breakpoint on particular DOM event.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetEventListenerBreakpoint {
            /// DOM Event name to stop on (any DOM event will do).
            pub event_name: String,
            /// EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any EventTarget.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_name: Option<String>,
        }

        impl SetEventListenerBreakpoint {
            pub fn new(event_name: impl Into<String>) -> Self {
                Self {
                    event_name: event_name.into(),
                    target_name: None,
                }
            }

            pub fn with_target_name(mut self, target_name: impl Into<String>) -> Self {
                self.target_name = Some(target_name.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetEventListenerBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.setEventListenerBreakpoint";
        }

        /// Sets breakpoint on particular native event.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInstrumentationBreakpoint {
            /// Instrumentation name to stop on.
            pub event_name: String,
        }

        impl SetInstrumentationBreakpoint {
            pub fn new(event_name: impl Into<String>) -> Self {
                Self {
                    event_name: event_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInstrumentationBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.setInstrumentationBreakpoint";
        }

        /// Sets breakpoint on XMLHttpRequest.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetXhrBreakpoint {
            /// Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
            pub url: String,
        }

        impl SetXhrBreakpoint {
            pub fn new(url: impl Into<String>) -> Self {
                Self { url: url.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetXhrBreakpoint {
            type Response = ();
            const METHOD: &'static str = "DOMDebugger.setXHRBreakpoint";
        }
    }
}

pub mod dom_snapshot {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// A Node in the DOM tree.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DOMNode {
            /// `Node`'s nodeType.
            pub node_type: i64,
            /// `Node`'s nodeName.
            pub node_name: String,
            /// `Node`'s nodeValue.
            pub node_value: String,
            /// Only set for textarea elements, contains the text value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub text_value: Option<String>,
            /// Only set for input elements, contains the input's associated text value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub input_value: Option<String>,
            /// Only set for radio and checkbox input elements, indicates if the element has been checked
            #[serde(skip_serializing_if = "Option::is_none")]
            pub input_checked: Option<bool>,
            /// Only set for option elements, indicates if the element has been selected
            #[serde(skip_serializing_if = "Option::is_none")]
            pub option_selected: Option<bool>,
            /// `Node`'s id, corresponds to DOM.Node.backendNodeId.
            pub backend_node_id: dom::types::BackendNodeId,
            /// The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub child_node_indexes: Option<Vec<i64>>,
            /// Attributes of an `Element` node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub attributes: Option<Vec<NameValue>>,
            /// Indexes of pseudo elements associated with this node in the `domNodes` array returned by `getSnapshot`, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_element_indexes: Option<Vec<i64>>,
            /// The index of the node's related layout tree node in the `layoutTreeNodes` array returned by `getSnapshot`, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub layout_node_index: Option<i64>,
            /// Document URL that `Document` or `FrameOwner` node points to.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "documentURL")]
            pub document_url: Option<String>,
            /// Base URL that `Document` or `FrameOwner` node uses for URL completion.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "baseURL")]
            pub base_url: Option<String>,
            /// Only set for documents, contains the document's content language.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_language: Option<String>,
            /// Only set for documents, contains the document's character set encoding.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub document_encoding: Option<String>,
            /// `DocumentType` node's publicId.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub public_id: Option<String>,
            /// `DocumentType` node's systemId.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub system_id: Option<String>,
            /// Frame ID for frame owner elements and also for the document node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
            /// The index of a frame owner element's content document in the `domNodes` array returned by `getSnapshot`, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_document_index: Option<i64>,
            /// Type of a pseudo element node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_type: Option<dom::types::PseudoType>,
            /// Shadow root type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shadow_root_type: Option<dom::types::ShadowRootType>,
            /// Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_clickable: Option<bool>,
            /// Details of the node's event listeners, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub event_listeners: Option<Vec<dom_debugger::types::EventListener>>,
            /// The selected url for nodes with a srcset attribute.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "currentSourceURL")]
            pub current_source_url: Option<String>,
            /// The url of the script (if any) that generates this node.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "originURL")]
            pub origin_url: Option<String>,
            /// Scroll offsets, set when this node is a Document.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_offset_x: Option<f64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_offset_y: Option<f64>,
        }

        /// Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InlineTextBox {
            /// The bounding box in document coordinates. Note that scroll offset of the document is ignored.
            pub bounding_box: dom::types::Rect,
            /// The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
            pub start_character_index: i64,
            /// The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
            pub num_characters: i64,
        }

        /// Details of an element in the DOM tree with a LayoutObject.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LayoutTreeNode {
            /// The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.
            pub dom_node_index: i64,
            /// The bounding box in document coordinates. Note that scroll offset of the document is ignored.
            pub bounding_box: dom::types::Rect,
            /// Contents of the LayoutText, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub layout_text: Option<String>,
            /// The post-layout inline text nodes, if any.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub inline_text_nodes: Option<Vec<InlineTextBox>>,
            /// Index into the `computedStyles` array returned by `getSnapshot`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub style_index: Option<i64>,
            /// Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in getSnapshot was true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub paint_order: Option<i64>,
            /// Set to true to indicate the element begins a new stacking context.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_stacking_context: Option<bool>,
        }

        /// A subset of the full ComputedStyle as defined by the request whitelist.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ComputedStyle {
            /// Name/value pairs of computed style properties.
            pub properties: Vec<NameValue>,
        }

        /// A name/value pair.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NameValue {
            /// Attribute/property name.
            pub name: String,
            /// Attribute/property value.
            pub value: String,
        }

        /// Index of the string in the strings table.
        pub type StringIndex = i64;

        /// Index of the string in the strings table.
        pub type ArrayOfStrings = Vec<StringIndex>;

        /// Data that is only present on rare nodes.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RareStringData {
            pub index: Vec<i64>,
            pub value: Vec<StringIndex>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RareBooleanData {
            pub index: Vec<i64>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RareIntegerData {
            pub index: Vec<i64>,
            pub value: Vec<i64>,
        }

        pub type Rectangle = Vec<f64>;

        /// Document snapshot.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DocumentSnapshot {
            /// Document URL that `Document` or `FrameOwner` node points to.
            #[serde(rename = "documentURL")]
            pub document_url: StringIndex,
            /// Document title.
            pub title: StringIndex,
            /// Base URL that `Document` or `FrameOwner` node uses for URL completion.
            #[serde(rename = "baseURL")]
            pub base_url: StringIndex,
            /// Contains the document's content language.
            pub content_language: StringIndex,
            /// Contains the document's character set encoding.
            pub encoding_name: StringIndex,
            /// `DocumentType` node's publicId.
            pub public_id: StringIndex,
            /// `DocumentType` node's systemId.
            pub system_id: StringIndex,
            /// Frame ID for frame owner elements and also for the document node.
            pub frame_id: StringIndex,
            /// A table with dom nodes.
            pub nodes: NodeTreeSnapshot,
            /// The nodes in the layout tree.
            pub layout: LayoutTreeSnapshot,
            /// The post-layout inline text nodes.
            pub text_boxes: TextBoxSnapshot,
            /// Horizontal scroll offset.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_offset_x: Option<f64>,
            /// Vertical scroll offset.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_offset_y: Option<f64>,
            /// Document content width.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_width: Option<f64>,
            /// Document content height.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_height: Option<f64>,
        }

        /// Table containing nodes.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NodeTreeSnapshot {
            /// Parent node index.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_index: Option<Vec<i64>>,
            /// `Node`'s nodeType.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_type: Option<Vec<i64>>,
            /// Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shadow_root_type: Option<RareStringData>,
            /// `Node`'s nodeName.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_name: Option<Vec<StringIndex>>,
            /// `Node`'s nodeValue.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_value: Option<Vec<StringIndex>>,
            /// `Node`'s id, corresponds to DOM.Node.backendNodeId.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<Vec<dom::types::BackendNodeId>>,
            /// Attributes of an `Element` node. Flatten name, value pairs.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub attributes: Option<Vec<ArrayOfStrings>>,
            /// Only set for textarea elements, contains the text value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub text_value: Option<RareStringData>,
            /// Only set for input elements, contains the input's associated text value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub input_value: Option<RareStringData>,
            /// Only set for radio and checkbox input elements, indicates if the element has been checked
            #[serde(skip_serializing_if = "Option::is_none")]
            pub input_checked: Option<RareBooleanData>,
            /// Only set for option elements, indicates if the element has been selected
            #[serde(skip_serializing_if = "Option::is_none")]
            pub option_selected: Option<RareBooleanData>,
            /// The index of the document in the list of the snapshot documents.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_document_index: Option<RareIntegerData>,
            /// Type of a pseudo element node.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_type: Option<RareStringData>,
            /// Pseudo element identifier for this node. Only present if there is a valid pseudoType.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pseudo_identifier: Option<RareStringData>,
            /// Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_clickable: Option<RareBooleanData>,
            /// The selected url for nodes with a srcset attribute.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "currentSourceURL")]
            pub current_source_url: Option<RareStringData>,
            /// The url of the script (if any) that generates this node.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "originURL")]
            pub origin_url: Option<RareStringData>,
        }

        /// Table of details of an element in the DOM tree with a LayoutObject.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LayoutTreeSnapshot {
            /// Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.
            pub node_index: Vec<i64>,
            /// Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.
            pub styles: Vec<ArrayOfStrings>,
            /// The absolute position bounding box.
            pub bounds: Vec<Rectangle>,
            /// Contents of the LayoutText, if any.
            pub text: Vec<StringIndex>,
            /// Stacking context information.
            pub stacking_contexts: RareBooleanData,
            /// Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in captureSnapshot was true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub paint_orders: Option<Vec<i64>>,
            /// The offset rect of nodes. Only available when includeDOMRects is set to true
            #[serde(skip_serializing_if = "Option::is_none")]
            pub offset_rects: Option<Vec<Rectangle>>,
            /// The scroll rect of nodes. Only available when includeDOMRects is set to true
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_rects: Option<Vec<Rectangle>>,
            /// The client rect of nodes. Only available when includeDOMRects is set to true
            #[serde(skip_serializing_if = "Option::is_none")]
            pub client_rects: Option<Vec<Rectangle>>,
            /// The list of background colors that are blended with colors of overlapping elements.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub blended_background_colors: Option<Vec<StringIndex>>,
            /// The list of computed text opacities.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub text_color_opacities: Option<Vec<f64>>,
        }

        /// Table of details of the post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TextBoxSnapshot {
            /// Index of the layout tree node that owns this box collection.
            pub layout_index: Vec<i64>,
            /// The absolute position bounding box.
            pub bounds: Vec<Rectangle>,
            /// The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
            pub start: Vec<i64>,
            /// The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
            pub length: Vec<i64>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSnapshotResponse {
            /// The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
            pub dom_nodes: Vec<types::DOMNode>,
            /// The nodes in the layout tree.
            pub layout_tree_nodes: Vec<types::LayoutTreeNode>,
            /// Whitelisted ComputedStyle properties for each node in the layout tree.
            pub computed_styles: Vec<types::ComputedStyle>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CaptureSnapshotResponse {
            /// The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
            pub documents: Vec<types::DocumentSnapshot>,
            /// Shared string table that all string properties refer to with indexes.
            pub strings: Vec<String>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Disables DOM snapshot agent for the given page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "DOMSnapshot.disable";
        }

        /// Enables DOM snapshot agent for the given page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "DOMSnapshot.enable";
        }

        /// Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSnapshot {
            /// Whitelist of computed styles to return.
            pub computed_style_whitelist: Vec<String>,
            /// Whether or not to retrieve details of DOM listeners (default false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_event_listeners: Option<bool>,
            /// Whether to determine and include the paint order index of LayoutTreeNodes (default false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_paint_order: Option<bool>,
            /// Whether to include UA shadow tree in the snapshot (default false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_user_agent_shadow_tree: Option<bool>,
        }

        impl GetSnapshot {
            pub fn new(computed_style_whitelist: Vec<String>) -> Self {
                Self {
                    computed_style_whitelist,
                    include_event_listeners: None,
                    include_paint_order: None,
                    include_user_agent_shadow_tree: None,
                }
            }

            pub fn with_include_event_listeners(mut self, include_event_listeners: bool) -> Self {
                self.include_event_listeners = Some(include_event_listeners);
                self
            }

            pub fn with_include_paint_order(mut self, include_paint_order: bool) -> Self {
                self.include_paint_order = Some(include_paint_order);
                self
            }

            pub fn with_include_user_agent_shadow_tree(
                mut self,
                include_user_agent_shadow_tree: bool,
            ) -> Self {
                self.include_user_agent_shadow_tree = Some(include_user_agent_shadow_tree);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSnapshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSnapshot {
            type Response = responses::GetSnapshotResponse;
            const METHOD: &'static str = "DOMSnapshot.getSnapshot";
        }

        /// Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CaptureSnapshot {
            /// Whitelist of computed styles to return.
            pub computed_styles: Vec<String>,
            /// Whether to include layout object paint orders into the snapshot.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_paint_order: Option<bool>,
            /// Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeDOMRects")]
            pub include_dom_rects: Option<bool>,
            /// Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_blended_background_colors: Option<bool>,
            /// Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_text_color_opacities: Option<bool>,
        }

        impl CaptureSnapshot {
            pub fn new(computed_styles: Vec<String>) -> Self {
                Self {
                    computed_styles,
                    include_paint_order: None,
                    include_dom_rects: None,
                    include_blended_background_colors: None,
                    include_text_color_opacities: None,
                }
            }

            pub fn with_include_paint_order(mut self, include_paint_order: bool) -> Self {
                self.include_paint_order = Some(include_paint_order);
                self
            }

            pub fn with_include_dom_rects(mut self, include_dom_rects: bool) -> Self {
                self.include_dom_rects = Some(include_dom_rects);
                self
            }

            pub fn with_include_blended_background_colors(
                mut self,
                include_blended_background_colors: bool,
            ) -> Self {
                self.include_blended_background_colors = Some(include_blended_background_colors);
                self
            }

            pub fn with_include_text_color_opacities(
                mut self,
                include_text_color_opacities: bool,
            ) -> Self {
                self.include_text_color_opacities = Some(include_text_color_opacities);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CaptureSnapshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CaptureSnapshot {
            type Response = responses::CaptureSnapshotResponse;
            const METHOD: &'static str = "DOMSnapshot.captureSnapshot";
        }
    }
}

pub mod dom_storage {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        pub type SerializedStorageKey = String;

        /// DOM Storage identifier.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StorageId {
            /// Security origin for the storage.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Represents a key by which DOM Storage keys its CachedStorageAreas
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<SerializedStorageKey>,
            /// Whether the storage is local storage (not session storage).
            pub is_local_storage: bool,
        }

        /// DOM Storage item.
        pub type Item = Vec<String>;
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomStorageItemsResponse {
            pub entries: Vec<types::Item>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Clear {
            pub storage_id: types::StorageId,
        }

        impl Clear {
            pub fn new(storage_id: types::StorageId) -> Self {
                Self { storage_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Clear {
            type Response = ();
            const METHOD: &'static str = "DOMStorage.clear";
        }

        /// Disables storage tracking, prevents storage events from being sent to the client.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "DOMStorage.disable";
        }

        /// Enables storage tracking, storage events will now be delivered to the client.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "DOMStorage.enable";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomStorageItems {
            pub storage_id: types::StorageId,
        }

        impl GetDomStorageItems {
            pub fn new(storage_id: types::StorageId) -> Self {
                Self { storage_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDomStorageItemsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDomStorageItems {
            type Response = responses::GetDomStorageItemsResponse;
            const METHOD: &'static str = "DOMStorage.getDOMStorageItems";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveDomStorageItem {
            pub storage_id: types::StorageId,
            pub key: String,
        }

        impl RemoveDomStorageItem {
            pub fn new(storage_id: types::StorageId, key: impl Into<String>) -> Self {
                Self {
                    storage_id,
                    key: key.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveDomStorageItem {
            type Response = ();
            const METHOD: &'static str = "DOMStorage.removeDOMStorageItem";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDomStorageItem {
            pub storage_id: types::StorageId,
            pub key: String,
            pub value: String,
        }

        impl SetDomStorageItem {
            pub fn new(
                storage_id: types::StorageId,
                key: impl Into<String>,
                value: impl Into<String>,
            ) -> Self {
                Self {
                    storage_id,
                    key: key.into(),
                    value: value.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDomStorageItem {
            type Response = ();
            const METHOD: &'static str = "DOMStorage.setDOMStorageItem";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DomStorageItemAdded {
            pub storage_id: types::StorageId,
            pub key: String,
            pub new_value: String,
        }

        impl DomStorageItemAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOMStorage.domStorageItemAdded")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DomStorageItemRemoved {
            pub storage_id: types::StorageId,
            pub key: String,
        }

        impl DomStorageItemRemoved {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOMStorage.domStorageItemRemoved")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DomStorageItemUpdated {
            pub storage_id: types::StorageId,
            pub key: String,
            pub old_value: String,
            pub new_value: String,
        }

        impl DomStorageItemUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOMStorage.domStorageItemUpdated")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DomStorageItemsCleared {
            pub storage_id: types::StorageId,
        }

        impl DomStorageItemsCleared {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DOMStorage.domStorageItemsCleared")
            }
        }
    }
}

pub mod device_access {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Device request id.
        pub type RequestId = String;

        /// A device id.
        pub type DeviceId = String;

        /// Device information displayed in a user prompt to select a device.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PromptDevice {
            pub id: DeviceId,
            /// Display name as it appears in a device request user prompt.
            pub name: String,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Enable events in this domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "DeviceAccess.enable";
        }

        /// Disable events in this domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "DeviceAccess.disable";
        }

        /// Select a device in response to a DeviceAccess.deviceRequestPrompted event.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SelectPrompt {
            pub id: types::RequestId,
            pub device_id: types::DeviceId,
        }

        impl SelectPrompt {
            pub fn new(id: types::RequestId, device_id: types::DeviceId) -> Self {
                Self { id, device_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SelectPrompt {
            type Response = ();
            const METHOD: &'static str = "DeviceAccess.selectPrompt";
        }

        /// Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CancelPrompt {
            pub id: types::RequestId,
        }

        impl CancelPrompt {
            pub fn new(id: types::RequestId) -> Self {
                Self { id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CancelPrompt {
            type Response = ();
            const METHOD: &'static str = "DeviceAccess.cancelPrompt";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// A device request opened a user prompt to select a device. Respond with the selectPrompt or cancelPrompt command.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceRequestPrompted {
            pub id: types::RequestId,
            pub devices: Vec<types::PromptDevice>,
        }

        impl DeviceRequestPrompted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("DeviceAccess.deviceRequestPrompted")
            }
        }
    }
}

pub mod device_orientation {
    use super::*;

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;

        /// Clears the overridden Device Orientation.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDeviceOrientationOverride {}

        impl ClearDeviceOrientationOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDeviceOrientationOverride {
            type Response = ();
            const METHOD: &'static str = "DeviceOrientation.clearDeviceOrientationOverride";
        }

        /// Overrides the Device Orientation.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDeviceOrientationOverride {
            /// Mock alpha
            pub alpha: f64,
            /// Mock beta
            pub beta: f64,
            /// Mock gamma
            pub gamma: f64,
        }

        impl SetDeviceOrientationOverride {
            pub fn new(alpha: f64, beta: f64, gamma: f64) -> Self {
                Self { alpha, beta, gamma }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDeviceOrientationOverride {
            type Response = ();
            const METHOD: &'static str = "DeviceOrientation.setDeviceOrientationOverride";
        }
    }
}

pub mod emulation {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SafeAreaInsets {
            /// Overrides safe-area-inset-top.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub top: Option<i64>,
            /// Overrides safe-area-max-inset-top.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub top_max: Option<i64>,
            /// Overrides safe-area-inset-left.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub left: Option<i64>,
            /// Overrides safe-area-max-inset-left.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub left_max: Option<i64>,
            /// Overrides safe-area-inset-bottom.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub bottom: Option<i64>,
            /// Overrides safe-area-max-inset-bottom.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub bottom_max: Option<i64>,
            /// Overrides safe-area-inset-right.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub right: Option<i64>,
            /// Overrides safe-area-max-inset-right.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub right_max: Option<i64>,
        }

        /// Screen orientation.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreenOrientation {
            /// Orientation type.
            pub type_: String,
            /// Orientation angle.
            pub angle: i64,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DisplayFeature {
            /// Orientation of a display feature in relation to screen
            pub orientation: String,
            /// The offset from the screen origin in either the x (for vertical orientation) or y (for horizontal orientation) direction.
            pub offset: i64,
            /// A display feature may mask content such that it is not physically displayed - this length along with the offset describes this area. A display feature that only splits content will have a 0 mask_length.
            pub mask_length: i64,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DevicePosture {
            /// Current posture of the device
            pub type_: String,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MediaFeature {
            pub name: String,
            pub value: String,
        }

        /// advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum VirtualTimePolicy {
            #[serde(rename = "advance")]
            Advance,
            #[serde(rename = "pause")]
            Pause,
            #[serde(rename = "pauseIfNetworkFetchesPending")]
            PauseIfNetworkFetchesPending,
        }
        impl AsRef<str> for VirtualTimePolicy {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Advance => "advance",
                    Self::Pause => "pause",
                    Self::PauseIfNetworkFetchesPending => "pauseIfNetworkFetchesPending",
                }
            }
        }
        impl std::str::FromStr for VirtualTimePolicy {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "advance" => Ok(Self::Advance),
                    "pause" => Ok(Self::Pause),
                    "pauseIfNetworkFetchesPending" => Ok(Self::PauseIfNetworkFetchesPending),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for VirtualTimePolicy {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UserAgentBrandVersion {
            pub brand: String,
            pub version: String,
        }

        /// Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints Missing optional values will be filled in by the target with what it would normally use.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UserAgentMetadata {
            /// Brands appearing in Sec-CH-UA.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub brands: Option<Vec<UserAgentBrandVersion>>,
            /// Brands appearing in Sec-CH-UA-Full-Version-List.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub full_version_list: Option<Vec<UserAgentBrandVersion>>,
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub full_version: Option<String>,
            pub platform: String,
            pub platform_version: String,
            pub architecture: String,
            pub model: String,
            pub mobile: bool,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub bitness: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub wow64: Option<bool>,
            /// Used to specify User Agent form-factor values. See https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors
            #[serde(skip_serializing_if = "Option::is_none")]
            pub form_factors: Option<Vec<String>>,
        }

        /// Used to specify sensor types to emulate. See https://w3c.github.io/sensors/#automation for more information.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SensorType {
            #[serde(rename = "absolute-orientation")]
            AbsoluteOrientation,
            #[serde(rename = "accelerometer")]
            Accelerometer,
            #[serde(rename = "ambient-light")]
            AmbientLight,
            #[serde(rename = "gravity")]
            Gravity,
            #[serde(rename = "gyroscope")]
            Gyroscope,
            #[serde(rename = "linear-acceleration")]
            LinearAcceleration,
            #[serde(rename = "magnetometer")]
            Magnetometer,
            #[serde(rename = "relative-orientation")]
            RelativeOrientation,
        }
        impl AsRef<str> for SensorType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::AbsoluteOrientation => "absolute-orientation",
                    Self::Accelerometer => "accelerometer",
                    Self::AmbientLight => "ambient-light",
                    Self::Gravity => "gravity",
                    Self::Gyroscope => "gyroscope",
                    Self::LinearAcceleration => "linear-acceleration",
                    Self::Magnetometer => "magnetometer",
                    Self::RelativeOrientation => "relative-orientation",
                }
            }
        }
        impl std::str::FromStr for SensorType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "absolute-orientation" => Ok(Self::AbsoluteOrientation),
                    "accelerometer" => Ok(Self::Accelerometer),
                    "ambient-light" => Ok(Self::AmbientLight),
                    "gravity" => Ok(Self::Gravity),
                    "gyroscope" => Ok(Self::Gyroscope),
                    "linear-acceleration" => Ok(Self::LinearAcceleration),
                    "magnetometer" => Ok(Self::Magnetometer),
                    "relative-orientation" => Ok(Self::RelativeOrientation),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SensorType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SensorMetadata {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub available: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub minimum_frequency: Option<f64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub maximum_frequency: Option<f64>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SensorReadingSingle {
            pub value: f64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SensorReadingXYZ {
            pub x: f64,
            pub y: f64,
            pub z: f64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SensorReadingQuaternion {
            pub x: f64,
            pub y: f64,
            pub z: f64,
            pub w: f64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SensorReading {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub single: Option<SensorReadingSingle>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub xyz: Option<SensorReadingXYZ>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub quaternion: Option<SensorReadingQuaternion>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PressureSource {
            #[serde(rename = "cpu")]
            Cpu,
        }
        impl AsRef<str> for PressureSource {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Cpu => "cpu",
                }
            }
        }
        impl std::str::FromStr for PressureSource {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "cpu" => Ok(Self::Cpu),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PressureSource {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PressureState {
            #[serde(rename = "nominal")]
            Nominal,
            #[serde(rename = "fair")]
            Fair,
            #[serde(rename = "serious")]
            Serious,
            #[serde(rename = "critical")]
            Critical,
        }
        impl AsRef<str> for PressureState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Nominal => "nominal",
                    Self::Fair => "fair",
                    Self::Serious => "serious",
                    Self::Critical => "critical",
                }
            }
        }
        impl std::str::FromStr for PressureState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "nominal" => Ok(Self::Nominal),
                    "fair" => Ok(Self::Fair),
                    "serious" => Ok(Self::Serious),
                    "critical" => Ok(Self::Critical),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PressureState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PressureMetadata {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub available: Option<bool>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WorkAreaInsets {
            /// Work area top inset in pixels. Default is 0;
            #[serde(skip_serializing_if = "Option::is_none")]
            pub top: Option<i64>,
            /// Work area left inset in pixels. Default is 0;
            #[serde(skip_serializing_if = "Option::is_none")]
            pub left: Option<i64>,
            /// Work area bottom inset in pixels. Default is 0;
            #[serde(skip_serializing_if = "Option::is_none")]
            pub bottom: Option<i64>,
            /// Work area right inset in pixels. Default is 0;
            #[serde(skip_serializing_if = "Option::is_none")]
            pub right: Option<i64>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type ScreenId = String;

        /// Screen information similar to the one returned by window.getScreenDetails() method, see https://w3c.github.io/window-management/#screendetailed.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreenInfo {
            /// Offset of the left edge of the screen.
            pub left: i64,
            /// Offset of the top edge of the screen.
            pub top: i64,
            /// Width of the screen.
            pub width: i64,
            /// Height of the screen.
            pub height: i64,
            /// Offset of the left edge of the available screen area.
            pub avail_left: i64,
            /// Offset of the top edge of the available screen area.
            pub avail_top: i64,
            /// Width of the available screen area.
            pub avail_width: i64,
            /// Height of the available screen area.
            pub avail_height: i64,
            /// Specifies the screen's device pixel ratio.
            pub device_pixel_ratio: f64,
            /// Specifies the screen's orientation.
            pub orientation: ScreenOrientation,
            /// Specifies the screen's color depth in bits.
            pub color_depth: i64,
            /// Indicates whether the device has multiple screens.
            pub is_extended: bool,
            /// Indicates whether the screen is internal to the device or external, attached to the device.
            pub is_internal: bool,
            /// Indicates whether the screen is set as the the operating system primary screen.
            pub is_primary: bool,
            /// Specifies the descriptive label for the screen.
            pub label: String,
            /// Specifies the unique identifier of the screen.
            pub id: ScreenId,
        }

        /// Enum of image types that can be disabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DisabledImageType {
            #[serde(rename = "avif")]
            Avif,
            #[serde(rename = "webp")]
            Webp,
        }
        impl AsRef<str> for DisabledImageType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Avif => "avif",
                    Self::Webp => "webp",
                }
            }
        }
        impl std::str::FromStr for DisabledImageType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "avif" => Ok(Self::Avif),
                    "webp" => Ok(Self::Webp),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DisabledImageType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanEmulateResponse {
            /// True if emulation is supported.
            pub result: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOverriddenSensorInformationResponse {
            pub requested_sampling_frequency: f64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetVirtualTimePolicyResponse {
            /// Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
            pub virtual_time_ticks_base: f64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetScreenInfosResponse {
            pub screen_infos: Vec<types::ScreenInfo>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddScreenResponse {
            pub screen_info: types::ScreenInfo,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Tells whether emulation is supported.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanEmulate {}

        impl CanEmulate {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CanEmulateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CanEmulate {
            type Response = responses::CanEmulateResponse;
            const METHOD: &'static str = "Emulation.canEmulate";
        }

        /// Clears the overridden device metrics.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDeviceMetricsOverride {}

        impl ClearDeviceMetricsOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDeviceMetricsOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.clearDeviceMetricsOverride";
        }

        /// Clears the overridden Geolocation Position and Error.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearGeolocationOverride {}

        impl ClearGeolocationOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearGeolocationOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.clearGeolocationOverride";
        }

        /// Requests that page scale factor is reset to initial values.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResetPageScaleFactor {}

        impl ResetPageScaleFactor {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResetPageScaleFactor {
            type Response = ();
            const METHOD: &'static str = "Emulation.resetPageScaleFactor";
        }

        /// Enables or disables simulating a focused and active page.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetFocusEmulationEnabled {
            /// Whether to enable to disable focus emulation.
            pub enabled: bool,
        }

        impl SetFocusEmulationEnabled {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetFocusEmulationEnabled {
            type Response = ();
            const METHOD: &'static str = "Emulation.setFocusEmulationEnabled";
        }

        /// Automatically render all web contents using a dark theme.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAutoDarkModeOverride {
            /// Whether to enable or disable automatic dark mode. If not specified, any existing override will be cleared.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enabled: Option<bool>,
        }

        impl SetAutoDarkModeOverride {
            pub fn new() -> Self {
                Self { enabled: None }
            }

            pub fn with_enabled(mut self, enabled: bool) -> Self {
                self.enabled = Some(enabled);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAutoDarkModeOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setAutoDarkModeOverride";
        }

        /// Enables CPU throttling to emulate slow CPUs.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCpuThrottlingRate {
            /// Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
            pub rate: f64,
        }

        impl SetCpuThrottlingRate {
            pub fn new(rate: f64) -> Self {
                Self { rate }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCpuThrottlingRate {
            type Response = ();
            const METHOD: &'static str = "Emulation.setCPUThrottlingRate";
        }

        /// Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDefaultBackgroundColorOverride {
            /// RGBA of the default background color. If not specified, any existing override will be cleared.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub color: Option<dom::types::RGBA>,
        }

        impl SetDefaultBackgroundColorOverride {
            pub fn new() -> Self {
                Self { color: None }
            }

            pub fn with_color(mut self, color: dom::types::RGBA) -> Self {
                self.color = Some(color);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDefaultBackgroundColorOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setDefaultBackgroundColorOverride";
        }

        /// Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the respective variables to be undefined, even if previously overridden.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSafeAreaInsetsOverride {
            pub insets: types::SafeAreaInsets,
        }

        impl SetSafeAreaInsetsOverride {
            pub fn new(insets: types::SafeAreaInsets) -> Self {
                Self { insets }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSafeAreaInsetsOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setSafeAreaInsetsOverride";
        }

        /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDeviceMetricsOverride {
            /// Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
            pub width: i64,
            /// Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
            pub height: i64,
            /// Overriding device scale factor value. 0 disables the override.
            pub device_scale_factor: f64,
            /// Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
            pub mobile: bool,
            /// Scale to apply to resulting view image.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scale: Option<f64>,
            /// Overriding screen width value in pixels (minimum 0, maximum 10000000).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screen_width: Option<i64>,
            /// Overriding screen height value in pixels (minimum 0, maximum 10000000).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screen_height: Option<i64>,
            /// Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub position_x: Option<i64>,
            /// Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub position_y: Option<i64>,
            /// Do not set visible view size, rely upon explicit setVisibleSize call.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dont_set_visible_size: Option<bool>,
            /// Screen orientation override.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screen_orientation: Option<types::ScreenOrientation>,
            /// If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub viewport: Option<page::types::Viewport>,
            /// If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.
            /// **EXPERIMENTAL**
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub display_feature: Option<types::DisplayFeature>,
            /// If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.
            /// **EXPERIMENTAL**
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub device_posture: Option<types::DevicePosture>,
        }

        impl SetDeviceMetricsOverride {
            pub fn new(width: i64, height: i64, device_scale_factor: f64, mobile: bool) -> Self {
                Self {
                    width,
                    height,
                    device_scale_factor,
                    mobile,
                    scale: None,
                    screen_width: None,
                    screen_height: None,
                    position_x: None,
                    position_y: None,
                    dont_set_visible_size: None,
                    screen_orientation: None,
                    viewport: None,
                    display_feature: None,
                    device_posture: None,
                }
            }

            pub fn with_scale(mut self, scale: f64) -> Self {
                self.scale = Some(scale);
                self
            }

            pub fn with_screen_width(mut self, screen_width: i64) -> Self {
                self.screen_width = Some(screen_width);
                self
            }

            pub fn with_screen_height(mut self, screen_height: i64) -> Self {
                self.screen_height = Some(screen_height);
                self
            }

            pub fn with_position_x(mut self, position_x: i64) -> Self {
                self.position_x = Some(position_x);
                self
            }

            pub fn with_position_y(mut self, position_y: i64) -> Self {
                self.position_y = Some(position_y);
                self
            }

            pub fn with_dont_set_visible_size(mut self, dont_set_visible_size: bool) -> Self {
                self.dont_set_visible_size = Some(dont_set_visible_size);
                self
            }

            pub fn with_screen_orientation(
                mut self,
                screen_orientation: types::ScreenOrientation,
            ) -> Self {
                self.screen_orientation = Some(screen_orientation);
                self
            }

            pub fn with_viewport(mut self, viewport: page::types::Viewport) -> Self {
                self.viewport = Some(viewport);
                self
            }

            pub fn with_display_feature(mut self, display_feature: types::DisplayFeature) -> Self {
                self.display_feature = Some(display_feature);
                self
            }

            pub fn with_device_posture(mut self, device_posture: types::DevicePosture) -> Self {
                self.device_posture = Some(device_posture);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDeviceMetricsOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setDeviceMetricsOverride";
        }

        /// Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDevicePostureOverride {
            pub posture: types::DevicePosture,
        }

        impl SetDevicePostureOverride {
            pub fn new(posture: types::DevicePosture) -> Self {
                Self { posture }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDevicePostureOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setDevicePostureOverride";
        }

        /// Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDevicePostureOverride {}

        impl ClearDevicePostureOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDevicePostureOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.clearDevicePostureOverride";
        }

        /// Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDisplayFeaturesOverride {
            pub features: Vec<types::DisplayFeature>,
        }

        impl SetDisplayFeaturesOverride {
            pub fn new(features: Vec<types::DisplayFeature>) -> Self {
                Self { features }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDisplayFeaturesOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setDisplayFeaturesOverride";
        }

        /// Clears the display features override set with either setDeviceMetricsOverride() or setDisplayFeaturesOverride() and starts using display features from the platform again. Does nothing if no override is set.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDisplayFeaturesOverride {}

        impl ClearDisplayFeaturesOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDisplayFeaturesOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.clearDisplayFeaturesOverride";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetScrollbarsHidden {
            /// Whether scrollbars should be always hidden.
            pub hidden: bool,
        }

        impl SetScrollbarsHidden {
            pub fn new(hidden: bool) -> Self {
                Self { hidden }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetScrollbarsHidden {
            type Response = ();
            const METHOD: &'static str = "Emulation.setScrollbarsHidden";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDocumentCookieDisabled {
            /// Whether document.coookie API should be disabled.
            pub disabled: bool,
        }

        impl SetDocumentCookieDisabled {
            pub fn new(disabled: bool) -> Self {
                Self { disabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDocumentCookieDisabled {
            type Response = ();
            const METHOD: &'static str = "Emulation.setDocumentCookieDisabled";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetEmitTouchEventsForMouse {
            /// Whether touch emulation based on mouse input should be enabled.
            pub enabled: bool,
            /// Touch/gesture events configuration. Default: current platform.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub configuration: Option<String>,
        }

        impl SetEmitTouchEventsForMouse {
            pub fn new(enabled: bool) -> Self {
                Self {
                    enabled,
                    configuration: None,
                }
            }

            pub fn with_configuration(mut self, configuration: impl Into<String>) -> Self {
                self.configuration = Some(configuration.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetEmitTouchEventsForMouse {
            type Response = ();
            const METHOD: &'static str = "Emulation.setEmitTouchEventsForMouse";
        }

        /// Emulates the given media type or media feature for CSS media queries.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetEmulatedMedia {
            /// Media type to emulate. Empty string disables the override.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub media: Option<String>,
            /// Media features to emulate.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub features: Option<Vec<types::MediaFeature>>,
        }

        impl SetEmulatedMedia {
            pub fn new() -> Self {
                Self {
                    media: None,
                    features: None,
                }
            }

            pub fn with_media(mut self, media: impl Into<String>) -> Self {
                self.media = Some(media.into());
                self
            }

            pub fn with_features(mut self, features: Vec<types::MediaFeature>) -> Self {
                self.features = Some(features);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetEmulatedMedia {
            type Response = ();
            const METHOD: &'static str = "Emulation.setEmulatedMedia";
        }

        /// Emulates the given vision deficiency.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetEmulatedVisionDeficiency {
            /// Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.
            pub type_: String,
        }

        impl SetEmulatedVisionDeficiency {
            pub fn new(type_: impl Into<String>) -> Self {
                Self {
                    type_: type_.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetEmulatedVisionDeficiency {
            type Response = ();
            const METHOD: &'static str = "Emulation.setEmulatedVisionDeficiency";
        }

        /// Emulates the given OS text scale.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetEmulatedOsTextScale {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scale: Option<f64>,
        }

        impl SetEmulatedOsTextScale {
            pub fn new() -> Self {
                Self { scale: None }
            }

            pub fn with_scale(mut self, scale: f64) -> Self {
                self.scale = Some(scale);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetEmulatedOsTextScale {
            type Response = ();
            const METHOD: &'static str = "Emulation.setEmulatedOSTextScale";
        }

        /// Overrides the Geolocation Position or Error. Omitting latitude, longitude or accuracy emulates position unavailable.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetGeolocationOverride {
            /// Mock latitude
            #[serde(skip_serializing_if = "Option::is_none")]
            pub latitude: Option<f64>,
            /// Mock longitude
            #[serde(skip_serializing_if = "Option::is_none")]
            pub longitude: Option<f64>,
            /// Mock accuracy
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accuracy: Option<f64>,
            /// Mock altitude
            #[serde(skip_serializing_if = "Option::is_none")]
            pub altitude: Option<f64>,
            /// Mock altitudeAccuracy
            #[serde(skip_serializing_if = "Option::is_none")]
            pub altitude_accuracy: Option<f64>,
            /// Mock heading
            #[serde(skip_serializing_if = "Option::is_none")]
            pub heading: Option<f64>,
            /// Mock speed
            #[serde(skip_serializing_if = "Option::is_none")]
            pub speed: Option<f64>,
        }

        impl SetGeolocationOverride {
            pub fn new() -> Self {
                Self {
                    latitude: None,
                    longitude: None,
                    accuracy: None,
                    altitude: None,
                    altitude_accuracy: None,
                    heading: None,
                    speed: None,
                }
            }

            pub fn with_latitude(mut self, latitude: f64) -> Self {
                self.latitude = Some(latitude);
                self
            }

            pub fn with_longitude(mut self, longitude: f64) -> Self {
                self.longitude = Some(longitude);
                self
            }

            pub fn with_accuracy(mut self, accuracy: f64) -> Self {
                self.accuracy = Some(accuracy);
                self
            }

            pub fn with_altitude(mut self, altitude: f64) -> Self {
                self.altitude = Some(altitude);
                self
            }

            pub fn with_altitude_accuracy(mut self, altitude_accuracy: f64) -> Self {
                self.altitude_accuracy = Some(altitude_accuracy);
                self
            }

            pub fn with_heading(mut self, heading: f64) -> Self {
                self.heading = Some(heading);
                self
            }

            pub fn with_speed(mut self, speed: f64) -> Self {
                self.speed = Some(speed);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetGeolocationOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setGeolocationOverride";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOverriddenSensorInformation {
            pub type_: types::SensorType,
        }

        impl GetOverriddenSensorInformation {
            pub fn new(type_: types::SensorType) -> Self {
                Self { type_ }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetOverriddenSensorInformationResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for GetOverriddenSensorInformation {
            type Response = responses::GetOverriddenSensorInformationResponse;
            const METHOD: &'static str = "Emulation.getOverriddenSensorInformation";
        }

        /// Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSensorOverrideEnabled {
            pub enabled: bool,
            pub type_: types::SensorType,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub metadata: Option<types::SensorMetadata>,
        }

        impl SetSensorOverrideEnabled {
            pub fn new(enabled: bool, type_: types::SensorType) -> Self {
                Self {
                    enabled,
                    type_,
                    metadata: None,
                }
            }

            pub fn with_metadata(mut self, metadata: types::SensorMetadata) -> Self {
                self.metadata = Some(metadata);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSensorOverrideEnabled {
            type Response = ();
            const METHOD: &'static str = "Emulation.setSensorOverrideEnabled";
        }

        /// Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSensorOverrideReadings {
            pub type_: types::SensorType,
            pub reading: types::SensorReading,
        }

        impl SetSensorOverrideReadings {
            pub fn new(type_: types::SensorType, reading: types::SensorReading) -> Self {
                Self { type_, reading }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSensorOverrideReadings {
            type Response = ();
            const METHOD: &'static str = "Emulation.setSensorOverrideReadings";
        }

        /// Overrides a pressure source of a given type, as used by the Compute Pressure API, so that updates to PressureObserver.observe() are provided via setPressureStateOverride instead of being retrieved from platform-provided telemetry data.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPressureSourceOverrideEnabled {
            pub enabled: bool,
            pub source: types::PressureSource,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub metadata: Option<types::PressureMetadata>,
        }

        impl SetPressureSourceOverrideEnabled {
            pub fn new(enabled: bool, source: types::PressureSource) -> Self {
                Self {
                    enabled,
                    source,
                    metadata: None,
                }
            }

            pub fn with_metadata(mut self, metadata: types::PressureMetadata) -> Self {
                self.metadata = Some(metadata);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPressureSourceOverrideEnabled {
            type Response = ();
            const METHOD: &'static str = "Emulation.setPressureSourceOverrideEnabled";
        }

        /// TODO: OBSOLETE: To remove when setPressureDataOverride is merged. Provides a given pressure state that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPressureStateOverride {
            pub source: types::PressureSource,
            pub state: types::PressureState,
        }

        impl SetPressureStateOverride {
            pub fn new(source: types::PressureSource, state: types::PressureState) -> Self {
                Self { source, state }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPressureStateOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setPressureStateOverride";
        }

        /// Provides a given pressure data set that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPressureDataOverride {
            pub source: types::PressureSource,
            pub state: types::PressureState,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub own_contribution_estimate: Option<f64>,
        }

        impl SetPressureDataOverride {
            pub fn new(source: types::PressureSource, state: types::PressureState) -> Self {
                Self {
                    source,
                    state,
                    own_contribution_estimate: None,
                }
            }

            pub fn with_own_contribution_estimate(
                mut self,
                own_contribution_estimate: f64,
            ) -> Self {
                self.own_contribution_estimate = Some(own_contribution_estimate);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPressureDataOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setPressureDataOverride";
        }

        /// Overrides the Idle state.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetIdleOverride {
            /// Mock isUserActive
            pub is_user_active: bool,
            /// Mock isScreenUnlocked
            pub is_screen_unlocked: bool,
        }

        impl SetIdleOverride {
            pub fn new(is_user_active: bool, is_screen_unlocked: bool) -> Self {
                Self {
                    is_user_active,
                    is_screen_unlocked,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetIdleOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setIdleOverride";
        }

        /// Clears Idle state overrides.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearIdleOverride {}

        impl ClearIdleOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearIdleOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.clearIdleOverride";
        }

        /// Overrides value returned by the javascript navigator object.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetNavigatorOverrides {
            /// The platform navigator.platform should return.
            pub platform: String,
        }

        impl SetNavigatorOverrides {
            pub fn new(platform: impl Into<String>) -> Self {
                Self {
                    platform: platform.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetNavigatorOverrides {
            type Response = ();
            const METHOD: &'static str = "Emulation.setNavigatorOverrides";
        }

        /// Sets a specified page scale factor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPageScaleFactor {
            /// Page scale factor.
            pub page_scale_factor: f64,
        }

        impl SetPageScaleFactor {
            pub fn new(page_scale_factor: f64) -> Self {
                Self { page_scale_factor }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPageScaleFactor {
            type Response = ();
            const METHOD: &'static str = "Emulation.setPageScaleFactor";
        }

        /// Switches script execution in the page.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetScriptExecutionDisabled {
            /// Whether script execution should be disabled in the page.
            pub value: bool,
        }

        impl SetScriptExecutionDisabled {
            pub fn new(value: bool) -> Self {
                Self { value }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetScriptExecutionDisabled {
            type Response = ();
            const METHOD: &'static str = "Emulation.setScriptExecutionDisabled";
        }

        /// Enables touch on platforms which do not support them.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetTouchEmulationEnabled {
            /// Whether the touch event emulation should be enabled.
            pub enabled: bool,
            /// Maximum touch points supported. Defaults to one.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_touch_points: Option<i64>,
        }

        impl SetTouchEmulationEnabled {
            pub fn new(enabled: bool) -> Self {
                Self {
                    enabled,
                    max_touch_points: None,
                }
            }

            pub fn with_max_touch_points(mut self, max_touch_points: i64) -> Self {
                self.max_touch_points = Some(max_touch_points);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetTouchEmulationEnabled {
            type Response = ();
            const METHOD: &'static str = "Emulation.setTouchEmulationEnabled";
        }

        /// Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetVirtualTimePolicy {
            pub policy: types::VirtualTimePolicy,
            /// If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub budget: Option<f64>,
            /// If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_virtual_time_task_starvation_count: Option<i64>,
            /// If set, base::Time::Now will be overridden to initially return this value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub initial_virtual_time: Option<network::types::TimeSinceEpoch>,
        }

        impl SetVirtualTimePolicy {
            pub fn new(policy: types::VirtualTimePolicy) -> Self {
                Self {
                    policy,
                    budget: None,
                    max_virtual_time_task_starvation_count: None,
                    initial_virtual_time: None,
                }
            }

            pub fn with_budget(mut self, budget: f64) -> Self {
                self.budget = Some(budget);
                self
            }

            pub fn with_max_virtual_time_task_starvation_count(
                mut self,
                max_virtual_time_task_starvation_count: i64,
            ) -> Self {
                self.max_virtual_time_task_starvation_count =
                    Some(max_virtual_time_task_starvation_count);
                self
            }

            pub fn with_initial_virtual_time(
                mut self,
                initial_virtual_time: network::types::TimeSinceEpoch,
            ) -> Self {
                self.initial_virtual_time = Some(initial_virtual_time);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetVirtualTimePolicyResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetVirtualTimePolicy {
            type Response = responses::SetVirtualTimePolicyResponse;
            const METHOD: &'static str = "Emulation.setVirtualTimePolicy";
        }

        /// Overrides default host system locale with the specified one.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetLocaleOverride {
            /// ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and restores default host system locale.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub locale: Option<String>,
        }

        impl SetLocaleOverride {
            pub fn new() -> Self {
                Self { locale: None }
            }

            pub fn with_locale(mut self, locale: impl Into<String>) -> Self {
                self.locale = Some(locale.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetLocaleOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setLocaleOverride";
        }

        /// Overrides default host system timezone with the specified one.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetTimezoneOverride {
            /// The timezone identifier. List of supported timezones: https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt If empty, disables the override and restores default host system timezone.
            pub timezone_id: String,
        }

        impl SetTimezoneOverride {
            pub fn new(timezone_id: impl Into<String>) -> Self {
                Self {
                    timezone_id: timezone_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetTimezoneOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setTimezoneOverride";
        }

        /// Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetVisibleSize {
            /// Frame width (DIP).
            pub width: i64,
            /// Frame height (DIP).
            pub height: i64,
        }

        impl SetVisibleSize {
            pub fn new(width: i64, height: i64) -> Self {
                Self { width, height }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetVisibleSize {
            type Response = ();
            const METHOD: &'static str = "Emulation.setVisibleSize";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDisabledImageTypes {
            /// Image types to disable.
            pub image_types: Vec<types::DisabledImageType>,
        }

        impl SetDisabledImageTypes {
            pub fn new(image_types: Vec<types::DisabledImageType>) -> Self {
                Self { image_types }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDisabledImageTypes {
            type Response = ();
            const METHOD: &'static str = "Emulation.setDisabledImageTypes";
        }

        /// Override the value of navigator.connection.saveData
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDataSaverOverride {
            /// Override value. Omitting the parameter disables the override.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub data_saver_enabled: Option<bool>,
        }

        impl SetDataSaverOverride {
            pub fn new() -> Self {
                Self {
                    data_saver_enabled: None,
                }
            }

            pub fn with_data_saver_enabled(mut self, data_saver_enabled: bool) -> Self {
                self.data_saver_enabled = Some(data_saver_enabled);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDataSaverOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setDataSaverOverride";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetHardwareConcurrencyOverride {
            /// Hardware concurrency to report
            pub hardware_concurrency: i64,
        }

        impl SetHardwareConcurrencyOverride {
            pub fn new(hardware_concurrency: i64) -> Self {
                Self {
                    hardware_concurrency,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetHardwareConcurrencyOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setHardwareConcurrencyOverride";
        }

        /// Allows overriding user agent with the given string. `userAgentMetadata` must be set for Client Hint headers to be sent.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetUserAgentOverride {
            /// User agent to use.
            pub user_agent: String,
            /// Browser language to emulate.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accept_language: Option<String>,
            /// The platform navigator.platform should return.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub platform: Option<String>,
            /// To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_agent_metadata: Option<types::UserAgentMetadata>,
        }

        impl SetUserAgentOverride {
            pub fn new(user_agent: impl Into<String>) -> Self {
                Self {
                    user_agent: user_agent.into(),
                    accept_language: None,
                    platform: None,
                    user_agent_metadata: None,
                }
            }

            pub fn with_accept_language(mut self, accept_language: impl Into<String>) -> Self {
                self.accept_language = Some(accept_language.into());
                self
            }

            pub fn with_platform(mut self, platform: impl Into<String>) -> Self {
                self.platform = Some(platform.into());
                self
            }

            pub fn with_user_agent_metadata(
                mut self,
                user_agent_metadata: types::UserAgentMetadata,
            ) -> Self {
                self.user_agent_metadata = Some(user_agent_metadata);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetUserAgentOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setUserAgentOverride";
        }

        /// Allows overriding the automation flag.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAutomationOverride {
            /// Whether the override should be enabled.
            pub enabled: bool,
        }

        impl SetAutomationOverride {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAutomationOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setAutomationOverride";
        }

        /// Allows overriding the difference between the small and large viewport sizes, which determine the value of the `svh` and `lvh` unit, respectively. Only supported for top-level frames.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSmallViewportHeightDifferenceOverride {
            /// This will cause an element of size 100svh to be `difference` pixels smaller than an element of size 100lvh.
            pub difference: i64,
        }

        impl SetSmallViewportHeightDifferenceOverride {
            pub fn new(difference: i64) -> Self {
                Self { difference }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSmallViewportHeightDifferenceOverride {
            type Response = ();
            const METHOD: &'static str = "Emulation.setSmallViewportHeightDifferenceOverride";
        }

        /// Returns device's screen configuration.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetScreenInfos {}

        impl GetScreenInfos {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetScreenInfosResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetScreenInfos {
            type Response = responses::GetScreenInfosResponse;
            const METHOD: &'static str = "Emulation.getScreenInfos";
        }

        /// Add a new screen to the device. Only supported in headless mode.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddScreen {
            /// Offset of the left edge of the screen in pixels.
            pub left: i64,
            /// Offset of the top edge of the screen in pixels.
            pub top: i64,
            /// The width of the screen in pixels.
            pub width: i64,
            /// The height of the screen in pixels.
            pub height: i64,
            /// Specifies the screen's work area. Default is entire screen.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub work_area_insets: Option<types::WorkAreaInsets>,
            /// Specifies the screen's device pixel ratio. Default is 1.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub device_pixel_ratio: Option<f64>,
            /// Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub rotation: Option<i64>,
            /// Specifies the screen's color depth in bits. Default is 24.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub color_depth: Option<i64>,
            /// Specifies the descriptive label for the screen. Default is none.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub label: Option<String>,
            /// Indicates whether the screen is internal to the device or external, attached to the device. Default is false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_internal: Option<bool>,
        }

        impl AddScreen {
            pub fn new(left: i64, top: i64, width: i64, height: i64) -> Self {
                Self {
                    left,
                    top,
                    width,
                    height,
                    work_area_insets: None,
                    device_pixel_ratio: None,
                    rotation: None,
                    color_depth: None,
                    label: None,
                    is_internal: None,
                }
            }

            pub fn with_work_area_insets(
                mut self,
                work_area_insets: types::WorkAreaInsets,
            ) -> Self {
                self.work_area_insets = Some(work_area_insets);
                self
            }

            pub fn with_device_pixel_ratio(mut self, device_pixel_ratio: f64) -> Self {
                self.device_pixel_ratio = Some(device_pixel_ratio);
                self
            }

            pub fn with_rotation(mut self, rotation: i64) -> Self {
                self.rotation = Some(rotation);
                self
            }

            pub fn with_color_depth(mut self, color_depth: i64) -> Self {
                self.color_depth = Some(color_depth);
                self
            }

            pub fn with_label(mut self, label: impl Into<String>) -> Self {
                self.label = Some(label.into());
                self
            }

            pub fn with_is_internal(mut self, is_internal: bool) -> Self {
                self.is_internal = Some(is_internal);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddScreenResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddScreen {
            type Response = responses::AddScreenResponse;
            const METHOD: &'static str = "Emulation.addScreen";
        }

        /// Remove screen from the device. Only supported in headless mode.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveScreen {
            pub screen_id: types::ScreenId,
        }

        impl RemoveScreen {
            pub fn new(screen_id: types::ScreenId) -> Self {
                Self { screen_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveScreen {
            type Response = ();
            const METHOD: &'static str = "Emulation.removeScreen";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct VirtualTimeBudgetExpired {}

        impl VirtualTimeBudgetExpired {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Emulation.virtualTimeBudgetExpired")
            }
        }
    }
}

pub mod event_breakpoints {
    use super::*;

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;

        /// Sets breakpoint on particular native event.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInstrumentationBreakpoint {
            /// Instrumentation name to stop on.
            pub event_name: String,
        }

        impl SetInstrumentationBreakpoint {
            pub fn new(event_name: impl Into<String>) -> Self {
                Self {
                    event_name: event_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInstrumentationBreakpoint {
            type Response = ();
            const METHOD: &'static str = "EventBreakpoints.setInstrumentationBreakpoint";
        }

        /// Removes breakpoint on particular native event.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveInstrumentationBreakpoint {
            /// Instrumentation name to stop on.
            pub event_name: String,
        }

        impl RemoveInstrumentationBreakpoint {
            pub fn new(event_name: impl Into<String>) -> Self {
                Self {
                    event_name: event_name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveInstrumentationBreakpoint {
            type Response = ();
            const METHOD: &'static str = "EventBreakpoints.removeInstrumentationBreakpoint";
        }

        /// Removes all breakpoints
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "EventBreakpoints.disable";
        }
    }
}

pub mod extensions {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Storage areas.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum StorageArea {
            #[serde(rename = "session")]
            Session,
            #[serde(rename = "local")]
            Local,
            #[serde(rename = "sync")]
            Sync,
            #[serde(rename = "managed")]
            Managed,
        }
        impl AsRef<str> for StorageArea {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Session => "session",
                    Self::Local => "local",
                    Self::Sync => "sync",
                    Self::Managed => "managed",
                }
            }
        }
        impl std::str::FromStr for StorageArea {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "session" => Ok(Self::Session),
                    "local" => Ok(Self::Local),
                    "sync" => Ok(Self::Sync),
                    "managed" => Ok(Self::Managed),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for StorageArea {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadUnpackedResponse {
            /// Extension id.
            pub id: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStorageItemsResponse {
            pub data: serde_json::Value,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Runs an extension default action. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TriggerAction {
            /// Extension id.
            pub id: String,
            /// A tab target ID to trigger the default extension action on.
            pub target_id: String,
        }

        impl TriggerAction {
            pub fn new(id: impl Into<String>, target_id: impl Into<String>) -> Self {
                Self {
                    id: id.into(),
                    target_id: target_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TriggerAction {
            type Response = ();
            const METHOD: &'static str = "Extensions.triggerAction";
        }

        /// Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadUnpacked {
            /// Absolute file path.
            pub path: String,
            /// Enable the extension in incognito
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enable_in_incognito: Option<bool>,
        }

        impl LoadUnpacked {
            pub fn new(path: impl Into<String>) -> Self {
                Self {
                    path: path.into(),
                    enable_in_incognito: None,
                }
            }

            pub fn with_enable_in_incognito(mut self, enable_in_incognito: bool) -> Self {
                self.enable_in_incognito = Some(enable_in_incognito);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::LoadUnpackedResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for LoadUnpacked {
            type Response = responses::LoadUnpackedResponse;
            const METHOD: &'static str = "Extensions.loadUnpacked";
        }

        /// Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Uninstall {
            /// Extension id.
            pub id: String,
        }

        impl Uninstall {
            pub fn new(id: impl Into<String>) -> Self {
                Self { id: id.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Uninstall {
            type Response = ();
            const METHOD: &'static str = "Extensions.uninstall";
        }

        /// Gets data from extension storage in the given `storageArea`. If `keys` is specified, these are used to filter the result.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStorageItems {
            /// ID of extension.
            pub id: String,
            /// StorageArea to retrieve data from.
            pub storage_area: types::StorageArea,
            /// Keys to retrieve.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub keys: Option<Vec<String>>,
        }

        impl GetStorageItems {
            pub fn new(id: impl Into<String>, storage_area: types::StorageArea) -> Self {
                Self {
                    id: id.into(),
                    storage_area,
                    keys: None,
                }
            }

            pub fn with_keys(mut self, keys: Vec<String>) -> Self {
                self.keys = Some(keys);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetStorageItemsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetStorageItems {
            type Response = responses::GetStorageItemsResponse;
            const METHOD: &'static str = "Extensions.getStorageItems";
        }

        /// Removes `keys` from extension storage in the given `storageArea`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveStorageItems {
            /// ID of extension.
            pub id: String,
            /// StorageArea to remove data from.
            pub storage_area: types::StorageArea,
            /// Keys to remove.
            pub keys: Vec<String>,
        }

        impl RemoveStorageItems {
            pub fn new(
                id: impl Into<String>,
                storage_area: types::StorageArea,
                keys: Vec<String>,
            ) -> Self {
                Self {
                    id: id.into(),
                    storage_area,
                    keys,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveStorageItems {
            type Response = ();
            const METHOD: &'static str = "Extensions.removeStorageItems";
        }

        /// Clears extension storage in the given `storageArea`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearStorageItems {
            /// ID of extension.
            pub id: String,
            /// StorageArea to remove data from.
            pub storage_area: types::StorageArea,
        }

        impl ClearStorageItems {
            pub fn new(id: impl Into<String>, storage_area: types::StorageArea) -> Self {
                Self {
                    id: id.into(),
                    storage_area,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearStorageItems {
            type Response = ();
            const METHOD: &'static str = "Extensions.clearStorageItems";
        }

        /// Sets `values` in extension storage in the given `storageArea`. The provided `values` will be merged with existing values in the storage area.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetStorageItems {
            /// ID of extension.
            pub id: String,
            /// StorageArea to set data in.
            pub storage_area: types::StorageArea,
            /// Values to set.
            pub values: serde_json::Value,
        }

        impl SetStorageItems {
            pub fn new(
                id: impl Into<String>,
                storage_area: types::StorageArea,
                values: serde_json::Value,
            ) -> Self {
                Self {
                    id: id.into(),
                    storage_area,
                    values,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetStorageItems {
            type Response = ();
            const METHOD: &'static str = "Extensions.setStorageItems";
        }
    }
}

pub mod fed_cm {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Whether this is a sign-up or sign-in action for this account, i.e. whether this account has ever been used to sign in to this RP before.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum LoginState {
            #[serde(rename = "SignIn")]
            SignIn,
            #[serde(rename = "SignUp")]
            SignUp,
        }
        impl AsRef<str> for LoginState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SignIn => "SignIn",
                    Self::SignUp => "SignUp",
                }
            }
        }
        impl std::str::FromStr for LoginState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SignIn" => Ok(Self::SignIn),
                    "SignUp" => Ok(Self::SignUp),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for LoginState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The types of FedCM dialogs.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DialogType {
            #[serde(rename = "AccountChooser")]
            AccountChooser,
            #[serde(rename = "AutoReauthn")]
            AutoReauthn,
            #[serde(rename = "ConfirmIdpLogin")]
            ConfirmIdpLogin,
            #[serde(rename = "Error")]
            Error,
        }
        impl AsRef<str> for DialogType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::AccountChooser => "AccountChooser",
                    Self::AutoReauthn => "AutoReauthn",
                    Self::ConfirmIdpLogin => "ConfirmIdpLogin",
                    Self::Error => "Error",
                }
            }
        }
        impl std::str::FromStr for DialogType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "AccountChooser" => Ok(Self::AccountChooser),
                    "AutoReauthn" => Ok(Self::AutoReauthn),
                    "ConfirmIdpLogin" => Ok(Self::ConfirmIdpLogin),
                    "Error" => Ok(Self::Error),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DialogType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The buttons on the FedCM dialog.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DialogButton {
            #[serde(rename = "ConfirmIdpLoginContinue")]
            ConfirmIdpLoginContinue,
            #[serde(rename = "ErrorGotIt")]
            ErrorGotIt,
            #[serde(rename = "ErrorMoreDetails")]
            ErrorMoreDetails,
        }
        impl AsRef<str> for DialogButton {
            fn as_ref(&self) -> &str {
                match self {
                    Self::ConfirmIdpLoginContinue => "ConfirmIdpLoginContinue",
                    Self::ErrorGotIt => "ErrorGotIt",
                    Self::ErrorMoreDetails => "ErrorMoreDetails",
                }
            }
        }
        impl std::str::FromStr for DialogButton {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "ConfirmIdpLoginContinue" => Ok(Self::ConfirmIdpLoginContinue),
                    "ErrorGotIt" => Ok(Self::ErrorGotIt),
                    "ErrorMoreDetails" => Ok(Self::ErrorMoreDetails),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DialogButton {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The URLs that each account has
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AccountUrlType {
            #[serde(rename = "TermsOfService")]
            TermsOfService,
            #[serde(rename = "PrivacyPolicy")]
            PrivacyPolicy,
        }
        impl AsRef<str> for AccountUrlType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::TermsOfService => "TermsOfService",
                    Self::PrivacyPolicy => "PrivacyPolicy",
                }
            }
        }
        impl std::str::FromStr for AccountUrlType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "TermsOfService" => Ok(Self::TermsOfService),
                    "PrivacyPolicy" => Ok(Self::PrivacyPolicy),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AccountUrlType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Corresponds to IdentityRequestAccount
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Account {
            pub account_id: String,
            pub email: String,
            pub name: String,
            pub given_name: String,
            pub picture_url: String,
            pub idp_config_url: String,
            pub idp_login_url: String,
            pub login_state: LoginState,
            /// These two are only set if the loginState is signUp
            #[serde(skip_serializing_if = "Option::is_none")]
            pub terms_of_service_url: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub privacy_policy_url: Option<String>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub disable_rejection_delay: Option<bool>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self {
                    disable_rejection_delay: None,
                }
            }

            pub fn with_disable_rejection_delay(mut self, disable_rejection_delay: bool) -> Self {
                self.disable_rejection_delay = Some(disable_rejection_delay);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "FedCm.enable";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "FedCm.disable";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SelectAccount {
            pub dialog_id: String,
            pub account_index: i64,
        }

        impl SelectAccount {
            pub fn new(dialog_id: impl Into<String>, account_index: i64) -> Self {
                Self {
                    dialog_id: dialog_id.into(),
                    account_index,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SelectAccount {
            type Response = ();
            const METHOD: &'static str = "FedCm.selectAccount";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClickDialogButton {
            pub dialog_id: String,
            pub dialog_button: types::DialogButton,
        }

        impl ClickDialogButton {
            pub fn new(dialog_id: impl Into<String>, dialog_button: types::DialogButton) -> Self {
                Self {
                    dialog_id: dialog_id.into(),
                    dialog_button,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClickDialogButton {
            type Response = ();
            const METHOD: &'static str = "FedCm.clickDialogButton";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OpenUrl {
            pub dialog_id: String,
            pub account_index: i64,
            pub account_url_type: types::AccountUrlType,
        }

        impl OpenUrl {
            pub fn new(
                dialog_id: impl Into<String>,
                account_index: i64,
                account_url_type: types::AccountUrlType,
            ) -> Self {
                Self {
                    dialog_id: dialog_id.into(),
                    account_index,
                    account_url_type,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for OpenUrl {
            type Response = ();
            const METHOD: &'static str = "FedCm.openUrl";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DismissDialog {
            pub dialog_id: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub trigger_cooldown: Option<bool>,
        }

        impl DismissDialog {
            pub fn new(dialog_id: impl Into<String>) -> Self {
                Self {
                    dialog_id: dialog_id.into(),
                    trigger_cooldown: None,
                }
            }

            pub fn with_trigger_cooldown(mut self, trigger_cooldown: bool) -> Self {
                self.trigger_cooldown = Some(trigger_cooldown);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DismissDialog {
            type Response = ();
            const METHOD: &'static str = "FedCm.dismissDialog";
        }

        /// Resets the cooldown time, if any, to allow the next FedCM call to show a dialog even if one was recently dismissed by the user.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResetCooldown {}

        impl ResetCooldown {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResetCooldown {
            type Response = ();
            const METHOD: &'static str = "FedCm.resetCooldown";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DialogShown {
            pub dialog_id: String,
            pub dialog_type: types::DialogType,
            pub accounts: Vec<types::Account>,
            /// These exist primarily so that the caller can verify the RP context was used appropriately.
            pub title: String,
            pub subtitle: Option<String>,
        }

        impl DialogShown {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("FedCm.dialogShown")
            }
        }

        /// Triggered when a dialog is closed, either by user action, JS abort, or a command below.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DialogClosed {
            pub dialog_id: String,
        }

        impl DialogClosed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("FedCm.dialogClosed")
            }
        }
    }
}

pub mod fetch {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique request identifier. Note that this does not identify individual HTTP requests that are part of a network request.
        pub type RequestId = String;

        /// Stages of the request to handle. Request will intercept before the request is sent. Response will intercept after the response is received (but before response body is received).
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum RequestStage {
            #[serde(rename = "Request")]
            Request,
            #[serde(rename = "Response")]
            Response,
        }
        impl AsRef<str> for RequestStage {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Request => "Request",
                    Self::Response => "Response",
                }
            }
        }
        impl std::str::FromStr for RequestStage {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Request" => Ok(Self::Request),
                    "Response" => Ok(Self::Response),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for RequestStage {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestPattern {
            /// Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to `"*"`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url_pattern: Option<String>,
            /// If set, only requests for matching resource types will be intercepted.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub resource_type: Option<network::types::ResourceType>,
            /// Stage at which to begin intercepting requests. Default is Request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_stage: Option<RequestStage>,
        }

        /// Response HTTP header entry
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HeaderEntry {
            pub name: String,
            pub value: String,
        }

        /// Authorization challenge for HTTP status code 401 or 407.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AuthChallenge {
            /// Source of the authentication challenge.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source: Option<String>,
            /// Origin of the challenger.
            pub origin: String,
            /// The authentication scheme used, such as basic or digest
            pub scheme: String,
            /// The realm of the challenge. May be empty.
            pub realm: String,
        }

        /// Response to an AuthChallenge.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AuthChallengeResponse {
            /// The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.
            pub response: String,
            /// The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub username: Option<String>,
            /// The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub password: Option<String>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResponseBodyResponse {
            /// Response body.
            pub body: String,
            /// True, if content was sent as base64.
            pub base64_encoded: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeResponseBodyAsStreamResponse {
            pub stream: io::types::StreamHandle,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Disables the fetch domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Fetch.disable";
        }

        /// Enables issuing of requestPaused events. A request will be paused until client calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// If specified, only requests matching any of these patterns will produce fetchRequested event and will be paused until clients response. If not set, all requests will be affected.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub patterns: Option<Vec<types::RequestPattern>>,
            /// If true, authRequired events will be issued and requests will be paused expecting a call to continueWithAuth.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub handle_auth_requests: Option<bool>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self {
                    patterns: None,
                    handle_auth_requests: None,
                }
            }

            pub fn with_patterns(mut self, patterns: Vec<types::RequestPattern>) -> Self {
                self.patterns = Some(patterns);
                self
            }

            pub fn with_handle_auth_requests(mut self, handle_auth_requests: bool) -> Self {
                self.handle_auth_requests = Some(handle_auth_requests);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Fetch.enable";
        }

        /// Causes the request to fail with specified reason.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FailRequest {
            /// An id the client received in requestPaused event.
            pub request_id: types::RequestId,
            /// Causes the request to fail with the given reason.
            pub error_reason: network::types::ErrorReason,
        }

        impl FailRequest {
            pub fn new(
                request_id: types::RequestId,
                error_reason: network::types::ErrorReason,
            ) -> Self {
                Self {
                    request_id,
                    error_reason,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for FailRequest {
            type Response = ();
            const METHOD: &'static str = "Fetch.failRequest";
        }

        /// Provides response to the request.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FulfillRequest {
            /// An id the client received in requestPaused event.
            pub request_id: types::RequestId,
            /// An HTTP response code.
            pub response_code: i64,
            /// Response headers.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub response_headers: Option<Vec<types::HeaderEntry>>,
            /// Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub binary_response_headers: Option<String>,
            /// A response body. If absent, original response body will be used if the request is intercepted at the response stage and empty body will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub body: Option<String>,
            /// A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub response_phrase: Option<String>,
        }

        impl FulfillRequest {
            pub fn new(request_id: types::RequestId, response_code: i64) -> Self {
                Self {
                    request_id,
                    response_code,
                    response_headers: None,
                    binary_response_headers: None,
                    body: None,
                    response_phrase: None,
                }
            }

            pub fn with_response_headers(
                mut self,
                response_headers: Vec<types::HeaderEntry>,
            ) -> Self {
                self.response_headers = Some(response_headers);
                self
            }

            pub fn with_binary_response_headers(
                mut self,
                binary_response_headers: impl Into<String>,
            ) -> Self {
                self.binary_response_headers = Some(binary_response_headers.into());
                self
            }

            pub fn with_body(mut self, body: impl Into<String>) -> Self {
                self.body = Some(body.into());
                self
            }

            pub fn with_response_phrase(mut self, response_phrase: impl Into<String>) -> Self {
                self.response_phrase = Some(response_phrase.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for FulfillRequest {
            type Response = ();
            const METHOD: &'static str = "Fetch.fulfillRequest";
        }

        /// Continues the request, optionally modifying some of its parameters.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContinueRequest {
            /// An id the client received in requestPaused event.
            pub request_id: types::RequestId,
            /// If set, the request url will be modified in a way that's not observable by page.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// If set, the request method is overridden.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub method: Option<String>,
            /// If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub post_data: Option<String>,
            /// If set, overrides the request headers. Note that the overrides do not extend to subsequent redirect hops, if a redirect happens. Another override may be applied to a different request produced by a redirect.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub headers: Option<Vec<types::HeaderEntry>>,
            /// If set, overrides response interception behavior for this request.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub intercept_response: Option<bool>,
        }

        impl ContinueRequest {
            pub fn new(request_id: types::RequestId) -> Self {
                Self {
                    request_id,
                    url: None,
                    method: None,
                    post_data: None,
                    headers: None,
                    intercept_response: None,
                }
            }

            pub fn with_url(mut self, url: impl Into<String>) -> Self {
                self.url = Some(url.into());
                self
            }

            pub fn with_method(mut self, method: impl Into<String>) -> Self {
                self.method = Some(method.into());
                self
            }

            pub fn with_post_data(mut self, post_data: impl Into<String>) -> Self {
                self.post_data = Some(post_data.into());
                self
            }

            pub fn with_headers(mut self, headers: Vec<types::HeaderEntry>) -> Self {
                self.headers = Some(headers);
                self
            }

            pub fn with_intercept_response(mut self, intercept_response: bool) -> Self {
                self.intercept_response = Some(intercept_response);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ContinueRequest {
            type Response = ();
            const METHOD: &'static str = "Fetch.continueRequest";
        }

        /// Continues a request supplying authChallengeResponse following authRequired event.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContinueWithAuth {
            /// An id the client received in authRequired event.
            pub request_id: types::RequestId,
            /// Response to with an authChallenge.
            pub auth_challenge_response: types::AuthChallengeResponse,
        }

        impl ContinueWithAuth {
            pub fn new(
                request_id: types::RequestId,
                auth_challenge_response: types::AuthChallengeResponse,
            ) -> Self {
                Self {
                    request_id,
                    auth_challenge_response,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ContinueWithAuth {
            type Response = ();
            const METHOD: &'static str = "Fetch.continueWithAuth";
        }

        /// Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContinueResponse {
            /// An id the client received in requestPaused event.
            pub request_id: types::RequestId,
            /// An HTTP response code. If absent, original response code will be used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub response_code: Option<i64>,
            /// A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub response_phrase: Option<String>,
            /// Response headers. If absent, original response headers will be used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub response_headers: Option<Vec<types::HeaderEntry>>,
            /// Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub binary_response_headers: Option<String>,
        }

        impl ContinueResponse {
            pub fn new(request_id: types::RequestId) -> Self {
                Self {
                    request_id,
                    response_code: None,
                    response_phrase: None,
                    response_headers: None,
                    binary_response_headers: None,
                }
            }

            pub fn with_response_code(mut self, response_code: i64) -> Self {
                self.response_code = Some(response_code);
                self
            }

            pub fn with_response_phrase(mut self, response_phrase: impl Into<String>) -> Self {
                self.response_phrase = Some(response_phrase.into());
                self
            }

            pub fn with_response_headers(
                mut self,
                response_headers: Vec<types::HeaderEntry>,
            ) -> Self {
                self.response_headers = Some(response_headers);
                self
            }

            pub fn with_binary_response_headers(
                mut self,
                binary_response_headers: impl Into<String>,
            ) -> Self {
                self.binary_response_headers = Some(binary_response_headers.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ContinueResponse {
            type Response = ();
            const METHOD: &'static str = "Fetch.continueResponse";
        }

        /// Causes the body of the response to be received from the server and returned as a single string. May only be issued for a request that is paused in the Response stage and is mutually exclusive with takeResponseBodyForInterceptionAsStream. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior. Note that the response body is not available for redirects. Requests paused in the _redirect received_ state may be differentiated by `responseCode` and presence of `location` response header, see comments to `requestPaused` for details.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResponseBody {
            /// Identifier for the intercepted request to get body for.
            pub request_id: types::RequestId,
        }

        impl GetResponseBody {
            pub fn new(request_id: types::RequestId) -> Self {
                Self { request_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetResponseBodyResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetResponseBody {
            type Response = responses::GetResponseBodyResponse;
            const METHOD: &'static str = "Fetch.getResponseBody";
        }

        /// Returns a handle to the stream representing the response body. The request must be paused in the HeadersReceived stage. Note that after this command the request can't be continued as is -- client either needs to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified. This method is mutually exclusive with getResponseBody. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeResponseBodyAsStream {
            pub request_id: types::RequestId,
        }

        impl TakeResponseBodyAsStream {
            pub fn new(request_id: types::RequestId) -> Self {
                Self { request_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::TakeResponseBodyAsStreamResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TakeResponseBodyAsStream {
            type Response = responses::TakeResponseBodyAsStreamResponse;
            const METHOD: &'static str = "Fetch.takeResponseBodyAsStream";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Issued when the domain is enabled and the request URL matches the specified filter. The request is paused until the client responds with one of continueRequest, failRequest or fulfillRequest. The stage of the request can be determined by presence of responseErrorReason and responseStatusCode -- the request is at the response stage if either of these fields is present and in the request stage otherwise. Redirect responses and subsequent requests are reported similarly to regular responses and requests. Redirect responses may be distinguished by the value of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with presence of the `location` header. Requests resulting from a redirect will have `redirectedRequestId` field set.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestPaused {
            /// Each request the page makes will have a unique id.
            pub request_id: types::RequestId,
            /// The details of the request.
            pub request: network::types::Request,
            /// The id of the frame that initiated the request.
            pub frame_id: page::types::FrameId,
            /// How the requested resource will be used.
            pub resource_type: network::types::ResourceType,
            /// Response error if intercepted at response stage.
            pub response_error_reason: Option<network::types::ErrorReason>,
            /// Response code if intercepted at response stage.
            pub response_status_code: Option<i64>,
            /// Response status text if intercepted at response stage.
            pub response_status_text: Option<String>,
            /// Response headers if intercepted at the response stage.
            pub response_headers: Option<Vec<types::HeaderEntry>>,
            /// If the intercepted request had a corresponding Network.requestWillBeSent event fired for it, then this networkId will be the same as the requestId present in the requestWillBeSent event.
            pub network_id: Option<network::types::RequestId>,
            /// If the request is due to a redirect response from the server, the id of the request that has caused the redirect.
            /// **EXPERIMENTAL**
            pub redirected_request_id: Option<types::RequestId>,
        }

        impl RequestPaused {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Fetch.requestPaused")
            }
        }

        /// Issued when the domain is enabled with handleAuthRequests set to true. The request is paused until client responds with continueWithAuth.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AuthRequired {
            /// Each request the page makes will have a unique id.
            pub request_id: types::RequestId,
            /// The details of the request.
            pub request: network::types::Request,
            /// The id of the frame that initiated the request.
            pub frame_id: page::types::FrameId,
            /// How the requested resource will be used.
            pub resource_type: network::types::ResourceType,
            /// Details of the Authorization Challenge encountered. If this is set, client should respond with continueRequest that contains AuthChallengeResponse.
            pub auth_challenge: types::AuthChallenge,
        }

        impl AuthRequired {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Fetch.authRequired")
            }
        }
    }
}

pub mod file_system {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct File {
            pub name: String,
            /// Timestamp
            pub last_modified: network::types::TimeSinceEpoch,
            /// Size in bytes
            pub size: f64,
            pub type_: String,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Directory {
            pub name: String,
            pub nested_directories: Vec<String>,
            /// Files that are directly nested under this directory.
            pub nested_files: Vec<File>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BucketFileSystemLocator {
            /// Storage key
            pub storage_key: storage::types::SerializedStorageKey,
            /// Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub bucket_name: Option<String>,
            /// Path to the directory using each path component as an array item.
            pub path_components: Vec<String>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDirectoryResponse {
            /// Returns the directory object at the path.
            pub directory: types::Directory,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDirectory {
            pub bucket_file_system_locator: types::BucketFileSystemLocator,
        }

        impl GetDirectory {
            pub fn new(bucket_file_system_locator: types::BucketFileSystemLocator) -> Self {
                Self {
                    bucket_file_system_locator,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDirectoryResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDirectory {
            type Response = responses::GetDirectoryResponse;
            const METHOD: &'static str = "FileSystem.getDirectory";
        }
    }
}

pub mod headless_experimental {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Encoding options for a screenshot.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreenshotParams {
            /// Image compression format (defaults to png).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub format: Option<String>,
            /// Compression quality from range [0..100] (jpeg and webp only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub quality: Option<i64>,
            /// Optimize image encoding for speed, not for resulting size (defaults to false)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub optimize_for_speed: Option<bool>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BeginFrameResponse {
            /// Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
            pub has_damage: bool,
            /// Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)
            pub screenshot_data: Option<String>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also https://goo.gle/chrome-headless-rendering for more background.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BeginFrame {
            /// Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_time_ticks: Option<f64>,
            /// The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub interval: Option<f64>,
            /// Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub no_display_updates: Option<bool>,
            /// If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screenshot: Option<types::ScreenshotParams>,
        }

        impl BeginFrame {
            pub fn new() -> Self {
                Self {
                    frame_time_ticks: None,
                    interval: None,
                    no_display_updates: None,
                    screenshot: None,
                }
            }

            pub fn with_frame_time_ticks(mut self, frame_time_ticks: f64) -> Self {
                self.frame_time_ticks = Some(frame_time_ticks);
                self
            }

            pub fn with_interval(mut self, interval: f64) -> Self {
                self.interval = Some(interval);
                self
            }

            pub fn with_no_display_updates(mut self, no_display_updates: bool) -> Self {
                self.no_display_updates = Some(no_display_updates);
                self
            }

            pub fn with_screenshot(mut self, screenshot: types::ScreenshotParams) -> Self {
                self.screenshot = Some(screenshot);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::BeginFrameResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for BeginFrame {
            type Response = responses::BeginFrameResponse;
            const METHOD: &'static str = "HeadlessExperimental.beginFrame";
        }

        /// Disables headless events for the target.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "HeadlessExperimental.disable";
        }

        /// Enables headless events for the target.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "HeadlessExperimental.enable";
        }
    }
}

pub mod io {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// This is either obtained from another method or specified as `blob:<uuid>` where `<uuid>` is an UUID of a Blob.
        pub type StreamHandle = String;
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReadResponse {
            /// Set if the data is base64-encoded
            pub base64_encoded: Option<bool>,
            /// Data that were read.
            pub data: String,
            /// Set if the end-of-file condition occurred while reading.
            pub eof: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveBlobResponse {
            /// UUID of the specified Blob.
            pub uuid: String,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Close the stream, discard any temporary backing storage.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Close {
            /// Handle of the stream to close.
            pub handle: types::StreamHandle,
        }

        impl Close {
            pub fn new(handle: types::StreamHandle) -> Self {
                Self { handle }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Close {
            type Response = ();
            const METHOD: &'static str = "IO.close";
        }

        /// Read a chunk of the stream
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Read {
            /// Handle of the stream to read.
            pub handle: types::StreamHandle,
            /// Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub offset: Option<i64>,
            /// Maximum number of bytes to read (left upon the agent discretion if not specified).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub size: Option<i64>,
        }

        impl Read {
            pub fn new(handle: types::StreamHandle) -> Self {
                Self {
                    handle,
                    offset: None,
                    size: None,
                }
            }

            pub fn with_offset(mut self, offset: i64) -> Self {
                self.offset = Some(offset);
                self
            }

            pub fn with_size(mut self, size: i64) -> Self {
                self.size = Some(size);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ReadResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Read {
            type Response = responses::ReadResponse;
            const METHOD: &'static str = "IO.read";
        }

        /// Return UUID of Blob object specified by a remote object id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolveBlob {
            /// Object id of a Blob object wrapper.
            pub object_id: runtime::types::RemoteObjectId,
        }

        impl ResolveBlob {
            pub fn new(object_id: runtime::types::RemoteObjectId) -> Self {
                Self { object_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ResolveBlobResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResolveBlob {
            type Response = responses::ResolveBlobResponse;
            const METHOD: &'static str = "IO.resolveBlob";
        }
    }
}

pub mod indexed_db {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Database with an array of object stores.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DatabaseWithObjectStores {
            /// Database name.
            pub name: String,
            /// Database version (type is not 'integer', as the standard requires the version number to be 'unsigned long long')
            pub version: f64,
            /// Object stores in this database.
            pub object_stores: Vec<ObjectStore>,
        }

        /// Object store.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ObjectStore {
            /// Object store name.
            pub name: String,
            /// Object store key path.
            pub key_path: KeyPath,
            /// If true, object store has auto increment flag set.
            pub auto_increment: bool,
            /// Indexes in this object store.
            pub indexes: Vec<ObjectStoreIndex>,
        }

        /// Object store index.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ObjectStoreIndex {
            /// Index name.
            pub name: String,
            /// Index key path.
            pub key_path: KeyPath,
            /// If true, index is unique.
            pub unique: bool,
            /// If true, index allows multiple entries for a key.
            pub multi_entry: bool,
        }

        /// Key.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Key {
            /// Key type.
            pub type_: String,
            /// Number value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub number: Option<f64>,
            /// String value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub string: Option<String>,
            /// Date value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub date: Option<f64>,
            /// Array value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub array: Option<Vec<Key>>,
        }

        /// Key range.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct KeyRange {
            /// Lower bound.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub lower: Option<Key>,
            /// Upper bound.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub upper: Option<Key>,
            /// If true lower bound is open.
            pub lower_open: bool,
            /// If true upper bound is open.
            pub upper_open: bool,
        }

        /// Data entry.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DataEntry {
            /// Key object.
            pub key: runtime::types::RemoteObject,
            /// Primary key object.
            pub primary_key: runtime::types::RemoteObject,
            /// Value object.
            pub value: runtime::types::RemoteObject,
        }

        /// Key path.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct KeyPath {
            /// Key path type.
            pub type_: String,
            /// String value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub string: Option<String>,
            /// Array value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub array: Option<Vec<String>>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestDataResponse {
            /// Array of object store data entries.
            pub object_store_data_entries: Vec<types::DataEntry>,
            /// If true, there are more entries to fetch in the given range.
            pub has_more: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMetadataResponse {
            /// the entries count
            pub entries_count: f64,
            /// the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
            pub key_generator_value: f64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestDatabaseResponse {
            /// Database with an array of object stores.
            pub database_with_object_stores: types::DatabaseWithObjectStores,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestDatabaseNamesResponse {
            /// Database names for origin.
            pub database_names: Vec<String>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Clears all entries from an object store.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearObjectStore {
            /// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
            /// Database name.
            pub database_name: String,
            /// Object store name.
            pub object_store_name: String,
        }

        impl ClearObjectStore {
            pub fn new(
                database_name: impl Into<String>,
                object_store_name: impl Into<String>,
            ) -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                    database_name: database_name.into(),
                    object_store_name: object_store_name.into(),
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearObjectStore {
            type Response = ();
            const METHOD: &'static str = "IndexedDB.clearObjectStore";
        }

        /// Deletes a database.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteDatabase {
            /// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
            /// Database name.
            pub database_name: String,
        }

        impl DeleteDatabase {
            pub fn new(database_name: impl Into<String>) -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                    database_name: database_name.into(),
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteDatabase {
            type Response = ();
            const METHOD: &'static str = "IndexedDB.deleteDatabase";
        }

        /// Delete a range of entries from an object store
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteObjectStoreEntries {
            /// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
            pub database_name: String,
            pub object_store_name: String,
            /// Range of entry keys to delete
            pub key_range: types::KeyRange,
        }

        impl DeleteObjectStoreEntries {
            pub fn new(
                database_name: impl Into<String>,
                object_store_name: impl Into<String>,
                key_range: types::KeyRange,
            ) -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                    database_name: database_name.into(),
                    object_store_name: object_store_name.into(),
                    key_range,
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteObjectStoreEntries {
            type Response = ();
            const METHOD: &'static str = "IndexedDB.deleteObjectStoreEntries";
        }

        /// Disables events from backend.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "IndexedDB.disable";
        }

        /// Enables events from backend.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "IndexedDB.enable";
        }

        /// Requests data from object store or index.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestData {
            /// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
            /// Database name.
            pub database_name: String,
            /// Object store name.
            pub object_store_name: String,
            /// Index name. If not specified, it performs an object store data request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub index_name: Option<String>,
            /// Number of records to skip.
            pub skip_count: i64,
            /// Number of records to fetch.
            pub page_size: i64,
            /// Key range.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub key_range: Option<types::KeyRange>,
        }

        impl RequestData {
            pub fn new(
                database_name: impl Into<String>,
                object_store_name: impl Into<String>,
                skip_count: i64,
                page_size: i64,
            ) -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                    database_name: database_name.into(),
                    object_store_name: object_store_name.into(),
                    index_name: None,
                    skip_count,
                    page_size,
                    key_range: None,
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }

            pub fn with_index_name(mut self, index_name: impl Into<String>) -> Self {
                self.index_name = Some(index_name.into());
                self
            }

            pub fn with_key_range(mut self, key_range: types::KeyRange) -> Self {
                self.key_range = Some(key_range);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestDataResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestData {
            type Response = responses::RequestDataResponse;
            const METHOD: &'static str = "IndexedDB.requestData";
        }

        /// Gets metadata of an object store.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMetadata {
            /// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
            /// Database name.
            pub database_name: String,
            /// Object store name.
            pub object_store_name: String,
        }

        impl GetMetadata {
            pub fn new(
                database_name: impl Into<String>,
                object_store_name: impl Into<String>,
            ) -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                    database_name: database_name.into(),
                    object_store_name: object_store_name.into(),
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetMetadataResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetMetadata {
            type Response = responses::GetMetadataResponse;
            const METHOD: &'static str = "IndexedDB.getMetadata";
        }

        /// Requests database with given name in given frame.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestDatabase {
            /// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
            /// Database name.
            pub database_name: String,
        }

        impl RequestDatabase {
            pub fn new(database_name: impl Into<String>) -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                    database_name: database_name.into(),
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestDatabaseResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestDatabase {
            type Response = responses::RequestDatabaseResponse;
            const METHOD: &'static str = "IndexedDB.requestDatabase";
        }

        /// Requests database names for given security origin.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestDatabaseNames {
            /// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin: Option<String>,
            /// Storage key.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_key: Option<String>,
            /// Storage bucket. If not specified, it uses the default bucket.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub storage_bucket: Option<storage::types::StorageBucket>,
        }

        impl RequestDatabaseNames {
            pub fn new() -> Self {
                Self {
                    security_origin: None,
                    storage_key: None,
                    storage_bucket: None,
                }
            }

            pub fn with_security_origin(mut self, security_origin: impl Into<String>) -> Self {
                self.security_origin = Some(security_origin.into());
                self
            }

            pub fn with_storage_key(mut self, storage_key: impl Into<String>) -> Self {
                self.storage_key = Some(storage_key.into());
                self
            }

            pub fn with_storage_bucket(
                mut self,
                storage_bucket: storage::types::StorageBucket,
            ) -> Self {
                self.storage_bucket = Some(storage_bucket);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestDatabaseNamesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestDatabaseNames {
            type Response = responses::RequestDatabaseNamesResponse;
            const METHOD: &'static str = "IndexedDB.requestDatabaseNames";
        }
    }
}

pub mod input {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TouchPoint {
            /// X coordinate of the event relative to the main frame's viewport in CSS pixels.
            pub x: f64,
            /// Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
            pub y: f64,
            /// X radius of the touch area (default: 1.0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub radius_x: Option<f64>,
            /// Y radius of the touch area (default: 1.0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub radius_y: Option<f64>,
            /// Rotation angle (default: 0.0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub rotation_angle: Option<f64>,
            /// Force (default: 1.0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub force: Option<f64>,
            /// The normalized tangential pressure, which has a range of [-1,1] (default: 0).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tangential_pressure: Option<f64>,
            /// The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tilt_x: Option<f64>,
            /// The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tilt_y: Option<f64>,
            /// The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub twist: Option<i64>,
            /// Identifier used to track touch sources between events, must be unique within an event.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub id: Option<f64>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum GestureSourceType {
            #[serde(rename = "default")]
            Default,
            #[serde(rename = "touch")]
            Touch,
            #[serde(rename = "mouse")]
            Mouse,
        }
        impl AsRef<str> for GestureSourceType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Default => "default",
                    Self::Touch => "touch",
                    Self::Mouse => "mouse",
                }
            }
        }
        impl std::str::FromStr for GestureSourceType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "default" => Ok(Self::Default),
                    "touch" => Ok(Self::Touch),
                    "mouse" => Ok(Self::Mouse),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for GestureSourceType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum MouseButton {
            #[serde(rename = "none")]
            None,
            #[serde(rename = "left")]
            Left,
            #[serde(rename = "middle")]
            Middle,
            #[serde(rename = "right")]
            Right,
            #[serde(rename = "back")]
            Back,
            #[serde(rename = "forward")]
            Forward,
        }
        impl AsRef<str> for MouseButton {
            fn as_ref(&self) -> &str {
                match self {
                    Self::None => "none",
                    Self::Left => "left",
                    Self::Middle => "middle",
                    Self::Right => "right",
                    Self::Back => "back",
                    Self::Forward => "forward",
                }
            }
        }
        impl std::str::FromStr for MouseButton {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "none" => Ok(Self::None),
                    "left" => Ok(Self::Left),
                    "middle" => Ok(Self::Middle),
                    "right" => Ok(Self::Right),
                    "back" => Ok(Self::Back),
                    "forward" => Ok(Self::Forward),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for MouseButton {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// UTC time in seconds, counted from January 1, 1970.
        pub type TimeSinceEpoch = f64;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DragDataItem {
            /// Mime type of the dragged data.
            pub mime_type: String,
            /// Depending of the value of `mimeType`, it contains the dragged link, text, HTML markup or any other data.
            pub data: String,
            /// Title associated with a link. Only valid when `mimeType` == "text/uri-list".
            #[serde(skip_serializing_if = "Option::is_none")]
            pub title: Option<String>,
            /// Stores the base URL for the contained markup. Only valid when `mimeType` == "text/html".
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "baseURL")]
            pub base_url: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DragData {
            pub items: Vec<DragDataItem>,
            /// List of filenames that should be included when dropping
            #[serde(skip_serializing_if = "Option::is_none")]
            pub files: Option<Vec<String>>,
            /// Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
            pub drag_operations_mask: i64,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Dispatches a drag event into the page.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DispatchDragEvent {
            /// Type of the drag event.
            pub type_: String,
            /// X coordinate of the event relative to the main frame's viewport in CSS pixels.
            pub x: f64,
            /// Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
            pub y: f64,
            pub data: types::DragData,
            /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub modifiers: Option<i64>,
        }

        impl DispatchDragEvent {
            pub fn new(type_: impl Into<String>, x: f64, y: f64, data: types::DragData) -> Self {
                Self {
                    type_: type_.into(),
                    x,
                    y,
                    data,
                    modifiers: None,
                }
            }

            pub fn with_modifiers(mut self, modifiers: i64) -> Self {
                self.modifiers = Some(modifiers);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DispatchDragEvent {
            type Response = ();
            const METHOD: &'static str = "Input.dispatchDragEvent";
        }

        /// Dispatches a key event to the page.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DispatchKeyEvent {
            /// Type of the key event.
            pub type_: String,
            /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub modifiers: Option<i64>,
            /// Time at which the event occurred.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timestamp: Option<types::TimeSinceEpoch>,
            /// Text as generated by processing a virtual key code with a keyboard layout. Not needed for for `keyUp` and `rawKeyDown` events (default: "")
            #[serde(skip_serializing_if = "Option::is_none")]
            pub text: Option<String>,
            /// Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unmodified_text: Option<String>,
            /// Unique key identifier (e.g., 'U+0041') (default: "").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub key_identifier: Option<String>,
            /// Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub code: Option<String>,
            /// Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub key: Option<String>,
            /// Windows virtual key code (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub windows_virtual_key_code: Option<i64>,
            /// Native virtual key code (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub native_virtual_key_code: Option<i64>,
            /// Whether the event was generated from auto repeat (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub auto_repeat: Option<bool>,
            /// Whether the event was generated from the keypad (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_keypad: Option<bool>,
            /// Whether the event was a system key event (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_system_key: Option<bool>,
            /// Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub location: Option<i64>,
            /// Editing commands to send with the key event (e.g., 'selectAll') (default: []). These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub commands: Option<Vec<String>>,
        }

        impl DispatchKeyEvent {
            pub fn new(type_: impl Into<String>) -> Self {
                Self {
                    type_: type_.into(),
                    modifiers: None,
                    timestamp: None,
                    text: None,
                    unmodified_text: None,
                    key_identifier: None,
                    code: None,
                    key: None,
                    windows_virtual_key_code: None,
                    native_virtual_key_code: None,
                    auto_repeat: None,
                    is_keypad: None,
                    is_system_key: None,
                    location: None,
                    commands: None,
                }
            }

            pub fn with_modifiers(mut self, modifiers: i64) -> Self {
                self.modifiers = Some(modifiers);
                self
            }

            pub fn with_timestamp(mut self, timestamp: types::TimeSinceEpoch) -> Self {
                self.timestamp = Some(timestamp);
                self
            }

            pub fn with_text(mut self, text: impl Into<String>) -> Self {
                self.text = Some(text.into());
                self
            }

            pub fn with_unmodified_text(mut self, unmodified_text: impl Into<String>) -> Self {
                self.unmodified_text = Some(unmodified_text.into());
                self
            }

            pub fn with_key_identifier(mut self, key_identifier: impl Into<String>) -> Self {
                self.key_identifier = Some(key_identifier.into());
                self
            }

            pub fn with_code(mut self, code: impl Into<String>) -> Self {
                self.code = Some(code.into());
                self
            }

            pub fn with_key(mut self, key: impl Into<String>) -> Self {
                self.key = Some(key.into());
                self
            }

            pub fn with_windows_virtual_key_code(mut self, windows_virtual_key_code: i64) -> Self {
                self.windows_virtual_key_code = Some(windows_virtual_key_code);
                self
            }

            pub fn with_native_virtual_key_code(mut self, native_virtual_key_code: i64) -> Self {
                self.native_virtual_key_code = Some(native_virtual_key_code);
                self
            }

            pub fn with_auto_repeat(mut self, auto_repeat: bool) -> Self {
                self.auto_repeat = Some(auto_repeat);
                self
            }

            pub fn with_is_keypad(mut self, is_keypad: bool) -> Self {
                self.is_keypad = Some(is_keypad);
                self
            }

            pub fn with_is_system_key(mut self, is_system_key: bool) -> Self {
                self.is_system_key = Some(is_system_key);
                self
            }

            pub fn with_location(mut self, location: i64) -> Self {
                self.location = Some(location);
                self
            }

            pub fn with_commands(mut self, commands: Vec<String>) -> Self {
                self.commands = Some(commands);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DispatchKeyEvent {
            type Response = ();
            const METHOD: &'static str = "Input.dispatchKeyEvent";
        }

        /// This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InsertText {
            /// The text to insert.
            pub text: String,
        }

        impl InsertText {
            pub fn new(text: impl Into<String>) -> Self {
                Self { text: text.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for InsertText {
            type Response = ();
            const METHOD: &'static str = "Input.insertText";
        }

        /// This method sets the current candidate text for IME. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ImeSetComposition {
            /// The text to insert
            pub text: String,
            /// selection start
            pub selection_start: i64,
            /// selection end
            pub selection_end: i64,
            /// replacement start
            #[serde(skip_serializing_if = "Option::is_none")]
            pub replacement_start: Option<i64>,
            /// replacement end
            #[serde(skip_serializing_if = "Option::is_none")]
            pub replacement_end: Option<i64>,
        }

        impl ImeSetComposition {
            pub fn new(text: impl Into<String>, selection_start: i64, selection_end: i64) -> Self {
                Self {
                    text: text.into(),
                    selection_start,
                    selection_end,
                    replacement_start: None,
                    replacement_end: None,
                }
            }

            pub fn with_replacement_start(mut self, replacement_start: i64) -> Self {
                self.replacement_start = Some(replacement_start);
                self
            }

            pub fn with_replacement_end(mut self, replacement_end: i64) -> Self {
                self.replacement_end = Some(replacement_end);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ImeSetComposition {
            type Response = ();
            const METHOD: &'static str = "Input.imeSetComposition";
        }

        /// Dispatches a mouse event to the page.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DispatchMouseEvent {
            /// Type of the mouse event.
            pub type_: String,
            /// X coordinate of the event relative to the main frame's viewport in CSS pixels.
            pub x: f64,
            /// Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
            pub y: f64,
            /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub modifiers: Option<i64>,
            /// Time at which the event occurred.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timestamp: Option<types::TimeSinceEpoch>,
            /// Mouse button (default: "none").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub button: Option<types::MouseButton>,
            /// A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub buttons: Option<i64>,
            /// Number of times the mouse button was clicked (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub click_count: Option<i64>,
            /// The normalized pressure, which has a range of [0,1] (default: 0).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub force: Option<f64>,
            /// The normalized tangential pressure, which has a range of [-1,1] (default: 0).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tangential_pressure: Option<f64>,
            /// The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tilt_x: Option<f64>,
            /// The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tilt_y: Option<f64>,
            /// The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub twist: Option<i64>,
            /// X delta in CSS pixels for mouse wheel event (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub delta_x: Option<f64>,
            /// Y delta in CSS pixels for mouse wheel event (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub delta_y: Option<f64>,
            /// Pointer type (default: "mouse").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pointer_type: Option<String>,
        }

        impl DispatchMouseEvent {
            pub fn new(type_: impl Into<String>, x: f64, y: f64) -> Self {
                Self {
                    type_: type_.into(),
                    x,
                    y,
                    modifiers: None,
                    timestamp: None,
                    button: None,
                    buttons: None,
                    click_count: None,
                    force: None,
                    tangential_pressure: None,
                    tilt_x: None,
                    tilt_y: None,
                    twist: None,
                    delta_x: None,
                    delta_y: None,
                    pointer_type: None,
                }
            }

            pub fn with_modifiers(mut self, modifiers: i64) -> Self {
                self.modifiers = Some(modifiers);
                self
            }

            pub fn with_timestamp(mut self, timestamp: types::TimeSinceEpoch) -> Self {
                self.timestamp = Some(timestamp);
                self
            }

            pub fn with_button(mut self, button: types::MouseButton) -> Self {
                self.button = Some(button);
                self
            }

            pub fn with_buttons(mut self, buttons: i64) -> Self {
                self.buttons = Some(buttons);
                self
            }

            pub fn with_click_count(mut self, click_count: i64) -> Self {
                self.click_count = Some(click_count);
                self
            }

            pub fn with_force(mut self, force: f64) -> Self {
                self.force = Some(force);
                self
            }

            pub fn with_tangential_pressure(mut self, tangential_pressure: f64) -> Self {
                self.tangential_pressure = Some(tangential_pressure);
                self
            }

            pub fn with_tilt_x(mut self, tilt_x: f64) -> Self {
                self.tilt_x = Some(tilt_x);
                self
            }

            pub fn with_tilt_y(mut self, tilt_y: f64) -> Self {
                self.tilt_y = Some(tilt_y);
                self
            }

            pub fn with_twist(mut self, twist: i64) -> Self {
                self.twist = Some(twist);
                self
            }

            pub fn with_delta_x(mut self, delta_x: f64) -> Self {
                self.delta_x = Some(delta_x);
                self
            }

            pub fn with_delta_y(mut self, delta_y: f64) -> Self {
                self.delta_y = Some(delta_y);
                self
            }

            pub fn with_pointer_type(mut self, pointer_type: impl Into<String>) -> Self {
                self.pointer_type = Some(pointer_type.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DispatchMouseEvent {
            type Response = ();
            const METHOD: &'static str = "Input.dispatchMouseEvent";
        }

        /// Dispatches a touch event to the page.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DispatchTouchEvent {
            /// Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
            pub type_: String,
            /// Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
            pub touch_points: Vec<types::TouchPoint>,
            /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub modifiers: Option<i64>,
            /// Time at which the event occurred.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timestamp: Option<types::TimeSinceEpoch>,
        }

        impl DispatchTouchEvent {
            pub fn new(type_: impl Into<String>, touch_points: Vec<types::TouchPoint>) -> Self {
                Self {
                    type_: type_.into(),
                    touch_points,
                    modifiers: None,
                    timestamp: None,
                }
            }

            pub fn with_modifiers(mut self, modifiers: i64) -> Self {
                self.modifiers = Some(modifiers);
                self
            }

            pub fn with_timestamp(mut self, timestamp: types::TimeSinceEpoch) -> Self {
                self.timestamp = Some(timestamp);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DispatchTouchEvent {
            type Response = ();
            const METHOD: &'static str = "Input.dispatchTouchEvent";
        }

        /// Cancels any active dragging in the page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CancelDragging {}

        impl CancelDragging {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CancelDragging {
            type Response = ();
            const METHOD: &'static str = "Input.cancelDragging";
        }

        /// Emulates touch event from the mouse event parameters.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EmulateTouchFromMouseEvent {
            /// Type of the mouse event.
            pub type_: String,
            /// X coordinate of the mouse pointer in DIP.
            pub x: i64,
            /// Y coordinate of the mouse pointer in DIP.
            pub y: i64,
            /// Mouse button. Only "none", "left", "right" are supported.
            pub button: types::MouseButton,
            /// Time at which the event occurred (default: current time).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timestamp: Option<types::TimeSinceEpoch>,
            /// X delta in DIP for mouse wheel event (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub delta_x: Option<f64>,
            /// Y delta in DIP for mouse wheel event (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub delta_y: Option<f64>,
            /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub modifiers: Option<i64>,
            /// Number of times the mouse button was clicked (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub click_count: Option<i64>,
        }

        impl EmulateTouchFromMouseEvent {
            pub fn new(
                type_: impl Into<String>,
                x: i64,
                y: i64,
                button: types::MouseButton,
            ) -> Self {
                Self {
                    type_: type_.into(),
                    x,
                    y,
                    button,
                    timestamp: None,
                    delta_x: None,
                    delta_y: None,
                    modifiers: None,
                    click_count: None,
                }
            }

            pub fn with_timestamp(mut self, timestamp: types::TimeSinceEpoch) -> Self {
                self.timestamp = Some(timestamp);
                self
            }

            pub fn with_delta_x(mut self, delta_x: f64) -> Self {
                self.delta_x = Some(delta_x);
                self
            }

            pub fn with_delta_y(mut self, delta_y: f64) -> Self {
                self.delta_y = Some(delta_y);
                self
            }

            pub fn with_modifiers(mut self, modifiers: i64) -> Self {
                self.modifiers = Some(modifiers);
                self
            }

            pub fn with_click_count(mut self, click_count: i64) -> Self {
                self.click_count = Some(click_count);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for EmulateTouchFromMouseEvent {
            type Response = ();
            const METHOD: &'static str = "Input.emulateTouchFromMouseEvent";
        }

        /// Ignores input events (useful while auditing page).
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetIgnoreInputEvents {
            /// Ignores input events processing when set to true.
            pub ignore: bool,
        }

        impl SetIgnoreInputEvents {
            pub fn new(ignore: bool) -> Self {
                Self { ignore }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetIgnoreInputEvents {
            type Response = ();
            const METHOD: &'static str = "Input.setIgnoreInputEvents";
        }

        /// Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInterceptDrags {
            pub enabled: bool,
        }

        impl SetInterceptDrags {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInterceptDrags {
            type Response = ();
            const METHOD: &'static str = "Input.setInterceptDrags";
        }

        /// Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SynthesizePinchGesture {
            /// X coordinate of the start of the gesture in CSS pixels.
            pub x: f64,
            /// Y coordinate of the start of the gesture in CSS pixels.
            pub y: f64,
            /// Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
            pub scale_factor: f64,
            /// Relative pointer speed in pixels per second (default: 800).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub relative_speed: Option<i64>,
            /// Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub gesture_source_type: Option<types::GestureSourceType>,
        }

        impl SynthesizePinchGesture {
            pub fn new(x: f64, y: f64, scale_factor: f64) -> Self {
                Self {
                    x,
                    y,
                    scale_factor,
                    relative_speed: None,
                    gesture_source_type: None,
                }
            }

            pub fn with_relative_speed(mut self, relative_speed: i64) -> Self {
                self.relative_speed = Some(relative_speed);
                self
            }

            pub fn with_gesture_source_type(
                mut self,
                gesture_source_type: types::GestureSourceType,
            ) -> Self {
                self.gesture_source_type = Some(gesture_source_type);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SynthesizePinchGesture {
            type Response = ();
            const METHOD: &'static str = "Input.synthesizePinchGesture";
        }

        /// Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SynthesizeScrollGesture {
            /// X coordinate of the start of the gesture in CSS pixels.
            pub x: f64,
            /// Y coordinate of the start of the gesture in CSS pixels.
            pub y: f64,
            /// The distance to scroll along the X axis (positive to scroll left).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub x_distance: Option<f64>,
            /// The distance to scroll along the Y axis (positive to scroll up).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub y_distance: Option<f64>,
            /// The number of additional pixels to scroll back along the X axis, in addition to the given distance.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub x_overscroll: Option<f64>,
            /// The number of additional pixels to scroll back along the Y axis, in addition to the given distance.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub y_overscroll: Option<f64>,
            /// Prevent fling (default: true).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub prevent_fling: Option<bool>,
            /// Swipe speed in pixels per second (default: 800).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub speed: Option<i64>,
            /// Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub gesture_source_type: Option<types::GestureSourceType>,
            /// The number of times to repeat the gesture (default: 0).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub repeat_count: Option<i64>,
            /// The number of milliseconds delay between each repeat. (default: 250).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub repeat_delay_ms: Option<i64>,
            /// The name of the interaction markers to generate, if not empty (default: "").
            #[serde(skip_serializing_if = "Option::is_none")]
            pub interaction_marker_name: Option<String>,
        }

        impl SynthesizeScrollGesture {
            pub fn new(x: f64, y: f64) -> Self {
                Self {
                    x,
                    y,
                    x_distance: None,
                    y_distance: None,
                    x_overscroll: None,
                    y_overscroll: None,
                    prevent_fling: None,
                    speed: None,
                    gesture_source_type: None,
                    repeat_count: None,
                    repeat_delay_ms: None,
                    interaction_marker_name: None,
                }
            }

            pub fn with_x_distance(mut self, x_distance: f64) -> Self {
                self.x_distance = Some(x_distance);
                self
            }

            pub fn with_y_distance(mut self, y_distance: f64) -> Self {
                self.y_distance = Some(y_distance);
                self
            }

            pub fn with_x_overscroll(mut self, x_overscroll: f64) -> Self {
                self.x_overscroll = Some(x_overscroll);
                self
            }

            pub fn with_y_overscroll(mut self, y_overscroll: f64) -> Self {
                self.y_overscroll = Some(y_overscroll);
                self
            }

            pub fn with_prevent_fling(mut self, prevent_fling: bool) -> Self {
                self.prevent_fling = Some(prevent_fling);
                self
            }

            pub fn with_speed(mut self, speed: i64) -> Self {
                self.speed = Some(speed);
                self
            }

            pub fn with_gesture_source_type(
                mut self,
                gesture_source_type: types::GestureSourceType,
            ) -> Self {
                self.gesture_source_type = Some(gesture_source_type);
                self
            }

            pub fn with_repeat_count(mut self, repeat_count: i64) -> Self {
                self.repeat_count = Some(repeat_count);
                self
            }

            pub fn with_repeat_delay_ms(mut self, repeat_delay_ms: i64) -> Self {
                self.repeat_delay_ms = Some(repeat_delay_ms);
                self
            }

            pub fn with_interaction_marker_name(
                mut self,
                interaction_marker_name: impl Into<String>,
            ) -> Self {
                self.interaction_marker_name = Some(interaction_marker_name.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SynthesizeScrollGesture {
            type Response = ();
            const METHOD: &'static str = "Input.synthesizeScrollGesture";
        }

        /// Synthesizes a tap gesture over a time period by issuing appropriate touch events.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SynthesizeTapGesture {
            /// X coordinate of the start of the gesture in CSS pixels.
            pub x: f64,
            /// Y coordinate of the start of the gesture in CSS pixels.
            pub y: f64,
            /// Duration between touchdown and touchup events in ms (default: 50).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub duration: Option<i64>,
            /// Number of times to perform the tap (e.g. 2 for double tap, default: 1).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tap_count: Option<i64>,
            /// Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub gesture_source_type: Option<types::GestureSourceType>,
        }

        impl SynthesizeTapGesture {
            pub fn new(x: f64, y: f64) -> Self {
                Self {
                    x,
                    y,
                    duration: None,
                    tap_count: None,
                    gesture_source_type: None,
                }
            }

            pub fn with_duration(mut self, duration: i64) -> Self {
                self.duration = Some(duration);
                self
            }

            pub fn with_tap_count(mut self, tap_count: i64) -> Self {
                self.tap_count = Some(tap_count);
                self
            }

            pub fn with_gesture_source_type(
                mut self,
                gesture_source_type: types::GestureSourceType,
            ) -> Self {
                self.gesture_source_type = Some(gesture_source_type);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SynthesizeTapGesture {
            type Response = ();
            const METHOD: &'static str = "Input.synthesizeTapGesture";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to restore normal drag and drop behavior.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DragIntercepted {
            pub data: types::DragData,
        }

        impl DragIntercepted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Input.dragIntercepted")
            }
        }
    }
}

pub mod inspector {
    use super::*;

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;

        /// Disables inspector domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Inspector.disable";
        }

        /// Enables inspector domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Inspector.enable";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;

        /// Fired when remote debugging connection is about to be terminated. Contains detach reason.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Detached {
            /// The reason why connection has been terminated.
            pub reason: String,
        }

        impl Detached {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Inspector.detached")
            }
        }

        /// Fired when debugging target has crashed
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TargetCrashed {}

        impl TargetCrashed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Inspector.targetCrashed")
            }
        }

        /// Fired when debugging target has reloaded after crash
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TargetReloadedAfterCrash {}

        impl TargetReloadedAfterCrash {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Inspector.targetReloadedAfterCrash")
            }
        }

        /// Fired on worker targets when main worker script and any imported scripts have been evaluated.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WorkerScriptLoaded {}

        impl WorkerScriptLoaded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Inspector.workerScriptLoaded")
            }
        }
    }
}

pub mod layer_tree {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique Layer identifier.
        pub type LayerId = String;

        /// Unique snapshot identifier.
        pub type SnapshotId = String;

        /// Rectangle where scrolling happens on the main thread.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScrollRect {
            /// Rectangle itself.
            pub rect: dom::types::Rect,
            /// Reason for rectangle to force scrolling on the main thread
            pub type_: String,
        }

        /// Sticky position constraints.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StickyPositionConstraint {
            /// Layout rectangle of the sticky element before being shifted
            pub sticky_box_rect: dom::types::Rect,
            /// Layout rectangle of the containing block of the sticky element
            pub containing_block_rect: dom::types::Rect,
            /// The nearest sticky layer that shifts the sticky box
            #[serde(skip_serializing_if = "Option::is_none")]
            pub nearest_layer_shifting_sticky_box: Option<LayerId>,
            /// The nearest sticky layer that shifts the containing block
            #[serde(skip_serializing_if = "Option::is_none")]
            pub nearest_layer_shifting_containing_block: Option<LayerId>,
        }

        /// Serialized fragment of layer picture along with its offset within the layer.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PictureTile {
            /// Offset from owning layer left boundary
            pub x: f64,
            /// Offset from owning layer top boundary
            pub y: f64,
            /// Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON)
            pub picture: String,
        }

        /// Information about a compositing layer.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Layer {
            /// The unique id for this layer.
            pub layer_id: LayerId,
            /// The id of parent (not present for root).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_layer_id: Option<LayerId>,
            /// The backend id for the node associated with this layer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// Offset from parent layer, X coordinate.
            pub offset_x: f64,
            /// Offset from parent layer, Y coordinate.
            pub offset_y: f64,
            /// Layer width.
            pub width: f64,
            /// Layer height.
            pub height: f64,
            /// Transformation matrix for layer, default is identity matrix
            #[serde(skip_serializing_if = "Option::is_none")]
            pub transform: Option<Vec<f64>>,
            /// Transform anchor point X, absent if no transform specified
            #[serde(skip_serializing_if = "Option::is_none")]
            pub anchor_x: Option<f64>,
            /// Transform anchor point Y, absent if no transform specified
            #[serde(skip_serializing_if = "Option::is_none")]
            pub anchor_y: Option<f64>,
            /// Transform anchor point Z, absent if no transform specified
            #[serde(skip_serializing_if = "Option::is_none")]
            pub anchor_z: Option<f64>,
            /// Indicates how many time this layer has painted.
            pub paint_count: i64,
            /// Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
            pub draws_content: bool,
            /// Set if layer is not visible.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub invisible: Option<bool>,
            /// Rectangles scrolling on main thread only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_rects: Option<Vec<ScrollRect>>,
            /// Sticky position constraint information
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sticky_position_constraint: Option<StickyPositionConstraint>,
        }

        /// Array of timings, one per paint step.
        pub type PaintProfile = Vec<f64>;
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CompositingReasonsResponse {
            /// A list of strings specifying reasons for the given layer to become composited.
            pub compositing_reasons: Vec<String>,
            /// A list of strings specifying reason IDs for the given layer to become composited.
            pub compositing_reason_ids: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadSnapshotResponse {
            /// The id of the snapshot.
            pub snapshot_id: types::SnapshotId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MakeSnapshotResponse {
            /// The id of the layer snapshot.
            pub snapshot_id: types::SnapshotId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ProfileSnapshotResponse {
            /// The array of paint profiles, one per run.
            pub timings: Vec<types::PaintProfile>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReplaySnapshotResponse {
            /// A data: URL for resulting image.
            #[serde(rename = "dataURL")]
            pub data_url: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SnapshotCommandLogResponse {
            /// The array of canvas function calls.
            pub command_log: Vec<serde_json::Value>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Provides the reasons why the given layer was composited.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CompositingReasons {
            /// The id of the layer for which we want to get the reasons it was composited.
            pub layer_id: types::LayerId,
        }

        impl CompositingReasons {
            pub fn new(layer_id: types::LayerId) -> Self {
                Self { layer_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CompositingReasonsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CompositingReasons {
            type Response = responses::CompositingReasonsResponse;
            const METHOD: &'static str = "LayerTree.compositingReasons";
        }

        /// Disables compositing tree inspection.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "LayerTree.disable";
        }

        /// Enables compositing tree inspection.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "LayerTree.enable";
        }

        /// Returns the snapshot identifier.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadSnapshot {
            /// An array of tiles composing the snapshot.
            pub tiles: Vec<types::PictureTile>,
        }

        impl LoadSnapshot {
            pub fn new(tiles: Vec<types::PictureTile>) -> Self {
                Self { tiles }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::LoadSnapshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for LoadSnapshot {
            type Response = responses::LoadSnapshotResponse;
            const METHOD: &'static str = "LayerTree.loadSnapshot";
        }

        /// Returns the layer snapshot identifier.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MakeSnapshot {
            /// The id of the layer.
            pub layer_id: types::LayerId,
        }

        impl MakeSnapshot {
            pub fn new(layer_id: types::LayerId) -> Self {
                Self { layer_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::MakeSnapshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for MakeSnapshot {
            type Response = responses::MakeSnapshotResponse;
            const METHOD: &'static str = "LayerTree.makeSnapshot";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ProfileSnapshot {
            /// The id of the layer snapshot.
            pub snapshot_id: types::SnapshotId,
            /// The maximum number of times to replay the snapshot (1, if not specified).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub min_repeat_count: Option<i64>,
            /// The minimum duration (in seconds) to replay the snapshot.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub min_duration: Option<f64>,
            /// The clip rectangle to apply when replaying the snapshot.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub clip_rect: Option<dom::types::Rect>,
        }

        impl ProfileSnapshot {
            pub fn new(snapshot_id: types::SnapshotId) -> Self {
                Self {
                    snapshot_id,
                    min_repeat_count: None,
                    min_duration: None,
                    clip_rect: None,
                }
            }

            pub fn with_min_repeat_count(mut self, min_repeat_count: i64) -> Self {
                self.min_repeat_count = Some(min_repeat_count);
                self
            }

            pub fn with_min_duration(mut self, min_duration: f64) -> Self {
                self.min_duration = Some(min_duration);
                self
            }

            pub fn with_clip_rect(mut self, clip_rect: dom::types::Rect) -> Self {
                self.clip_rect = Some(clip_rect);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ProfileSnapshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ProfileSnapshot {
            type Response = responses::ProfileSnapshotResponse;
            const METHOD: &'static str = "LayerTree.profileSnapshot";
        }

        /// Releases layer snapshot captured by the back-end.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReleaseSnapshot {
            /// The id of the layer snapshot.
            pub snapshot_id: types::SnapshotId,
        }

        impl ReleaseSnapshot {
            pub fn new(snapshot_id: types::SnapshotId) -> Self {
                Self { snapshot_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReleaseSnapshot {
            type Response = ();
            const METHOD: &'static str = "LayerTree.releaseSnapshot";
        }

        /// Replays the layer snapshot and returns the resulting bitmap.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReplaySnapshot {
            /// The id of the layer snapshot.
            pub snapshot_id: types::SnapshotId,
            /// The first step to replay from (replay from the very start if not specified).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub from_step: Option<i64>,
            /// The last step to replay to (replay till the end if not specified).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub to_step: Option<i64>,
            /// The scale to apply while replaying (defaults to 1).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scale: Option<f64>,
        }

        impl ReplaySnapshot {
            pub fn new(snapshot_id: types::SnapshotId) -> Self {
                Self {
                    snapshot_id,
                    from_step: None,
                    to_step: None,
                    scale: None,
                }
            }

            pub fn with_from_step(mut self, from_step: i64) -> Self {
                self.from_step = Some(from_step);
                self
            }

            pub fn with_to_step(mut self, to_step: i64) -> Self {
                self.to_step = Some(to_step);
                self
            }

            pub fn with_scale(mut self, scale: f64) -> Self {
                self.scale = Some(scale);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ReplaySnapshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReplaySnapshot {
            type Response = responses::ReplaySnapshotResponse;
            const METHOD: &'static str = "LayerTree.replaySnapshot";
        }

        /// Replays the layer snapshot and returns canvas log.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SnapshotCommandLog {
            /// The id of the layer snapshot.
            pub snapshot_id: types::SnapshotId,
        }

        impl SnapshotCommandLog {
            pub fn new(snapshot_id: types::SnapshotId) -> Self {
                Self { snapshot_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SnapshotCommandLogResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SnapshotCommandLog {
            type Response = responses::SnapshotCommandLogResponse;
            const METHOD: &'static str = "LayerTree.snapshotCommandLog";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LayerPainted {
            /// The id of the painted layer.
            pub layer_id: types::LayerId,
            /// Clip rectangle.
            pub clip: dom::types::Rect,
        }

        impl LayerPainted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("LayerTree.layerPainted")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LayerTreeDidChange {
            /// Layer tree, absent if not in the compositing mode.
            pub layers: Option<Vec<types::Layer>>,
        }

        impl LayerTreeDidChange {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("LayerTree.layerTreeDidChange")
            }
        }
    }
}

pub mod log {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Log entry.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LogEntry {
            /// Log entry source.
            pub source: String,
            /// Log entry severity.
            pub level: String,
            /// Logged text.
            pub text: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub category: Option<String>,
            /// Timestamp when this entry was added.
            pub timestamp: runtime::types::Timestamp,
            /// URL of the resource if known.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// Line number in the resource.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub line_number: Option<i64>,
            /// JavaScript stack trace.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stack_trace: Option<runtime::types::StackTrace>,
            /// Identifier of the network request associated with this entry.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub network_request_id: Option<network::types::RequestId>,
            /// Identifier of the worker associated with this entry.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub worker_id: Option<String>,
            /// Call arguments.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub args: Option<Vec<runtime::types::RemoteObject>>,
        }

        /// Violation configuration setting.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ViolationSetting {
            /// Violation type.
            pub name: String,
            /// Time threshold to trigger upon.
            pub threshold: f64,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Clears the log.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Clear {}

        impl Clear {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Clear {
            type Response = ();
            const METHOD: &'static str = "Log.clear";
        }

        /// Disables log domain, prevents further log entries from being reported to the client.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Log.disable";
        }

        /// Enables log domain, sends the entries collected so far to the client by means of the `entryAdded` notification.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Log.enable";
        }

        /// start violation reporting.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartViolationsReport {
            /// Configuration for violations.
            pub config: Vec<types::ViolationSetting>,
        }

        impl StartViolationsReport {
            pub fn new(config: Vec<types::ViolationSetting>) -> Self {
                Self { config }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartViolationsReport {
            type Response = ();
            const METHOD: &'static str = "Log.startViolationsReport";
        }

        /// Stop violation reporting.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopViolationsReport {}

        impl StopViolationsReport {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopViolationsReport {
            type Response = ();
            const METHOD: &'static str = "Log.stopViolationsReport";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Issued when new message was logged.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EntryAdded {
            /// The entry.
            pub entry: types::LogEntry,
        }

        impl EntryAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Log.entryAdded")
            }
        }
    }
}

pub mod media {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Players will get an ID that is unique within the agent context.
        pub type PlayerId = String;

        pub type Timestamp = f64;

        /// Have one type per entry in MediaLogRecord::Type Corresponds to kMessage
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerMessage {
            /// Keep in sync with MediaLogMessageLevel We are currently keeping the message level 'error' separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we're going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type.
            pub level: String,
            pub message: String,
        }

        /// Corresponds to kMediaPropertyChange
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerProperty {
            pub name: String,
            pub value: String,
        }

        /// Corresponds to kMediaEventTriggered
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerEvent {
            pub timestamp: Timestamp,
            pub value: String,
        }

        /// Represents logged source line numbers reported in an error. NOTE: file and line are from chromium c++ implementation code, not js.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerErrorSourceLocation {
            pub file: String,
            pub line: i64,
        }

        /// Corresponds to kMediaError
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerError {
            pub error_type: String,
            /// Code is the numeric enum entry for a specific set of error codes, such as PipelineStatusCodes in media/base/pipeline_status.h
            pub code: i64,
            /// A trace of where this error was caused / where it passed through.
            pub stack: Vec<PlayerErrorSourceLocation>,
            /// Errors potentially have a root cause error, ie, a DecoderError might be caused by an WindowsError
            pub cause: Vec<PlayerError>,
            /// Extra data attached to an error, such as an HRESULT, Video Codec, etc.
            pub data: serde_json::Value,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Player {
            pub player_id: PlayerId,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dom_node_id: Option<dom::types::BackendNodeId>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Enables the Media domain
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Media.enable";
        }

        /// Disables the Media domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Media.disable";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerPropertiesChanged {
            pub player_id: types::PlayerId,
            pub properties: Vec<types::PlayerProperty>,
        }

        impl PlayerPropertiesChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Media.playerPropertiesChanged")
            }
        }

        /// Send events as a list, allowing them to be batched on the browser for less congestion. If batched, events must ALWAYS be in chronological order.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerEventsAdded {
            pub player_id: types::PlayerId,
            pub events: Vec<types::PlayerEvent>,
        }

        impl PlayerEventsAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Media.playerEventsAdded")
            }
        }

        /// Send a list of any messages that need to be delivered.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerMessagesLogged {
            pub player_id: types::PlayerId,
            pub messages: Vec<types::PlayerMessage>,
        }

        impl PlayerMessagesLogged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Media.playerMessagesLogged")
            }
        }

        /// Send a list of any errors that need to be delivered.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerErrorsRaised {
            pub player_id: types::PlayerId,
            pub errors: Vec<types::PlayerError>,
        }

        impl PlayerErrorsRaised {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Media.playerErrorsRaised")
            }
        }

        /// Called whenever a player is created, or when a new agent joins and receives a list of active players. If an agent is restored, it will receive one event for each active player.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PlayerCreated {
            pub player: types::Player,
        }

        impl PlayerCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Media.playerCreated")
            }
        }
    }
}

pub mod memory {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Memory pressure level.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PressureLevel {
            #[serde(rename = "moderate")]
            Moderate,
            #[serde(rename = "critical")]
            Critical,
        }
        impl AsRef<str> for PressureLevel {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Moderate => "moderate",
                    Self::Critical => "critical",
                }
            }
        }
        impl std::str::FromStr for PressureLevel {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "moderate" => Ok(Self::Moderate),
                    "critical" => Ok(Self::Critical),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PressureLevel {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Heap profile sample.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SamplingProfileNode {
            /// Size of the sampled allocation.
            pub size: f64,
            /// Total bytes attributed to this sample.
            pub total: f64,
            /// Execution stack at the point of allocation.
            pub stack: Vec<String>,
        }

        /// Array of heap profile samples.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SamplingProfile {
            pub samples: Vec<SamplingProfileNode>,
            pub modules: Vec<Module>,
        }

        /// Executable module information
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Module {
            /// Name of the module.
            pub name: String,
            /// UUID of the module.
            pub uuid: String,
            /// Base address where the module is loaded into memory. Encoded as a decimal or hexadecimal (0x prefixed) string.
            pub base_address: String,
            /// Size of the module in bytes.
            pub size: f64,
        }

        /// DOM object counter data.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DOMCounter {
            /// Object name. Note: object names should be presumed volatile and clients should not expect the returned names to be consistent across runs.
            pub name: String,
            /// Object count.
            pub count: i64,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomCountersResponse {
            pub documents: i64,
            pub nodes: i64,
            pub js_event_listeners: i64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomCountersForLeakDetectionResponse {
            /// DOM object counters.
            pub counters: Vec<types::DOMCounter>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAllTimeSamplingProfileResponse {
            pub profile: types::SamplingProfile,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBrowserSamplingProfileResponse {
            pub profile: types::SamplingProfile,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSamplingProfileResponse {
            pub profile: types::SamplingProfile,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Retruns current DOM object counters.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomCounters {}

        impl GetDomCounters {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDomCountersResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDomCounters {
            type Response = responses::GetDomCountersResponse;
            const METHOD: &'static str = "Memory.getDOMCounters";
        }

        /// Retruns DOM object counters after preparing renderer for leak detection.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomCountersForLeakDetection {}

        impl GetDomCountersForLeakDetection {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDomCountersForLeakDetectionResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDomCountersForLeakDetection {
            type Response = responses::GetDomCountersForLeakDetectionResponse;
            const METHOD: &'static str = "Memory.getDOMCountersForLeakDetection";
        }

        /// Prepares for leak detection by terminating workers, stopping spellcheckers, dropping non-essential internal caches, running garbage collections, etc.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PrepareForLeakDetection {}

        impl PrepareForLeakDetection {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for PrepareForLeakDetection {
            type Response = ();
            const METHOD: &'static str = "Memory.prepareForLeakDetection";
        }

        /// Simulate OomIntervention by purging V8 memory.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ForciblyPurgeJavaScriptMemory {}

        impl ForciblyPurgeJavaScriptMemory {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ForciblyPurgeJavaScriptMemory {
            type Response = ();
            const METHOD: &'static str = "Memory.forciblyPurgeJavaScriptMemory";
        }

        /// Enable/disable suppressing memory pressure notifications in all processes.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPressureNotificationsSuppressed {
            /// If true, memory pressure notifications will be suppressed.
            pub suppressed: bool,
        }

        impl SetPressureNotificationsSuppressed {
            pub fn new(suppressed: bool) -> Self {
                Self { suppressed }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPressureNotificationsSuppressed {
            type Response = ();
            const METHOD: &'static str = "Memory.setPressureNotificationsSuppressed";
        }

        /// Simulate a memory pressure notification in all processes.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SimulatePressureNotification {
            /// Memory pressure level of the notification.
            pub level: types::PressureLevel,
        }

        impl SimulatePressureNotification {
            pub fn new(level: types::PressureLevel) -> Self {
                Self { level }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SimulatePressureNotification {
            type Response = ();
            const METHOD: &'static str = "Memory.simulatePressureNotification";
        }

        /// Start collecting native memory profile.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartSampling {
            /// Average number of bytes between samples.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sampling_interval: Option<i64>,
            /// Do not randomize intervals between samples.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub suppress_randomness: Option<bool>,
        }

        impl StartSampling {
            pub fn new() -> Self {
                Self {
                    sampling_interval: None,
                    suppress_randomness: None,
                }
            }

            pub fn with_sampling_interval(mut self, sampling_interval: i64) -> Self {
                self.sampling_interval = Some(sampling_interval);
                self
            }

            pub fn with_suppress_randomness(mut self, suppress_randomness: bool) -> Self {
                self.suppress_randomness = Some(suppress_randomness);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartSampling {
            type Response = ();
            const METHOD: &'static str = "Memory.startSampling";
        }

        /// Stop collecting native memory profile.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopSampling {}

        impl StopSampling {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopSampling {
            type Response = ();
            const METHOD: &'static str = "Memory.stopSampling";
        }

        /// Retrieve native memory allocations profile collected since renderer process startup.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAllTimeSamplingProfile {}

        impl GetAllTimeSamplingProfile {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAllTimeSamplingProfileResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAllTimeSamplingProfile {
            type Response = responses::GetAllTimeSamplingProfileResponse;
            const METHOD: &'static str = "Memory.getAllTimeSamplingProfile";
        }

        /// Retrieve native memory allocations profile collected since browser process startup.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBrowserSamplingProfile {}

        impl GetBrowserSamplingProfile {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetBrowserSamplingProfileResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetBrowserSamplingProfile {
            type Response = responses::GetBrowserSamplingProfileResponse;
            const METHOD: &'static str = "Memory.getBrowserSamplingProfile";
        }

        /// Retrieve native memory allocations profile collected since last `startSampling` call.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSamplingProfile {}

        impl GetSamplingProfile {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSamplingProfileResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSamplingProfile {
            type Response = responses::GetSamplingProfileResponse;
            const METHOD: &'static str = "Memory.getSamplingProfile";
        }
    }
}

pub mod network {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Resource type as it was perceived by the rendering engine.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ResourceType {
            #[serde(rename = "Document")]
            Document,
            #[serde(rename = "Stylesheet")]
            Stylesheet,
            #[serde(rename = "Image")]
            Image,
            #[serde(rename = "Media")]
            Media,
            #[serde(rename = "Font")]
            Font,
            #[serde(rename = "Script")]
            Script,
            #[serde(rename = "TextTrack")]
            TextTrack,
            #[serde(rename = "XHR")]
            Xhr,
            #[serde(rename = "Fetch")]
            Fetch,
            #[serde(rename = "Prefetch")]
            Prefetch,
            #[serde(rename = "EventSource")]
            EventSource,
            #[serde(rename = "WebSocket")]
            WebSocket,
            #[serde(rename = "Manifest")]
            Manifest,
            #[serde(rename = "SignedExchange")]
            SignedExchange,
            #[serde(rename = "Ping")]
            Ping,
            #[serde(rename = "CSPViolationReport")]
            CspViolationReport,
            #[serde(rename = "Preflight")]
            Preflight,
            #[serde(rename = "FedCM")]
            FedCm,
            #[serde(rename = "Other")]
            Other,
        }
        impl AsRef<str> for ResourceType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Document => "Document",
                    Self::Stylesheet => "Stylesheet",
                    Self::Image => "Image",
                    Self::Media => "Media",
                    Self::Font => "Font",
                    Self::Script => "Script",
                    Self::TextTrack => "TextTrack",
                    Self::Xhr => "XHR",
                    Self::Fetch => "Fetch",
                    Self::Prefetch => "Prefetch",
                    Self::EventSource => "EventSource",
                    Self::WebSocket => "WebSocket",
                    Self::Manifest => "Manifest",
                    Self::SignedExchange => "SignedExchange",
                    Self::Ping => "Ping",
                    Self::CspViolationReport => "CSPViolationReport",
                    Self::Preflight => "Preflight",
                    Self::FedCm => "FedCM",
                    Self::Other => "Other",
                }
            }
        }
        impl std::str::FromStr for ResourceType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Document" => Ok(Self::Document),
                    "Stylesheet" => Ok(Self::Stylesheet),
                    "Image" => Ok(Self::Image),
                    "Media" => Ok(Self::Media),
                    "Font" => Ok(Self::Font),
                    "Script" => Ok(Self::Script),
                    "TextTrack" => Ok(Self::TextTrack),
                    "XHR" => Ok(Self::Xhr),
                    "Fetch" => Ok(Self::Fetch),
                    "Prefetch" => Ok(Self::Prefetch),
                    "EventSource" => Ok(Self::EventSource),
                    "WebSocket" => Ok(Self::WebSocket),
                    "Manifest" => Ok(Self::Manifest),
                    "SignedExchange" => Ok(Self::SignedExchange),
                    "Ping" => Ok(Self::Ping),
                    "CSPViolationReport" => Ok(Self::CspViolationReport),
                    "Preflight" => Ok(Self::Preflight),
                    "FedCM" => Ok(Self::FedCm),
                    "Other" => Ok(Self::Other),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ResourceType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Unique loader identifier.
        pub type LoaderId = String;

        /// Unique network request identifier. Note that this does not identify individual HTTP requests that are part of a network request.
        pub type RequestId = String;

        /// Unique intercepted request identifier.
        pub type InterceptionId = String;

        /// Network level fetch failure reason.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ErrorReason {
            #[serde(rename = "Failed")]
            Failed,
            #[serde(rename = "Aborted")]
            Aborted,
            #[serde(rename = "TimedOut")]
            TimedOut,
            #[serde(rename = "AccessDenied")]
            AccessDenied,
            #[serde(rename = "ConnectionClosed")]
            ConnectionClosed,
            #[serde(rename = "ConnectionReset")]
            ConnectionReset,
            #[serde(rename = "ConnectionRefused")]
            ConnectionRefused,
            #[serde(rename = "ConnectionAborted")]
            ConnectionAborted,
            #[serde(rename = "ConnectionFailed")]
            ConnectionFailed,
            #[serde(rename = "NameNotResolved")]
            NameNotResolved,
            #[serde(rename = "InternetDisconnected")]
            InternetDisconnected,
            #[serde(rename = "AddressUnreachable")]
            AddressUnreachable,
            #[serde(rename = "BlockedByClient")]
            BlockedByClient,
            #[serde(rename = "BlockedByResponse")]
            BlockedByResponse,
        }
        impl AsRef<str> for ErrorReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Failed => "Failed",
                    Self::Aborted => "Aborted",
                    Self::TimedOut => "TimedOut",
                    Self::AccessDenied => "AccessDenied",
                    Self::ConnectionClosed => "ConnectionClosed",
                    Self::ConnectionReset => "ConnectionReset",
                    Self::ConnectionRefused => "ConnectionRefused",
                    Self::ConnectionAborted => "ConnectionAborted",
                    Self::ConnectionFailed => "ConnectionFailed",
                    Self::NameNotResolved => "NameNotResolved",
                    Self::InternetDisconnected => "InternetDisconnected",
                    Self::AddressUnreachable => "AddressUnreachable",
                    Self::BlockedByClient => "BlockedByClient",
                    Self::BlockedByResponse => "BlockedByResponse",
                }
            }
        }
        impl std::str::FromStr for ErrorReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Failed" => Ok(Self::Failed),
                    "Aborted" => Ok(Self::Aborted),
                    "TimedOut" => Ok(Self::TimedOut),
                    "AccessDenied" => Ok(Self::AccessDenied),
                    "ConnectionClosed" => Ok(Self::ConnectionClosed),
                    "ConnectionReset" => Ok(Self::ConnectionReset),
                    "ConnectionRefused" => Ok(Self::ConnectionRefused),
                    "ConnectionAborted" => Ok(Self::ConnectionAborted),
                    "ConnectionFailed" => Ok(Self::ConnectionFailed),
                    "NameNotResolved" => Ok(Self::NameNotResolved),
                    "InternetDisconnected" => Ok(Self::InternetDisconnected),
                    "AddressUnreachable" => Ok(Self::AddressUnreachable),
                    "BlockedByClient" => Ok(Self::BlockedByClient),
                    "BlockedByResponse" => Ok(Self::BlockedByResponse),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ErrorReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// UTC time in seconds, counted from January 1, 1970.
        pub type TimeSinceEpoch = f64;

        /// Monotonically increasing time in seconds since an arbitrary point in the past.
        pub type MonotonicTime = f64;

        /// Request / response headers as keys / values of JSON object.
        pub type Headers = serde_json::Value;

        /// The underlying connection technology that the browser is supposedly using.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ConnectionType {
            #[serde(rename = "none")]
            None,
            #[serde(rename = "cellular2g")]
            Cellular2g,
            #[serde(rename = "cellular3g")]
            Cellular3g,
            #[serde(rename = "cellular4g")]
            Cellular4g,
            #[serde(rename = "bluetooth")]
            Bluetooth,
            #[serde(rename = "ethernet")]
            Ethernet,
            #[serde(rename = "wifi")]
            Wifi,
            #[serde(rename = "wimax")]
            Wimax,
            #[serde(rename = "other")]
            Other,
        }
        impl AsRef<str> for ConnectionType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::None => "none",
                    Self::Cellular2g => "cellular2g",
                    Self::Cellular3g => "cellular3g",
                    Self::Cellular4g => "cellular4g",
                    Self::Bluetooth => "bluetooth",
                    Self::Ethernet => "ethernet",
                    Self::Wifi => "wifi",
                    Self::Wimax => "wimax",
                    Self::Other => "other",
                }
            }
        }
        impl std::str::FromStr for ConnectionType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "none" => Ok(Self::None),
                    "cellular2g" => Ok(Self::Cellular2g),
                    "cellular3g" => Ok(Self::Cellular3g),
                    "cellular4g" => Ok(Self::Cellular4g),
                    "bluetooth" => Ok(Self::Bluetooth),
                    "ethernet" => Ok(Self::Ethernet),
                    "wifi" => Ok(Self::Wifi),
                    "wimax" => Ok(Self::Wimax),
                    "other" => Ok(Self::Other),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ConnectionType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookieSameSite {
            #[serde(rename = "Strict")]
            Strict,
            #[serde(rename = "Lax")]
            Lax,
            #[serde(rename = "None")]
            None,
        }
        impl AsRef<str> for CookieSameSite {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Strict => "Strict",
                    Self::Lax => "Lax",
                    Self::None => "None",
                }
            }
        }
        impl std::str::FromStr for CookieSameSite {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Strict" => Ok(Self::Strict),
                    "Lax" => Ok(Self::Lax),
                    "None" => Ok(Self::None),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookieSameSite {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Represents the cookie's 'Priority' status: https://tools.ietf.org/html/draft-west-cookie-priority-00
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookiePriority {
            #[serde(rename = "Low")]
            Low,
            #[serde(rename = "Medium")]
            Medium,
            #[serde(rename = "High")]
            High,
        }
        impl AsRef<str> for CookiePriority {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Low => "Low",
                    Self::Medium => "Medium",
                    Self::High => "High",
                }
            }
        }
        impl std::str::FromStr for CookiePriority {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Low" => Ok(Self::Low),
                    "Medium" => Ok(Self::Medium),
                    "High" => Ok(Self::High),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookiePriority {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Represents the source scheme of the origin that originally set the cookie. A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme. This is a temporary ability and it will be removed in the future.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookieSourceScheme {
            #[serde(rename = "Unset")]
            Unset,
            #[serde(rename = "NonSecure")]
            NonSecure,
            #[serde(rename = "Secure")]
            Secure,
        }
        impl AsRef<str> for CookieSourceScheme {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Unset => "Unset",
                    Self::NonSecure => "NonSecure",
                    Self::Secure => "Secure",
                }
            }
        }
        impl std::str::FromStr for CookieSourceScheme {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Unset" => Ok(Self::Unset),
                    "NonSecure" => Ok(Self::NonSecure),
                    "Secure" => Ok(Self::Secure),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookieSourceScheme {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Timing information for the request.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResourceTiming {
            /// Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
            pub request_time: f64,
            /// Started resolving proxy.
            pub proxy_start: f64,
            /// Finished resolving proxy.
            pub proxy_end: f64,
            /// Started DNS address resolve.
            pub dns_start: f64,
            /// Finished DNS address resolve.
            pub dns_end: f64,
            /// Started connecting to the remote host.
            pub connect_start: f64,
            /// Connected to the remote host.
            pub connect_end: f64,
            /// Started SSL handshake.
            pub ssl_start: f64,
            /// Finished SSL handshake.
            pub ssl_end: f64,
            /// Started running ServiceWorker.
            /// **EXPERIMENTAL**
            pub worker_start: f64,
            /// Finished Starting ServiceWorker.
            /// **EXPERIMENTAL**
            pub worker_ready: f64,
            /// Started fetch event.
            /// **EXPERIMENTAL**
            pub worker_fetch_start: f64,
            /// Settled fetch event respondWith promise.
            /// **EXPERIMENTAL**
            pub worker_respond_with_settled: f64,
            /// Started ServiceWorker static routing source evaluation.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub worker_router_evaluation_start: Option<f64>,
            /// Started cache lookup when the source was evaluated to `cache`.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub worker_cache_lookup_start: Option<f64>,
            /// Started sending request.
            pub send_start: f64,
            /// Finished sending request.
            pub send_end: f64,
            /// Time the server started pushing request.
            /// **EXPERIMENTAL**
            pub push_start: f64,
            /// Time the server finished pushing request.
            /// **EXPERIMENTAL**
            pub push_end: f64,
            /// Started receiving response headers.
            /// **EXPERIMENTAL**
            pub receive_headers_start: f64,
            /// Finished receiving response headers.
            pub receive_headers_end: f64,
        }

        /// Loading priority of a resource request.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ResourcePriority {
            #[serde(rename = "VeryLow")]
            VeryLow,
            #[serde(rename = "Low")]
            Low,
            #[serde(rename = "Medium")]
            Medium,
            #[serde(rename = "High")]
            High,
            #[serde(rename = "VeryHigh")]
            VeryHigh,
        }
        impl AsRef<str> for ResourcePriority {
            fn as_ref(&self) -> &str {
                match self {
                    Self::VeryLow => "VeryLow",
                    Self::Low => "Low",
                    Self::Medium => "Medium",
                    Self::High => "High",
                    Self::VeryHigh => "VeryHigh",
                }
            }
        }
        impl std::str::FromStr for ResourcePriority {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "VeryLow" => Ok(Self::VeryLow),
                    "Low" => Ok(Self::Low),
                    "Medium" => Ok(Self::Medium),
                    "High" => Ok(Self::High),
                    "VeryHigh" => Ok(Self::VeryHigh),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ResourcePriority {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The render blocking behavior of a resource request.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum RenderBlockingBehavior {
            #[serde(rename = "Blocking")]
            Blocking,
            #[serde(rename = "InBodyParserBlocking")]
            InBodyParserBlocking,
            #[serde(rename = "NonBlocking")]
            NonBlocking,
            #[serde(rename = "NonBlockingDynamic")]
            NonBlockingDynamic,
            #[serde(rename = "PotentiallyBlocking")]
            PotentiallyBlocking,
        }
        impl AsRef<str> for RenderBlockingBehavior {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Blocking => "Blocking",
                    Self::InBodyParserBlocking => "InBodyParserBlocking",
                    Self::NonBlocking => "NonBlocking",
                    Self::NonBlockingDynamic => "NonBlockingDynamic",
                    Self::PotentiallyBlocking => "PotentiallyBlocking",
                }
            }
        }
        impl std::str::FromStr for RenderBlockingBehavior {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Blocking" => Ok(Self::Blocking),
                    "InBodyParserBlocking" => Ok(Self::InBodyParserBlocking),
                    "NonBlocking" => Ok(Self::NonBlocking),
                    "NonBlockingDynamic" => Ok(Self::NonBlockingDynamic),
                    "PotentiallyBlocking" => Ok(Self::PotentiallyBlocking),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for RenderBlockingBehavior {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Post data entry for HTTP request
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PostDataEntry {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub bytes: Option<String>,
        }

        /// HTTP request data.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Request {
            /// Request URL (without fragment).
            pub url: String,
            /// Fragment of the requested URL starting with hash, if present.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url_fragment: Option<String>,
            /// HTTP request method.
            pub method: String,
            /// HTTP request headers.
            pub headers: Headers,
            /// HTTP POST request data. Use postDataEntries instead.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub post_data: Option<String>,
            /// True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub has_post_data: Option<bool>,
            /// Request body elements (post data broken into individual entries).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub post_data_entries: Option<Vec<PostDataEntry>>,
            /// The mixed content type of the request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub mixed_content_type: Option<security::types::MixedContentType>,
            /// Priority of the resource request at the time request is sent.
            pub initial_priority: ResourcePriority,
            /// The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
            pub referrer_policy: String,
            /// Whether is loaded via link preload.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_link_preload: Option<bool>,
            /// Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via "fetch") as understood by the backend.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub trust_token_params: Option<TrustTokenParams>,
            /// True if this resource request is considered to be the 'same site' as the request corresponding to the main frame.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_same_site: Option<bool>,
            /// True when the resource request is ad-related.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_ad_related: Option<bool>,
        }

        /// Details of a signed certificate timestamp (SCT).
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SignedCertificateTimestamp {
            /// Validation status.
            pub status: String,
            /// Origin.
            pub origin: String,
            /// Log name / description.
            pub log_description: String,
            /// Log ID.
            pub log_id: String,
            /// Issuance date. Unlike TimeSinceEpoch, this contains the number of milliseconds since January 1, 1970, UTC, not the number of seconds.
            pub timestamp: f64,
            /// Hash algorithm.
            pub hash_algorithm: String,
            /// Signature algorithm.
            pub signature_algorithm: String,
            /// Signature data.
            pub signature_data: String,
        }

        /// Security details about a request.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SecurityDetails {
            /// Protocol name (e.g. "TLS 1.2" or "QUIC").
            pub protocol: String,
            /// Key Exchange used by the connection, or the empty string if not applicable.
            pub key_exchange: String,
            /// (EC)DH group used by the connection, if applicable.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub key_exchange_group: Option<String>,
            /// Cipher name.
            pub cipher: String,
            /// TLS MAC. Note that AEAD ciphers do not have separate MACs.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub mac: Option<String>,
            /// Certificate ID value.
            pub certificate_id: security::types::CertificateId,
            /// Certificate subject name.
            pub subject_name: String,
            /// Subject Alternative Name (SAN) DNS names and IP addresses.
            pub san_list: Vec<String>,
            /// Name of the issuing CA.
            pub issuer: String,
            /// Certificate valid from date.
            pub valid_from: TimeSinceEpoch,
            /// Certificate valid to (expiration) date
            pub valid_to: TimeSinceEpoch,
            /// List of signed certificate timestamps (SCTs).
            pub signed_certificate_timestamp_list: Vec<SignedCertificateTimestamp>,
            /// Whether the request complied with Certificate Transparency policy
            pub certificate_transparency_compliance: CertificateTransparencyCompliance,
            /// The signature algorithm used by the server in the TLS server signature, represented as a TLS SignatureScheme code point. Omitted if not applicable or not known.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub server_signature_algorithm: Option<i64>,
            /// Whether the connection used Encrypted ClientHello
            pub encrypted_client_hello: bool,
        }

        /// Whether the request complied with Certificate Transparency policy.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CertificateTransparencyCompliance {
            #[serde(rename = "unknown")]
            Unknown,
            #[serde(rename = "not-compliant")]
            NotCompliant,
            #[serde(rename = "compliant")]
            Compliant,
        }
        impl AsRef<str> for CertificateTransparencyCompliance {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Unknown => "unknown",
                    Self::NotCompliant => "not-compliant",
                    Self::Compliant => "compliant",
                }
            }
        }
        impl std::str::FromStr for CertificateTransparencyCompliance {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "unknown" => Ok(Self::Unknown),
                    "not-compliant" => Ok(Self::NotCompliant),
                    "compliant" => Ok(Self::Compliant),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CertificateTransparencyCompliance {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The reason why request was blocked.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum BlockedReason {
            #[serde(rename = "other")]
            Other,
            #[serde(rename = "csp")]
            Csp,
            #[serde(rename = "mixed-content")]
            MixedContent,
            #[serde(rename = "origin")]
            Origin,
            #[serde(rename = "inspector")]
            Inspector,
            #[serde(rename = "integrity")]
            Integrity,
            #[serde(rename = "subresource-filter")]
            SubresourceFilter,
            #[serde(rename = "content-type")]
            ContentType,
            #[serde(rename = "coep-frame-resource-needs-coep-header")]
            CoepFrameResourceNeedsCoepHeader,
            #[serde(rename = "coop-sandboxed-iframe-cannot-navigate-to-coop-page")]
            CoopSandboxedIframeCannotNavigateToCoopPage,
            #[serde(rename = "corp-not-same-origin")]
            CorpNotSameOrigin,
            #[serde(rename = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep")]
            CorpNotSameOriginAfterDefaultedToSameOriginByCoep,
            #[serde(rename = "corp-not-same-origin-after-defaulted-to-same-origin-by-dip")]
            CorpNotSameOriginAfterDefaultedToSameOriginByDip,
            #[serde(
                rename = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"
            )]
            CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip,
            #[serde(rename = "corp-not-same-site")]
            CorpNotSameSite,
            #[serde(rename = "sri-message-signature-mismatch")]
            SriMessageSignatureMismatch,
        }
        impl AsRef<str> for BlockedReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Other => "other",
                    Self::Csp => "csp",
                    Self::MixedContent => "mixed-content",
                    Self::Origin => "origin",
                    Self::Inspector => "inspector",
                    Self::Integrity => "integrity",
                    Self::SubresourceFilter => "subresource-filter",
                    Self::ContentType => "content-type",
                    Self::CoepFrameResourceNeedsCoepHeader => {
                        "coep-frame-resource-needs-coep-header"
                    }
                    Self::CoopSandboxedIframeCannotNavigateToCoopPage => {
                        "coop-sandboxed-iframe-cannot-navigate-to-coop-page"
                    }
                    Self::CorpNotSameOrigin => "corp-not-same-origin",
                    Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoep => {
                        "corp-not-same-origin-after-defaulted-to-same-origin-by-coep"
                    }
                    Self::CorpNotSameOriginAfterDefaultedToSameOriginByDip => {
                        "corp-not-same-origin-after-defaulted-to-same-origin-by-dip"
                    }
                    Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip => {
                        "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"
                    }
                    Self::CorpNotSameSite => "corp-not-same-site",
                    Self::SriMessageSignatureMismatch => "sri-message-signature-mismatch",
                }
            }
        }
        impl std::str::FromStr for BlockedReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "other" => Ok(Self::Other),
                    "csp" => Ok(Self::Csp),
                    "mixed-content" => Ok(Self::MixedContent),
                    "origin" => Ok(Self::Origin),
                    "inspector" => Ok(Self::Inspector),
                    "integrity" => Ok(Self::Integrity),
                    "subresource-filter" => Ok(Self::SubresourceFilter),
                    "content-type" => Ok(Self::ContentType),
                    "coep-frame-resource-needs-coep-header" => {
                        Ok(Self::CoepFrameResourceNeedsCoepHeader)
                    }
                    "coop-sandboxed-iframe-cannot-navigate-to-coop-page" => {
                        Ok(Self::CoopSandboxedIframeCannotNavigateToCoopPage)
                    }
                    "corp-not-same-origin" => Ok(Self::CorpNotSameOrigin),
                    "corp-not-same-origin-after-defaulted-to-same-origin-by-coep" => {
                        Ok(Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoep)
                    }
                    "corp-not-same-origin-after-defaulted-to-same-origin-by-dip" => {
                        Ok(Self::CorpNotSameOriginAfterDefaultedToSameOriginByDip)
                    }
                    "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip" => {
                        Ok(Self::CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip)
                    }
                    "corp-not-same-site" => Ok(Self::CorpNotSameSite),
                    "sri-message-signature-mismatch" => Ok(Self::SriMessageSignatureMismatch),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for BlockedReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The reason why request was blocked.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CorsError {
            #[serde(rename = "DisallowedByMode")]
            DisallowedByMode,
            #[serde(rename = "InvalidResponse")]
            InvalidResponse,
            #[serde(rename = "WildcardOriginNotAllowed")]
            WildcardOriginNotAllowed,
            #[serde(rename = "MissingAllowOriginHeader")]
            MissingAllowOriginHeader,
            #[serde(rename = "MultipleAllowOriginValues")]
            MultipleAllowOriginValues,
            #[serde(rename = "InvalidAllowOriginValue")]
            InvalidAllowOriginValue,
            #[serde(rename = "AllowOriginMismatch")]
            AllowOriginMismatch,
            #[serde(rename = "InvalidAllowCredentials")]
            InvalidAllowCredentials,
            #[serde(rename = "CorsDisabledScheme")]
            CorsDisabledScheme,
            #[serde(rename = "PreflightInvalidStatus")]
            PreflightInvalidStatus,
            #[serde(rename = "PreflightDisallowedRedirect")]
            PreflightDisallowedRedirect,
            #[serde(rename = "PreflightWildcardOriginNotAllowed")]
            PreflightWildcardOriginNotAllowed,
            #[serde(rename = "PreflightMissingAllowOriginHeader")]
            PreflightMissingAllowOriginHeader,
            #[serde(rename = "PreflightMultipleAllowOriginValues")]
            PreflightMultipleAllowOriginValues,
            #[serde(rename = "PreflightInvalidAllowOriginValue")]
            PreflightInvalidAllowOriginValue,
            #[serde(rename = "PreflightAllowOriginMismatch")]
            PreflightAllowOriginMismatch,
            #[serde(rename = "PreflightInvalidAllowCredentials")]
            PreflightInvalidAllowCredentials,
            #[serde(rename = "PreflightMissingAllowExternal")]
            PreflightMissingAllowExternal,
            #[serde(rename = "PreflightInvalidAllowExternal")]
            PreflightInvalidAllowExternal,
            #[serde(rename = "InvalidAllowMethodsPreflightResponse")]
            InvalidAllowMethodsPreflightResponse,
            #[serde(rename = "InvalidAllowHeadersPreflightResponse")]
            InvalidAllowHeadersPreflightResponse,
            #[serde(rename = "MethodDisallowedByPreflightResponse")]
            MethodDisallowedByPreflightResponse,
            #[serde(rename = "HeaderDisallowedByPreflightResponse")]
            HeaderDisallowedByPreflightResponse,
            #[serde(rename = "RedirectContainsCredentials")]
            RedirectContainsCredentials,
            #[serde(rename = "InsecurePrivateNetwork")]
            InsecurePrivateNetwork,
            #[serde(rename = "InvalidPrivateNetworkAccess")]
            InvalidPrivateNetworkAccess,
            #[serde(rename = "NoCorsRedirectModeNotFollow")]
            NoCorsRedirectModeNotFollow,
            #[serde(rename = "LocalNetworkAccessPermissionDenied")]
            LocalNetworkAccessPermissionDenied,
        }
        impl AsRef<str> for CorsError {
            fn as_ref(&self) -> &str {
                match self {
                    Self::DisallowedByMode => "DisallowedByMode",
                    Self::InvalidResponse => "InvalidResponse",
                    Self::WildcardOriginNotAllowed => "WildcardOriginNotAllowed",
                    Self::MissingAllowOriginHeader => "MissingAllowOriginHeader",
                    Self::MultipleAllowOriginValues => "MultipleAllowOriginValues",
                    Self::InvalidAllowOriginValue => "InvalidAllowOriginValue",
                    Self::AllowOriginMismatch => "AllowOriginMismatch",
                    Self::InvalidAllowCredentials => "InvalidAllowCredentials",
                    Self::CorsDisabledScheme => "CorsDisabledScheme",
                    Self::PreflightInvalidStatus => "PreflightInvalidStatus",
                    Self::PreflightDisallowedRedirect => "PreflightDisallowedRedirect",
                    Self::PreflightWildcardOriginNotAllowed => "PreflightWildcardOriginNotAllowed",
                    Self::PreflightMissingAllowOriginHeader => "PreflightMissingAllowOriginHeader",
                    Self::PreflightMultipleAllowOriginValues => {
                        "PreflightMultipleAllowOriginValues"
                    }
                    Self::PreflightInvalidAllowOriginValue => "PreflightInvalidAllowOriginValue",
                    Self::PreflightAllowOriginMismatch => "PreflightAllowOriginMismatch",
                    Self::PreflightInvalidAllowCredentials => "PreflightInvalidAllowCredentials",
                    Self::PreflightMissingAllowExternal => "PreflightMissingAllowExternal",
                    Self::PreflightInvalidAllowExternal => "PreflightInvalidAllowExternal",
                    Self::InvalidAllowMethodsPreflightResponse => {
                        "InvalidAllowMethodsPreflightResponse"
                    }
                    Self::InvalidAllowHeadersPreflightResponse => {
                        "InvalidAllowHeadersPreflightResponse"
                    }
                    Self::MethodDisallowedByPreflightResponse => {
                        "MethodDisallowedByPreflightResponse"
                    }
                    Self::HeaderDisallowedByPreflightResponse => {
                        "HeaderDisallowedByPreflightResponse"
                    }
                    Self::RedirectContainsCredentials => "RedirectContainsCredentials",
                    Self::InsecurePrivateNetwork => "InsecurePrivateNetwork",
                    Self::InvalidPrivateNetworkAccess => "InvalidPrivateNetworkAccess",
                    Self::NoCorsRedirectModeNotFollow => "NoCorsRedirectModeNotFollow",
                    Self::LocalNetworkAccessPermissionDenied => {
                        "LocalNetworkAccessPermissionDenied"
                    }
                }
            }
        }
        impl std::str::FromStr for CorsError {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "DisallowedByMode" => Ok(Self::DisallowedByMode),
                    "InvalidResponse" => Ok(Self::InvalidResponse),
                    "WildcardOriginNotAllowed" => Ok(Self::WildcardOriginNotAllowed),
                    "MissingAllowOriginHeader" => Ok(Self::MissingAllowOriginHeader),
                    "MultipleAllowOriginValues" => Ok(Self::MultipleAllowOriginValues),
                    "InvalidAllowOriginValue" => Ok(Self::InvalidAllowOriginValue),
                    "AllowOriginMismatch" => Ok(Self::AllowOriginMismatch),
                    "InvalidAllowCredentials" => Ok(Self::InvalidAllowCredentials),
                    "CorsDisabledScheme" => Ok(Self::CorsDisabledScheme),
                    "PreflightInvalidStatus" => Ok(Self::PreflightInvalidStatus),
                    "PreflightDisallowedRedirect" => Ok(Self::PreflightDisallowedRedirect),
                    "PreflightWildcardOriginNotAllowed" => {
                        Ok(Self::PreflightWildcardOriginNotAllowed)
                    }
                    "PreflightMissingAllowOriginHeader" => {
                        Ok(Self::PreflightMissingAllowOriginHeader)
                    }
                    "PreflightMultipleAllowOriginValues" => {
                        Ok(Self::PreflightMultipleAllowOriginValues)
                    }
                    "PreflightInvalidAllowOriginValue" => {
                        Ok(Self::PreflightInvalidAllowOriginValue)
                    }
                    "PreflightAllowOriginMismatch" => Ok(Self::PreflightAllowOriginMismatch),
                    "PreflightInvalidAllowCredentials" => {
                        Ok(Self::PreflightInvalidAllowCredentials)
                    }
                    "PreflightMissingAllowExternal" => Ok(Self::PreflightMissingAllowExternal),
                    "PreflightInvalidAllowExternal" => Ok(Self::PreflightInvalidAllowExternal),
                    "InvalidAllowMethodsPreflightResponse" => {
                        Ok(Self::InvalidAllowMethodsPreflightResponse)
                    }
                    "InvalidAllowHeadersPreflightResponse" => {
                        Ok(Self::InvalidAllowHeadersPreflightResponse)
                    }
                    "MethodDisallowedByPreflightResponse" => {
                        Ok(Self::MethodDisallowedByPreflightResponse)
                    }
                    "HeaderDisallowedByPreflightResponse" => {
                        Ok(Self::HeaderDisallowedByPreflightResponse)
                    }
                    "RedirectContainsCredentials" => Ok(Self::RedirectContainsCredentials),
                    "InsecurePrivateNetwork" => Ok(Self::InsecurePrivateNetwork),
                    "InvalidPrivateNetworkAccess" => Ok(Self::InvalidPrivateNetworkAccess),
                    "NoCorsRedirectModeNotFollow" => Ok(Self::NoCorsRedirectModeNotFollow),
                    "LocalNetworkAccessPermissionDenied" => {
                        Ok(Self::LocalNetworkAccessPermissionDenied)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CorsError {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CorsErrorStatus {
            pub cors_error: CorsError,
            pub failed_parameter: String,
        }

        /// Source of serviceworker response.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ServiceWorkerResponseSource {
            #[serde(rename = "cache-storage")]
            CacheStorage,
            #[serde(rename = "http-cache")]
            HttpCache,
            #[serde(rename = "fallback-code")]
            FallbackCode,
            #[serde(rename = "network")]
            Network,
        }
        impl AsRef<str> for ServiceWorkerResponseSource {
            fn as_ref(&self) -> &str {
                match self {
                    Self::CacheStorage => "cache-storage",
                    Self::HttpCache => "http-cache",
                    Self::FallbackCode => "fallback-code",
                    Self::Network => "network",
                }
            }
        }
        impl std::str::FromStr for ServiceWorkerResponseSource {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "cache-storage" => Ok(Self::CacheStorage),
                    "http-cache" => Ok(Self::HttpCache),
                    "fallback-code" => Ok(Self::FallbackCode),
                    "network" => Ok(Self::Network),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ServiceWorkerResponseSource {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Determines what type of Trust Token operation is executed and depending on the type, some additional parameters. The values are specified in third_party/blink/renderer/core/fetch/trust_token.idl.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrustTokenParams {
            pub operation: TrustTokenOperationType,
            /// Only set for "token-redemption" operation and determine whether to request a fresh SRR or use a still valid cached SRR.
            pub refresh_policy: String,
            /// Origins of issuers from whom to request tokens or redemption records.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub issuers: Option<Vec<String>>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum TrustTokenOperationType {
            #[serde(rename = "Issuance")]
            Issuance,
            #[serde(rename = "Redemption")]
            Redemption,
            #[serde(rename = "Signing")]
            Signing,
        }
        impl AsRef<str> for TrustTokenOperationType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Issuance => "Issuance",
                    Self::Redemption => "Redemption",
                    Self::Signing => "Signing",
                }
            }
        }
        impl std::str::FromStr for TrustTokenOperationType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Issuance" => Ok(Self::Issuance),
                    "Redemption" => Ok(Self::Redemption),
                    "Signing" => Ok(Self::Signing),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for TrustTokenOperationType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The reason why Chrome uses a specific transport protocol for HTTP semantics.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AlternateProtocolUsage {
            #[serde(rename = "alternativeJobWonWithoutRace")]
            AlternativeJobWonWithoutRace,
            #[serde(rename = "alternativeJobWonRace")]
            AlternativeJobWonRace,
            #[serde(rename = "mainJobWonRace")]
            MainJobWonRace,
            #[serde(rename = "mappingMissing")]
            MappingMissing,
            #[serde(rename = "broken")]
            Broken,
            #[serde(rename = "dnsAlpnH3JobWonWithoutRace")]
            DnsAlpnH3JobWonWithoutRace,
            #[serde(rename = "dnsAlpnH3JobWonRace")]
            DnsAlpnH3JobWonRace,
            #[serde(rename = "unspecifiedReason")]
            UnspecifiedReason,
        }
        impl AsRef<str> for AlternateProtocolUsage {
            fn as_ref(&self) -> &str {
                match self {
                    Self::AlternativeJobWonWithoutRace => "alternativeJobWonWithoutRace",
                    Self::AlternativeJobWonRace => "alternativeJobWonRace",
                    Self::MainJobWonRace => "mainJobWonRace",
                    Self::MappingMissing => "mappingMissing",
                    Self::Broken => "broken",
                    Self::DnsAlpnH3JobWonWithoutRace => "dnsAlpnH3JobWonWithoutRace",
                    Self::DnsAlpnH3JobWonRace => "dnsAlpnH3JobWonRace",
                    Self::UnspecifiedReason => "unspecifiedReason",
                }
            }
        }
        impl std::str::FromStr for AlternateProtocolUsage {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "alternativeJobWonWithoutRace" => Ok(Self::AlternativeJobWonWithoutRace),
                    "alternativeJobWonRace" => Ok(Self::AlternativeJobWonRace),
                    "mainJobWonRace" => Ok(Self::MainJobWonRace),
                    "mappingMissing" => Ok(Self::MappingMissing),
                    "broken" => Ok(Self::Broken),
                    "dnsAlpnH3JobWonWithoutRace" => Ok(Self::DnsAlpnH3JobWonWithoutRace),
                    "dnsAlpnH3JobWonRace" => Ok(Self::DnsAlpnH3JobWonRace),
                    "unspecifiedReason" => Ok(Self::UnspecifiedReason),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AlternateProtocolUsage {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Source of service worker router.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ServiceWorkerRouterSource {
            #[serde(rename = "network")]
            Network,
            #[serde(rename = "cache")]
            Cache,
            #[serde(rename = "fetch-event")]
            FetchEvent,
            #[serde(rename = "race-network-and-fetch-handler")]
            RaceNetworkAndFetchHandler,
            #[serde(rename = "race-network-and-cache")]
            RaceNetworkAndCache,
        }
        impl AsRef<str> for ServiceWorkerRouterSource {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Network => "network",
                    Self::Cache => "cache",
                    Self::FetchEvent => "fetch-event",
                    Self::RaceNetworkAndFetchHandler => "race-network-and-fetch-handler",
                    Self::RaceNetworkAndCache => "race-network-and-cache",
                }
            }
        }
        impl std::str::FromStr for ServiceWorkerRouterSource {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "network" => Ok(Self::Network),
                    "cache" => Ok(Self::Cache),
                    "fetch-event" => Ok(Self::FetchEvent),
                    "race-network-and-fetch-handler" => Ok(Self::RaceNetworkAndFetchHandler),
                    "race-network-and-cache" => Ok(Self::RaceNetworkAndCache),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ServiceWorkerRouterSource {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ServiceWorkerRouterInfo {
            /// ID of the rule matched. If there is a matched rule, this field will be set, otherwiser no value will be set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub rule_id_matched: Option<i64>,
            /// The router source of the matched rule. If there is a matched rule, this field will be set, otherwise no value will be set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub matched_source_type: Option<ServiceWorkerRouterSource>,
            /// The actual router source used.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub actual_source_type: Option<ServiceWorkerRouterSource>,
        }

        /// HTTP response data.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Response {
            /// Response URL. This URL can be different from CachedResource.url in case of redirect.
            pub url: String,
            /// HTTP response status code.
            pub status: i64,
            /// HTTP response status text.
            pub status_text: String,
            /// HTTP response headers.
            pub headers: Headers,
            /// HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub headers_text: Option<String>,
            /// Resource mimeType as determined by the browser.
            pub mime_type: String,
            /// Resource charset as determined by the browser (if applicable).
            pub charset: String,
            /// Refined HTTP request headers that were actually transmitted over the network.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_headers: Option<Headers>,
            /// HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_headers_text: Option<String>,
            /// Specifies whether physical connection was actually reused for this request.
            pub connection_reused: bool,
            /// Physical connection id that was actually used for this request.
            pub connection_id: f64,
            /// Remote IP address.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "remoteIPAddress")]
            pub remote_ip_address: Option<String>,
            /// Remote port.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub remote_port: Option<i64>,
            /// Specifies that the request was served from the disk cache.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub from_disk_cache: Option<bool>,
            /// Specifies that the request was served from the ServiceWorker.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub from_service_worker: Option<bool>,
            /// Specifies that the request was served from the prefetch cache.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub from_prefetch_cache: Option<bool>,
            /// Specifies that the request was served from the prefetch cache.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub from_early_hints: Option<bool>,
            /// Information about how ServiceWorker Static Router API was used. If this field is set with `matchedSourceType` field, a matching rule is found. If this field is set without `matchedSource`, no matching rule is found. Otherwise, the API is not used.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub service_worker_router_info: Option<ServiceWorkerRouterInfo>,
            /// Total number of bytes received for this request so far.
            pub encoded_data_length: f64,
            /// Timing information for the given request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timing: Option<ResourceTiming>,
            /// Response source of response from ServiceWorker.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub service_worker_response_source: Option<ServiceWorkerResponseSource>,
            /// The time at which the returned response was generated.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub response_time: Option<TimeSinceEpoch>,
            /// Cache Storage Cache Name.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cache_storage_cache_name: Option<String>,
            /// Protocol used to fetch this request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub protocol: Option<String>,
            /// The reason why Chrome uses a specific transport protocol for HTTP semantics.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub alternate_protocol_usage: Option<AlternateProtocolUsage>,
            /// Security state of the request resource.
            pub security_state: security::types::SecurityState,
            /// Security details for the request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_details: Option<SecurityDetails>,
        }

        /// WebSocket request data.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketRequest {
            /// HTTP request headers.
            pub headers: Headers,
        }

        /// WebSocket response data.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketResponse {
            /// HTTP response status code.
            pub status: i64,
            /// HTTP response status text.
            pub status_text: String,
            /// HTTP response headers.
            pub headers: Headers,
            /// HTTP response headers text.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub headers_text: Option<String>,
            /// HTTP request headers.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_headers: Option<Headers>,
            /// HTTP request headers text.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_headers_text: Option<String>,
        }

        /// WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketFrame {
            /// WebSocket message opcode.
            pub opcode: f64,
            /// WebSocket message mask.
            pub mask: bool,
            /// WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
            pub payload_data: String,
        }

        /// Information about the cached resource.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CachedResource {
            /// Resource URL. This is the url of the original network request.
            pub url: String,
            /// Type of this resource.
            pub type_: ResourceType,
            /// Cached response data.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub response: Option<Response>,
            /// Cached response body size.
            pub body_size: f64,
        }

        /// Information about the request initiator.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Initiator {
            /// Type of this initiator.
            pub type_: String,
            /// Initiator JavaScript stack trace, set for Script only. Requires the Debugger domain to be enabled.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stack: Option<runtime::types::StackTrace>,
            /// Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub line_number: Option<f64>,
            /// Initiator column number, set for Parser type or for Script type (when script is importing module) (0-based).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_number: Option<f64>,
            /// Set if another request triggered this request (e.g. preflight).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_id: Option<RequestId>,
        }

        /// cookiePartitionKey object The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CookiePartitionKey {
            /// The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie.
            pub top_level_site: String,
            /// Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
            pub has_cross_site_ancestor: bool,
        }

        /// Cookie object
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Cookie {
            /// Cookie name.
            pub name: String,
            /// Cookie value.
            pub value: String,
            /// Cookie domain.
            pub domain: String,
            /// Cookie path.
            pub path: String,
            /// Cookie expiration date as the number of seconds since the UNIX epoch. The value is set to -1 if the expiry date is not set. The value can be null for values that cannot be represented in JSON (±Inf).
            pub expires: f64,
            /// Cookie size.
            pub size: i64,
            /// True if cookie is http-only.
            pub http_only: bool,
            /// True if cookie is secure.
            pub secure: bool,
            /// True in case of session cookie.
            pub session: bool,
            /// Cookie SameSite type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub same_site: Option<CookieSameSite>,
            /// Cookie Priority
            /// **EXPERIMENTAL**
            pub priority: CookiePriority,
            /// Cookie source scheme type.
            /// **EXPERIMENTAL**
            pub source_scheme: CookieSourceScheme,
            /// Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
            /// **EXPERIMENTAL**
            pub source_port: i64,
            /// Cookie partition key.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub partition_key: Option<CookiePartitionKey>,
            /// True if cookie partition key is opaque.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub partition_key_opaque: Option<bool>,
        }

        /// Types of reasons why a cookie may not be stored from a response.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SetCookieBlockedReason {
            #[serde(rename = "SecureOnly")]
            SecureOnly,
            #[serde(rename = "SameSiteStrict")]
            SameSiteStrict,
            #[serde(rename = "SameSiteLax")]
            SameSiteLax,
            #[serde(rename = "SameSiteUnspecifiedTreatedAsLax")]
            SameSiteUnspecifiedTreatedAsLax,
            #[serde(rename = "SameSiteNoneInsecure")]
            SameSiteNoneInsecure,
            #[serde(rename = "UserPreferences")]
            UserPreferences,
            #[serde(rename = "ThirdPartyPhaseout")]
            ThirdPartyPhaseout,
            #[serde(rename = "ThirdPartyBlockedInFirstPartySet")]
            ThirdPartyBlockedInFirstPartySet,
            #[serde(rename = "SyntaxError")]
            SyntaxError,
            #[serde(rename = "SchemeNotSupported")]
            SchemeNotSupported,
            #[serde(rename = "OverwriteSecure")]
            OverwriteSecure,
            #[serde(rename = "InvalidDomain")]
            InvalidDomain,
            #[serde(rename = "InvalidPrefix")]
            InvalidPrefix,
            #[serde(rename = "UnknownError")]
            UnknownError,
            #[serde(rename = "SchemefulSameSiteStrict")]
            SchemefulSameSiteStrict,
            #[serde(rename = "SchemefulSameSiteLax")]
            SchemefulSameSiteLax,
            #[serde(rename = "SchemefulSameSiteUnspecifiedTreatedAsLax")]
            SchemefulSameSiteUnspecifiedTreatedAsLax,
            #[serde(rename = "NameValuePairExceedsMaxSize")]
            NameValuePairExceedsMaxSize,
            #[serde(rename = "DisallowedCharacter")]
            DisallowedCharacter,
            #[serde(rename = "NoCookieContent")]
            NoCookieContent,
        }
        impl AsRef<str> for SetCookieBlockedReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SecureOnly => "SecureOnly",
                    Self::SameSiteStrict => "SameSiteStrict",
                    Self::SameSiteLax => "SameSiteLax",
                    Self::SameSiteUnspecifiedTreatedAsLax => "SameSiteUnspecifiedTreatedAsLax",
                    Self::SameSiteNoneInsecure => "SameSiteNoneInsecure",
                    Self::UserPreferences => "UserPreferences",
                    Self::ThirdPartyPhaseout => "ThirdPartyPhaseout",
                    Self::ThirdPartyBlockedInFirstPartySet => "ThirdPartyBlockedInFirstPartySet",
                    Self::SyntaxError => "SyntaxError",
                    Self::SchemeNotSupported => "SchemeNotSupported",
                    Self::OverwriteSecure => "OverwriteSecure",
                    Self::InvalidDomain => "InvalidDomain",
                    Self::InvalidPrefix => "InvalidPrefix",
                    Self::UnknownError => "UnknownError",
                    Self::SchemefulSameSiteStrict => "SchemefulSameSiteStrict",
                    Self::SchemefulSameSiteLax => "SchemefulSameSiteLax",
                    Self::SchemefulSameSiteUnspecifiedTreatedAsLax => {
                        "SchemefulSameSiteUnspecifiedTreatedAsLax"
                    }
                    Self::NameValuePairExceedsMaxSize => "NameValuePairExceedsMaxSize",
                    Self::DisallowedCharacter => "DisallowedCharacter",
                    Self::NoCookieContent => "NoCookieContent",
                }
            }
        }
        impl std::str::FromStr for SetCookieBlockedReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SecureOnly" => Ok(Self::SecureOnly),
                    "SameSiteStrict" => Ok(Self::SameSiteStrict),
                    "SameSiteLax" => Ok(Self::SameSiteLax),
                    "SameSiteUnspecifiedTreatedAsLax" => Ok(Self::SameSiteUnspecifiedTreatedAsLax),
                    "SameSiteNoneInsecure" => Ok(Self::SameSiteNoneInsecure),
                    "UserPreferences" => Ok(Self::UserPreferences),
                    "ThirdPartyPhaseout" => Ok(Self::ThirdPartyPhaseout),
                    "ThirdPartyBlockedInFirstPartySet" => {
                        Ok(Self::ThirdPartyBlockedInFirstPartySet)
                    }
                    "SyntaxError" => Ok(Self::SyntaxError),
                    "SchemeNotSupported" => Ok(Self::SchemeNotSupported),
                    "OverwriteSecure" => Ok(Self::OverwriteSecure),
                    "InvalidDomain" => Ok(Self::InvalidDomain),
                    "InvalidPrefix" => Ok(Self::InvalidPrefix),
                    "UnknownError" => Ok(Self::UnknownError),
                    "SchemefulSameSiteStrict" => Ok(Self::SchemefulSameSiteStrict),
                    "SchemefulSameSiteLax" => Ok(Self::SchemefulSameSiteLax),
                    "SchemefulSameSiteUnspecifiedTreatedAsLax" => {
                        Ok(Self::SchemefulSameSiteUnspecifiedTreatedAsLax)
                    }
                    "NameValuePairExceedsMaxSize" => Ok(Self::NameValuePairExceedsMaxSize),
                    "DisallowedCharacter" => Ok(Self::DisallowedCharacter),
                    "NoCookieContent" => Ok(Self::NoCookieContent),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SetCookieBlockedReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Types of reasons why a cookie may not be sent with a request.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookieBlockedReason {
            #[serde(rename = "SecureOnly")]
            SecureOnly,
            #[serde(rename = "NotOnPath")]
            NotOnPath,
            #[serde(rename = "DomainMismatch")]
            DomainMismatch,
            #[serde(rename = "SameSiteStrict")]
            SameSiteStrict,
            #[serde(rename = "SameSiteLax")]
            SameSiteLax,
            #[serde(rename = "SameSiteUnspecifiedTreatedAsLax")]
            SameSiteUnspecifiedTreatedAsLax,
            #[serde(rename = "SameSiteNoneInsecure")]
            SameSiteNoneInsecure,
            #[serde(rename = "UserPreferences")]
            UserPreferences,
            #[serde(rename = "ThirdPartyPhaseout")]
            ThirdPartyPhaseout,
            #[serde(rename = "ThirdPartyBlockedInFirstPartySet")]
            ThirdPartyBlockedInFirstPartySet,
            #[serde(rename = "UnknownError")]
            UnknownError,
            #[serde(rename = "SchemefulSameSiteStrict")]
            SchemefulSameSiteStrict,
            #[serde(rename = "SchemefulSameSiteLax")]
            SchemefulSameSiteLax,
            #[serde(rename = "SchemefulSameSiteUnspecifiedTreatedAsLax")]
            SchemefulSameSiteUnspecifiedTreatedAsLax,
            #[serde(rename = "NameValuePairExceedsMaxSize")]
            NameValuePairExceedsMaxSize,
            #[serde(rename = "PortMismatch")]
            PortMismatch,
            #[serde(rename = "SchemeMismatch")]
            SchemeMismatch,
            #[serde(rename = "AnonymousContext")]
            AnonymousContext,
        }
        impl AsRef<str> for CookieBlockedReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SecureOnly => "SecureOnly",
                    Self::NotOnPath => "NotOnPath",
                    Self::DomainMismatch => "DomainMismatch",
                    Self::SameSiteStrict => "SameSiteStrict",
                    Self::SameSiteLax => "SameSiteLax",
                    Self::SameSiteUnspecifiedTreatedAsLax => "SameSiteUnspecifiedTreatedAsLax",
                    Self::SameSiteNoneInsecure => "SameSiteNoneInsecure",
                    Self::UserPreferences => "UserPreferences",
                    Self::ThirdPartyPhaseout => "ThirdPartyPhaseout",
                    Self::ThirdPartyBlockedInFirstPartySet => "ThirdPartyBlockedInFirstPartySet",
                    Self::UnknownError => "UnknownError",
                    Self::SchemefulSameSiteStrict => "SchemefulSameSiteStrict",
                    Self::SchemefulSameSiteLax => "SchemefulSameSiteLax",
                    Self::SchemefulSameSiteUnspecifiedTreatedAsLax => {
                        "SchemefulSameSiteUnspecifiedTreatedAsLax"
                    }
                    Self::NameValuePairExceedsMaxSize => "NameValuePairExceedsMaxSize",
                    Self::PortMismatch => "PortMismatch",
                    Self::SchemeMismatch => "SchemeMismatch",
                    Self::AnonymousContext => "AnonymousContext",
                }
            }
        }
        impl std::str::FromStr for CookieBlockedReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SecureOnly" => Ok(Self::SecureOnly),
                    "NotOnPath" => Ok(Self::NotOnPath),
                    "DomainMismatch" => Ok(Self::DomainMismatch),
                    "SameSiteStrict" => Ok(Self::SameSiteStrict),
                    "SameSiteLax" => Ok(Self::SameSiteLax),
                    "SameSiteUnspecifiedTreatedAsLax" => Ok(Self::SameSiteUnspecifiedTreatedAsLax),
                    "SameSiteNoneInsecure" => Ok(Self::SameSiteNoneInsecure),
                    "UserPreferences" => Ok(Self::UserPreferences),
                    "ThirdPartyPhaseout" => Ok(Self::ThirdPartyPhaseout),
                    "ThirdPartyBlockedInFirstPartySet" => {
                        Ok(Self::ThirdPartyBlockedInFirstPartySet)
                    }
                    "UnknownError" => Ok(Self::UnknownError),
                    "SchemefulSameSiteStrict" => Ok(Self::SchemefulSameSiteStrict),
                    "SchemefulSameSiteLax" => Ok(Self::SchemefulSameSiteLax),
                    "SchemefulSameSiteUnspecifiedTreatedAsLax" => {
                        Ok(Self::SchemefulSameSiteUnspecifiedTreatedAsLax)
                    }
                    "NameValuePairExceedsMaxSize" => Ok(Self::NameValuePairExceedsMaxSize),
                    "PortMismatch" => Ok(Self::PortMismatch),
                    "SchemeMismatch" => Ok(Self::SchemeMismatch),
                    "AnonymousContext" => Ok(Self::AnonymousContext),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookieBlockedReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CookieExemptionReason {
            #[serde(rename = "None")]
            None,
            #[serde(rename = "UserSetting")]
            UserSetting,
            #[serde(rename = "TPCDMetadata")]
            TpcdMetadata,
            #[serde(rename = "TPCDDeprecationTrial")]
            TpcdDeprecationTrial,
            #[serde(rename = "TopLevelTPCDDeprecationTrial")]
            TopLevelTpcdDeprecationTrial,
            #[serde(rename = "TPCDHeuristics")]
            TpcdHeuristics,
            #[serde(rename = "EnterprisePolicy")]
            EnterprisePolicy,
            #[serde(rename = "StorageAccess")]
            StorageAccess,
            #[serde(rename = "TopLevelStorageAccess")]
            TopLevelStorageAccess,
            #[serde(rename = "Scheme")]
            Scheme,
            #[serde(rename = "SameSiteNoneCookiesInSandbox")]
            SameSiteNoneCookiesInSandbox,
        }
        impl AsRef<str> for CookieExemptionReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::None => "None",
                    Self::UserSetting => "UserSetting",
                    Self::TpcdMetadata => "TPCDMetadata",
                    Self::TpcdDeprecationTrial => "TPCDDeprecationTrial",
                    Self::TopLevelTpcdDeprecationTrial => "TopLevelTPCDDeprecationTrial",
                    Self::TpcdHeuristics => "TPCDHeuristics",
                    Self::EnterprisePolicy => "EnterprisePolicy",
                    Self::StorageAccess => "StorageAccess",
                    Self::TopLevelStorageAccess => "TopLevelStorageAccess",
                    Self::Scheme => "Scheme",
                    Self::SameSiteNoneCookiesInSandbox => "SameSiteNoneCookiesInSandbox",
                }
            }
        }
        impl std::str::FromStr for CookieExemptionReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "None" => Ok(Self::None),
                    "UserSetting" => Ok(Self::UserSetting),
                    "TPCDMetadata" => Ok(Self::TpcdMetadata),
                    "TPCDDeprecationTrial" => Ok(Self::TpcdDeprecationTrial),
                    "TopLevelTPCDDeprecationTrial" => Ok(Self::TopLevelTpcdDeprecationTrial),
                    "TPCDHeuristics" => Ok(Self::TpcdHeuristics),
                    "EnterprisePolicy" => Ok(Self::EnterprisePolicy),
                    "StorageAccess" => Ok(Self::StorageAccess),
                    "TopLevelStorageAccess" => Ok(Self::TopLevelStorageAccess),
                    "Scheme" => Ok(Self::Scheme),
                    "SameSiteNoneCookiesInSandbox" => Ok(Self::SameSiteNoneCookiesInSandbox),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CookieExemptionReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// A cookie which was not stored from a response with the corresponding reason.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BlockedSetCookieWithReason {
            /// The reason(s) this cookie was blocked.
            pub blocked_reasons: Vec<SetCookieBlockedReason>,
            /// The string representing this individual cookie as it would appear in the header. This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
            pub cookie_line: String,
            /// The cookie object which represents the cookie which was not stored. It is optional because sometimes complete cookie information is not available, such as in the case of parsing errors.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cookie: Option<Cookie>,
        }

        /// A cookie should have been blocked by 3PCD but is exempted and stored from a response with the corresponding reason. A cookie could only have at most one exemption reason.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExemptedSetCookieWithReason {
            /// The reason the cookie was exempted.
            pub exemption_reason: CookieExemptionReason,
            /// The string representing this individual cookie as it would appear in the header.
            pub cookie_line: String,
            /// The cookie object representing the cookie.
            pub cookie: Cookie,
        }

        /// A cookie associated with the request which may or may not be sent with it. Includes the cookies itself and reasons for blocking or exemption.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AssociatedCookie {
            /// The cookie object representing the cookie which was not sent.
            pub cookie: Cookie,
            /// The reason(s) the cookie was blocked. If empty means the cookie is included.
            pub blocked_reasons: Vec<CookieBlockedReason>,
            /// The reason the cookie should have been blocked by 3PCD but is exempted. A cookie could only have at most one exemption reason.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub exemption_reason: Option<CookieExemptionReason>,
        }

        /// Cookie parameter object
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CookieParam {
            /// Cookie name.
            pub name: String,
            /// Cookie value.
            pub value: String,
            /// The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// Cookie domain.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub domain: Option<String>,
            /// Cookie path.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub path: Option<String>,
            /// True if cookie is secure.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub secure: Option<bool>,
            /// True if cookie is http-only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub http_only: Option<bool>,
            /// Cookie SameSite type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub same_site: Option<CookieSameSite>,
            /// Cookie expiration date, session cookie if not set
            #[serde(skip_serializing_if = "Option::is_none")]
            pub expires: Option<TimeSinceEpoch>,
            /// Cookie Priority.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub priority: Option<CookiePriority>,
            /// Cookie source scheme type.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source_scheme: Option<CookieSourceScheme>,
            /// Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source_port: Option<i64>,
            /// Cookie partition key. If not set, the cookie will be set as not partitioned.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub partition_key: Option<CookiePartitionKey>,
        }

        /// Authorization challenge for HTTP status code 401 or 407.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AuthChallenge {
            /// Source of the authentication challenge.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source: Option<String>,
            /// Origin of the challenger.
            pub origin: String,
            /// The authentication scheme used, such as basic or digest
            pub scheme: String,
            /// The realm of the challenge. May be empty.
            pub realm: String,
        }

        /// Response to an AuthChallenge.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AuthChallengeResponse {
            /// The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.
            pub response: String,
            /// The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub username: Option<String>,
            /// The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub password: Option<String>,
        }

        /// Stages of the interception to begin intercepting. Request will intercept before the request is sent. Response will intercept after the response is received.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum InterceptionStage {
            #[serde(rename = "Request")]
            Request,
            #[serde(rename = "HeadersReceived")]
            HeadersReceived,
        }
        impl AsRef<str> for InterceptionStage {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Request => "Request",
                    Self::HeadersReceived => "HeadersReceived",
                }
            }
        }
        impl std::str::FromStr for InterceptionStage {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Request" => Ok(Self::Request),
                    "HeadersReceived" => Ok(Self::HeadersReceived),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for InterceptionStage {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Request pattern for interception.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestPattern {
            /// Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to `"*"`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url_pattern: Option<String>,
            /// If set, only requests for matching resource types will be intercepted.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub resource_type: Option<ResourceType>,
            /// Stage at which to begin intercepting requests. Default is Request.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub interception_stage: Option<InterceptionStage>,
        }

        /// Information about a signed exchange signature. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SignedExchangeSignature {
            /// Signed exchange signature label.
            pub label: String,
            /// The hex string of signed exchange signature.
            pub signature: String,
            /// Signed exchange signature integrity.
            pub integrity: String,
            /// Signed exchange signature cert Url.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cert_url: Option<String>,
            /// The hex string of signed exchange signature cert sha256.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cert_sha256: Option<String>,
            /// Signed exchange signature validity Url.
            pub validity_url: String,
            /// Signed exchange signature date.
            pub date: i64,
            /// Signed exchange signature expires.
            pub expires: i64,
            /// The encoded certificates.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub certificates: Option<Vec<String>>,
        }

        /// Information about a signed exchange header. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SignedExchangeHeader {
            /// Signed exchange request URL.
            pub request_url: String,
            /// Signed exchange response code.
            pub response_code: i64,
            /// Signed exchange response headers.
            pub response_headers: Headers,
            /// Signed exchange response signature.
            pub signatures: Vec<SignedExchangeSignature>,
            /// Signed exchange header integrity hash in the form of `sha256-<base64-hash-value>`.
            pub header_integrity: String,
        }

        /// Field type for a signed exchange related error.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SignedExchangeErrorField {
            #[serde(rename = "signatureSig")]
            SignatureSig,
            #[serde(rename = "signatureIntegrity")]
            SignatureIntegrity,
            #[serde(rename = "signatureCertUrl")]
            SignatureCertUrl,
            #[serde(rename = "signatureCertSha256")]
            SignatureCertSha256,
            #[serde(rename = "signatureValidityUrl")]
            SignatureValidityUrl,
            #[serde(rename = "signatureTimestamps")]
            SignatureTimestamps,
        }
        impl AsRef<str> for SignedExchangeErrorField {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SignatureSig => "signatureSig",
                    Self::SignatureIntegrity => "signatureIntegrity",
                    Self::SignatureCertUrl => "signatureCertUrl",
                    Self::SignatureCertSha256 => "signatureCertSha256",
                    Self::SignatureValidityUrl => "signatureValidityUrl",
                    Self::SignatureTimestamps => "signatureTimestamps",
                }
            }
        }
        impl std::str::FromStr for SignedExchangeErrorField {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "signatureSig" => Ok(Self::SignatureSig),
                    "signatureIntegrity" => Ok(Self::SignatureIntegrity),
                    "signatureCertUrl" => Ok(Self::SignatureCertUrl),
                    "signatureCertSha256" => Ok(Self::SignatureCertSha256),
                    "signatureValidityUrl" => Ok(Self::SignatureValidityUrl),
                    "signatureTimestamps" => Ok(Self::SignatureTimestamps),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SignedExchangeErrorField {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Information about a signed exchange response.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SignedExchangeError {
            /// Error message.
            pub message: String,
            /// The index of the signature which caused the error.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub signature_index: Option<i64>,
            /// The field which caused the error.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub error_field: Option<SignedExchangeErrorField>,
        }

        /// Information about a signed exchange response.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SignedExchangeInfo {
            /// The outer response of signed HTTP exchange which was received from network.
            pub outer_response: Response,
            /// Whether network response for the signed exchange was accompanied by extra headers.
            pub has_extra_info: bool,
            /// Information about the signed exchange header.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub header: Option<SignedExchangeHeader>,
            /// Security details for the signed exchange header.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_details: Option<SecurityDetails>,
            /// Errors occurred while handling the signed exchange.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub errors: Option<Vec<SignedExchangeError>>,
        }

        /// List of content encodings supported by the backend.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ContentEncoding {
            #[serde(rename = "deflate")]
            Deflate,
            #[serde(rename = "gzip")]
            Gzip,
            #[serde(rename = "br")]
            Br,
            #[serde(rename = "zstd")]
            Zstd,
        }
        impl AsRef<str> for ContentEncoding {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Deflate => "deflate",
                    Self::Gzip => "gzip",
                    Self::Br => "br",
                    Self::Zstd => "zstd",
                }
            }
        }
        impl std::str::FromStr for ContentEncoding {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "deflate" => Ok(Self::Deflate),
                    "gzip" => Ok(Self::Gzip),
                    "br" => Ok(Self::Br),
                    "zstd" => Ok(Self::Zstd),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ContentEncoding {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NetworkConditions {
            /// Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are matched (including p2p connections).
            pub url_pattern: String,
            /// Minimum latency from request sent to response headers received (ms).
            pub latency: f64,
            /// Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
            pub download_throughput: f64,
            /// Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
            pub upload_throughput: f64,
            /// Connection type if known.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub connection_type: Option<ConnectionType>,
            /// WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub packet_loss: Option<f64>,
            /// WebRTC packet queue length (packet). 0 removes any queue length limitations.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub packet_queue_length: Option<i64>,
            /// WebRTC packetReordering feature.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub packet_reordering: Option<bool>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BlockPattern {
            /// URL pattern to match. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `*://*:*/*.css`.
            pub url_pattern: String,
            /// Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later `BlockPattern`.
            pub block: bool,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DirectSocketDnsQueryType {
            #[serde(rename = "ipv4")]
            Ipv4,
            #[serde(rename = "ipv6")]
            Ipv6,
        }
        impl AsRef<str> for DirectSocketDnsQueryType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Ipv4 => "ipv4",
                    Self::Ipv6 => "ipv6",
                }
            }
        }
        impl std::str::FromStr for DirectSocketDnsQueryType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "ipv4" => Ok(Self::Ipv4),
                    "ipv6" => Ok(Self::Ipv6),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DirectSocketDnsQueryType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectTCPSocketOptions {
            /// TCP_NODELAY option
            pub no_delay: bool,
            /// Expected to be unsigned integer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub keep_alive_delay: Option<f64>,
            /// Expected to be unsigned integer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub send_buffer_size: Option<f64>,
            /// Expected to be unsigned integer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub receive_buffer_size: Option<f64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dns_query_type: Option<DirectSocketDnsQueryType>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUDPSocketOptions {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub remote_addr: Option<String>,
            /// Unsigned int 16.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub remote_port: Option<i64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub local_addr: Option<String>,
            /// Unsigned int 16.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub local_port: Option<i64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dns_query_type: Option<DirectSocketDnsQueryType>,
            /// Expected to be unsigned integer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub send_buffer_size: Option<f64>,
            /// Expected to be unsigned integer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub receive_buffer_size: Option<f64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub multicast_loopback: Option<bool>,
            /// Unsigned int 8.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub multicast_time_to_live: Option<i64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub multicast_allow_address_sharing: Option<bool>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUDPMessage {
            pub data: String,
            /// Null for connected mode.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub remote_addr: Option<String>,
            /// Null for connected mode. Expected to be unsigned integer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub remote_port: Option<i64>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum LocalNetworkAccessRequestPolicy {
            #[serde(rename = "Allow")]
            Allow,
            #[serde(rename = "BlockFromInsecureToMorePrivate")]
            BlockFromInsecureToMorePrivate,
            #[serde(rename = "WarnFromInsecureToMorePrivate")]
            WarnFromInsecureToMorePrivate,
            #[serde(rename = "PermissionBlock")]
            PermissionBlock,
            #[serde(rename = "PermissionWarn")]
            PermissionWarn,
        }
        impl AsRef<str> for LocalNetworkAccessRequestPolicy {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Allow => "Allow",
                    Self::BlockFromInsecureToMorePrivate => "BlockFromInsecureToMorePrivate",
                    Self::WarnFromInsecureToMorePrivate => "WarnFromInsecureToMorePrivate",
                    Self::PermissionBlock => "PermissionBlock",
                    Self::PermissionWarn => "PermissionWarn",
                }
            }
        }
        impl std::str::FromStr for LocalNetworkAccessRequestPolicy {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Allow" => Ok(Self::Allow),
                    "BlockFromInsecureToMorePrivate" => Ok(Self::BlockFromInsecureToMorePrivate),
                    "WarnFromInsecureToMorePrivate" => Ok(Self::WarnFromInsecureToMorePrivate),
                    "PermissionBlock" => Ok(Self::PermissionBlock),
                    "PermissionWarn" => Ok(Self::PermissionWarn),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for LocalNetworkAccessRequestPolicy {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum IPAddressSpace {
            #[serde(rename = "Loopback")]
            Loopback,
            #[serde(rename = "Local")]
            Local,
            #[serde(rename = "Public")]
            Public,
            #[serde(rename = "Unknown")]
            Unknown,
        }
        impl AsRef<str> for IPAddressSpace {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Loopback => "Loopback",
                    Self::Local => "Local",
                    Self::Public => "Public",
                    Self::Unknown => "Unknown",
                }
            }
        }
        impl std::str::FromStr for IPAddressSpace {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Loopback" => Ok(Self::Loopback),
                    "Local" => Ok(Self::Local),
                    "Public" => Ok(Self::Public),
                    "Unknown" => Ok(Self::Unknown),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for IPAddressSpace {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ConnectTiming {
            /// Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for the same request (but not for redirected requests).
            pub request_time: f64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClientSecurityState {
            pub initiator_is_secure_context: bool,
            #[serde(rename = "initiatorIPAddressSpace")]
            pub initiator_ip_address_space: IPAddressSpace,
            pub local_network_access_request_policy: LocalNetworkAccessRequestPolicy,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CrossOriginOpenerPolicyValue {
            #[serde(rename = "SameOrigin")]
            SameOrigin,
            #[serde(rename = "SameOriginAllowPopups")]
            SameOriginAllowPopups,
            #[serde(rename = "RestrictProperties")]
            RestrictProperties,
            #[serde(rename = "UnsafeNone")]
            UnsafeNone,
            #[serde(rename = "SameOriginPlusCoep")]
            SameOriginPlusCoep,
            #[serde(rename = "RestrictPropertiesPlusCoep")]
            RestrictPropertiesPlusCoep,
            #[serde(rename = "NoopenerAllowPopups")]
            NoopenerAllowPopups,
        }
        impl AsRef<str> for CrossOriginOpenerPolicyValue {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SameOrigin => "SameOrigin",
                    Self::SameOriginAllowPopups => "SameOriginAllowPopups",
                    Self::RestrictProperties => "RestrictProperties",
                    Self::UnsafeNone => "UnsafeNone",
                    Self::SameOriginPlusCoep => "SameOriginPlusCoep",
                    Self::RestrictPropertiesPlusCoep => "RestrictPropertiesPlusCoep",
                    Self::NoopenerAllowPopups => "NoopenerAllowPopups",
                }
            }
        }
        impl std::str::FromStr for CrossOriginOpenerPolicyValue {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SameOrigin" => Ok(Self::SameOrigin),
                    "SameOriginAllowPopups" => Ok(Self::SameOriginAllowPopups),
                    "RestrictProperties" => Ok(Self::RestrictProperties),
                    "UnsafeNone" => Ok(Self::UnsafeNone),
                    "SameOriginPlusCoep" => Ok(Self::SameOriginPlusCoep),
                    "RestrictPropertiesPlusCoep" => Ok(Self::RestrictPropertiesPlusCoep),
                    "NoopenerAllowPopups" => Ok(Self::NoopenerAllowPopups),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CrossOriginOpenerPolicyValue {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CrossOriginOpenerPolicyStatus {
            pub value: CrossOriginOpenerPolicyValue,
            pub report_only_value: CrossOriginOpenerPolicyValue,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub reporting_endpoint: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub report_only_reporting_endpoint: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CrossOriginEmbedderPolicyValue {
            #[serde(rename = "None")]
            None,
            #[serde(rename = "Credentialless")]
            Credentialless,
            #[serde(rename = "RequireCorp")]
            RequireCorp,
        }
        impl AsRef<str> for CrossOriginEmbedderPolicyValue {
            fn as_ref(&self) -> &str {
                match self {
                    Self::None => "None",
                    Self::Credentialless => "Credentialless",
                    Self::RequireCorp => "RequireCorp",
                }
            }
        }
        impl std::str::FromStr for CrossOriginEmbedderPolicyValue {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "None" => Ok(Self::None),
                    "Credentialless" => Ok(Self::Credentialless),
                    "RequireCorp" => Ok(Self::RequireCorp),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CrossOriginEmbedderPolicyValue {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CrossOriginEmbedderPolicyStatus {
            pub value: CrossOriginEmbedderPolicyValue,
            pub report_only_value: CrossOriginEmbedderPolicyValue,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub reporting_endpoint: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub report_only_reporting_endpoint: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ContentSecurityPolicySource {
            #[serde(rename = "HTTP")]
            Http,
            #[serde(rename = "Meta")]
            Meta,
        }
        impl AsRef<str> for ContentSecurityPolicySource {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Http => "HTTP",
                    Self::Meta => "Meta",
                }
            }
        }
        impl std::str::FromStr for ContentSecurityPolicySource {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "HTTP" => Ok(Self::Http),
                    "Meta" => Ok(Self::Meta),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ContentSecurityPolicySource {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContentSecurityPolicyStatus {
            pub effective_directives: String,
            pub is_enforced: bool,
            pub source: ContentSecurityPolicySource,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SecurityIsolationStatus {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub coop: Option<CrossOriginOpenerPolicyStatus>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub coep: Option<CrossOriginEmbedderPolicyStatus>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub csp: Option<Vec<ContentSecurityPolicyStatus>>,
        }

        /// The status of a Reporting API report.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ReportStatus {
            #[serde(rename = "Queued")]
            Queued,
            #[serde(rename = "Pending")]
            Pending,
            #[serde(rename = "MarkedForRemoval")]
            MarkedForRemoval,
            #[serde(rename = "Success")]
            Success,
        }
        impl AsRef<str> for ReportStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Queued => "Queued",
                    Self::Pending => "Pending",
                    Self::MarkedForRemoval => "MarkedForRemoval",
                    Self::Success => "Success",
                }
            }
        }
        impl std::str::FromStr for ReportStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Queued" => Ok(Self::Queued),
                    "Pending" => Ok(Self::Pending),
                    "MarkedForRemoval" => Ok(Self::MarkedForRemoval),
                    "Success" => Ok(Self::Success),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ReportStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type ReportId = String;

        /// An object representing a report generated by the Reporting API.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportingApiReport {
            pub id: ReportId,
            /// The URL of the document that triggered the report.
            pub initiator_url: String,
            /// The name of the endpoint group that should be used to deliver the report.
            pub destination: String,
            /// The type of the report (specifies the set of data that is contained in the report body).
            pub type_: String,
            /// When the report was generated.
            pub timestamp: network::types::TimeSinceEpoch,
            /// How many uploads deep the related request was.
            pub depth: i64,
            /// The number of delivery attempts made so far, not including an active attempt.
            pub completed_attempts: i64,
            pub body: serde_json::Value,
            pub status: ReportStatus,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportingApiEndpoint {
            /// The URL of the endpoint to which reports may be delivered.
            pub url: String,
            /// Name of the endpoint group.
            pub group_name: String,
        }

        /// Unique identifier for a device bound session.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSessionKey {
            /// The site the session is set up for.
            pub site: String,
            /// The id of the session.
            pub id: String,
        }

        /// How a device bound session was used during a request.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSessionWithUsage {
            /// The key for the session.
            pub session_key: DeviceBoundSessionKey,
            /// How the session was used (or not used).
            pub usage: String,
        }

        /// A device bound session's cookie craving.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSessionCookieCraving {
            /// The name of the craving.
            pub name: String,
            /// The domain of the craving.
            pub domain: String,
            /// The path of the craving.
            pub path: String,
            /// The `Secure` attribute of the craving attributes.
            pub secure: bool,
            /// The `HttpOnly` attribute of the craving attributes.
            pub http_only: bool,
            /// The `SameSite` attribute of the craving attributes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub same_site: Option<CookieSameSite>,
        }

        /// A device bound session's inclusion URL rule.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSessionUrlRule {
            /// See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::rule_type`.
            pub rule_type: String,
            /// See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::host_pattern`.
            pub host_pattern: String,
            /// See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::path_prefix`.
            pub path_prefix: String,
        }

        /// A device bound session's inclusion rules.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSessionInclusionRules {
            /// See comments on `net::device_bound_sessions::SessionInclusionRules::origin_`.
            pub origin: String,
            /// Whether the whole site is included. See comments on `net::device_bound_sessions::SessionInclusionRules::include_site_` for more details; this boolean is true if that value is populated.
            pub include_site: bool,
            /// See comments on `net::device_bound_sessions::SessionInclusionRules::url_rules_`.
            pub url_rules: Vec<DeviceBoundSessionUrlRule>,
        }

        /// A device bound session.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSession {
            /// The site and session ID of the session.
            pub key: DeviceBoundSessionKey,
            /// See comments on `net::device_bound_sessions::Session::refresh_url_`.
            pub refresh_url: String,
            /// See comments on `net::device_bound_sessions::Session::inclusion_rules_`.
            pub inclusion_rules: DeviceBoundSessionInclusionRules,
            /// See comments on `net::device_bound_sessions::Session::cookie_cravings_`.
            pub cookie_cravings: Vec<DeviceBoundSessionCookieCraving>,
            /// See comments on `net::device_bound_sessions::Session::expiry_date_`.
            pub expiry_date: network::types::TimeSinceEpoch,
            /// See comments on `net::device_bound_sessions::Session::cached_challenge__`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cached_challenge: Option<String>,
            /// See comments on `net::device_bound_sessions::Session::allowed_refresh_initiators_`.
            pub allowed_refresh_initiators: Vec<String>,
        }

        /// A unique identifier for a device bound session event.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type DeviceBoundSessionEventId = String;

        /// A fetch result for a device bound session creation or refresh.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DeviceBoundSessionFetchResult {
            #[serde(rename = "Success")]
            Success,
            #[serde(rename = "KeyError")]
            KeyError,
            #[serde(rename = "SigningError")]
            SigningError,
            #[serde(rename = "ServerRequestedTermination")]
            ServerRequestedTermination,
            #[serde(rename = "InvalidSessionId")]
            InvalidSessionId,
            #[serde(rename = "InvalidChallenge")]
            InvalidChallenge,
            #[serde(rename = "TooManyChallenges")]
            TooManyChallenges,
            #[serde(rename = "InvalidFetcherUrl")]
            InvalidFetcherUrl,
            #[serde(rename = "InvalidRefreshUrl")]
            InvalidRefreshUrl,
            #[serde(rename = "TransientHttpError")]
            TransientHttpError,
            #[serde(rename = "ScopeOriginSameSiteMismatch")]
            ScopeOriginSameSiteMismatch,
            #[serde(rename = "RefreshUrlSameSiteMismatch")]
            RefreshUrlSameSiteMismatch,
            #[serde(rename = "MismatchedSessionId")]
            MismatchedSessionId,
            #[serde(rename = "MissingScope")]
            MissingScope,
            #[serde(rename = "NoCredentials")]
            NoCredentials,
            #[serde(rename = "SubdomainRegistrationWellKnownUnavailable")]
            SubdomainRegistrationWellKnownUnavailable,
            #[serde(rename = "SubdomainRegistrationUnauthorized")]
            SubdomainRegistrationUnauthorized,
            #[serde(rename = "SubdomainRegistrationWellKnownMalformed")]
            SubdomainRegistrationWellKnownMalformed,
            #[serde(rename = "SessionProviderWellKnownUnavailable")]
            SessionProviderWellKnownUnavailable,
            #[serde(rename = "RelyingPartyWellKnownUnavailable")]
            RelyingPartyWellKnownUnavailable,
            #[serde(rename = "FederatedKeyThumbprintMismatch")]
            FederatedKeyThumbprintMismatch,
            #[serde(rename = "InvalidFederatedSessionUrl")]
            InvalidFederatedSessionUrl,
            #[serde(rename = "InvalidFederatedKey")]
            InvalidFederatedKey,
            #[serde(rename = "TooManyRelyingOriginLabels")]
            TooManyRelyingOriginLabels,
            #[serde(rename = "BoundCookieSetForbidden")]
            BoundCookieSetForbidden,
            #[serde(rename = "NetError")]
            NetError,
            #[serde(rename = "ProxyError")]
            ProxyError,
            #[serde(rename = "EmptySessionConfig")]
            EmptySessionConfig,
            #[serde(rename = "InvalidCredentialsConfig")]
            InvalidCredentialsConfig,
            #[serde(rename = "InvalidCredentialsType")]
            InvalidCredentialsType,
            #[serde(rename = "InvalidCredentialsEmptyName")]
            InvalidCredentialsEmptyName,
            #[serde(rename = "InvalidCredentialsCookie")]
            InvalidCredentialsCookie,
            #[serde(rename = "PersistentHttpError")]
            PersistentHttpError,
            #[serde(rename = "RegistrationAttemptedChallenge")]
            RegistrationAttemptedChallenge,
            #[serde(rename = "InvalidScopeOrigin")]
            InvalidScopeOrigin,
            #[serde(rename = "ScopeOriginContainsPath")]
            ScopeOriginContainsPath,
            #[serde(rename = "RefreshInitiatorNotString")]
            RefreshInitiatorNotString,
            #[serde(rename = "RefreshInitiatorInvalidHostPattern")]
            RefreshInitiatorInvalidHostPattern,
            #[serde(rename = "InvalidScopeSpecification")]
            InvalidScopeSpecification,
            #[serde(rename = "MissingScopeSpecificationType")]
            MissingScopeSpecificationType,
            #[serde(rename = "EmptyScopeSpecificationDomain")]
            EmptyScopeSpecificationDomain,
            #[serde(rename = "EmptyScopeSpecificationPath")]
            EmptyScopeSpecificationPath,
            #[serde(rename = "InvalidScopeSpecificationType")]
            InvalidScopeSpecificationType,
            #[serde(rename = "InvalidScopeIncludeSite")]
            InvalidScopeIncludeSite,
            #[serde(rename = "MissingScopeIncludeSite")]
            MissingScopeIncludeSite,
            #[serde(rename = "FederatedNotAuthorizedByProvider")]
            FederatedNotAuthorizedByProvider,
            #[serde(rename = "FederatedNotAuthorizedByRelyingParty")]
            FederatedNotAuthorizedByRelyingParty,
            #[serde(rename = "SessionProviderWellKnownMalformed")]
            SessionProviderWellKnownMalformed,
            #[serde(rename = "SessionProviderWellKnownHasProviderOrigin")]
            SessionProviderWellKnownHasProviderOrigin,
            #[serde(rename = "RelyingPartyWellKnownMalformed")]
            RelyingPartyWellKnownMalformed,
            #[serde(rename = "RelyingPartyWellKnownHasRelyingOrigins")]
            RelyingPartyWellKnownHasRelyingOrigins,
            #[serde(rename = "InvalidFederatedSessionProviderSessionMissing")]
            InvalidFederatedSessionProviderSessionMissing,
            #[serde(rename = "InvalidFederatedSessionWrongProviderOrigin")]
            InvalidFederatedSessionWrongProviderOrigin,
            #[serde(rename = "InvalidCredentialsCookieCreationTime")]
            InvalidCredentialsCookieCreationTime,
            #[serde(rename = "InvalidCredentialsCookieName")]
            InvalidCredentialsCookieName,
            #[serde(rename = "InvalidCredentialsCookieParsing")]
            InvalidCredentialsCookieParsing,
            #[serde(rename = "InvalidCredentialsCookieUnpermittedAttribute")]
            InvalidCredentialsCookieUnpermittedAttribute,
            #[serde(rename = "InvalidCredentialsCookieInvalidDomain")]
            InvalidCredentialsCookieInvalidDomain,
            #[serde(rename = "InvalidCredentialsCookiePrefix")]
            InvalidCredentialsCookiePrefix,
            #[serde(rename = "InvalidScopeRulePath")]
            InvalidScopeRulePath,
            #[serde(rename = "InvalidScopeRuleHostPattern")]
            InvalidScopeRuleHostPattern,
            #[serde(rename = "ScopeRuleOriginScopedHostPatternMismatch")]
            ScopeRuleOriginScopedHostPatternMismatch,
            #[serde(rename = "ScopeRuleSiteScopedHostPatternMismatch")]
            ScopeRuleSiteScopedHostPatternMismatch,
            #[serde(rename = "SigningQuotaExceeded")]
            SigningQuotaExceeded,
            #[serde(rename = "InvalidConfigJson")]
            InvalidConfigJson,
            #[serde(rename = "InvalidFederatedSessionProviderFailedToRestoreKey")]
            InvalidFederatedSessionProviderFailedToRestoreKey,
            #[serde(rename = "FailedToUnwrapKey")]
            FailedToUnwrapKey,
            #[serde(rename = "SessionDeletedDuringRefresh")]
            SessionDeletedDuringRefresh,
        }
        impl AsRef<str> for DeviceBoundSessionFetchResult {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Success => "Success",
                    Self::KeyError => "KeyError",
                    Self::SigningError => "SigningError",
                    Self::ServerRequestedTermination => "ServerRequestedTermination",
                    Self::InvalidSessionId => "InvalidSessionId",
                    Self::InvalidChallenge => "InvalidChallenge",
                    Self::TooManyChallenges => "TooManyChallenges",
                    Self::InvalidFetcherUrl => "InvalidFetcherUrl",
                    Self::InvalidRefreshUrl => "InvalidRefreshUrl",
                    Self::TransientHttpError => "TransientHttpError",
                    Self::ScopeOriginSameSiteMismatch => "ScopeOriginSameSiteMismatch",
                    Self::RefreshUrlSameSiteMismatch => "RefreshUrlSameSiteMismatch",
                    Self::MismatchedSessionId => "MismatchedSessionId",
                    Self::MissingScope => "MissingScope",
                    Self::NoCredentials => "NoCredentials",
                    Self::SubdomainRegistrationWellKnownUnavailable => {
                        "SubdomainRegistrationWellKnownUnavailable"
                    }
                    Self::SubdomainRegistrationUnauthorized => "SubdomainRegistrationUnauthorized",
                    Self::SubdomainRegistrationWellKnownMalformed => {
                        "SubdomainRegistrationWellKnownMalformed"
                    }
                    Self::SessionProviderWellKnownUnavailable => {
                        "SessionProviderWellKnownUnavailable"
                    }
                    Self::RelyingPartyWellKnownUnavailable => "RelyingPartyWellKnownUnavailable",
                    Self::FederatedKeyThumbprintMismatch => "FederatedKeyThumbprintMismatch",
                    Self::InvalidFederatedSessionUrl => "InvalidFederatedSessionUrl",
                    Self::InvalidFederatedKey => "InvalidFederatedKey",
                    Self::TooManyRelyingOriginLabels => "TooManyRelyingOriginLabels",
                    Self::BoundCookieSetForbidden => "BoundCookieSetForbidden",
                    Self::NetError => "NetError",
                    Self::ProxyError => "ProxyError",
                    Self::EmptySessionConfig => "EmptySessionConfig",
                    Self::InvalidCredentialsConfig => "InvalidCredentialsConfig",
                    Self::InvalidCredentialsType => "InvalidCredentialsType",
                    Self::InvalidCredentialsEmptyName => "InvalidCredentialsEmptyName",
                    Self::InvalidCredentialsCookie => "InvalidCredentialsCookie",
                    Self::PersistentHttpError => "PersistentHttpError",
                    Self::RegistrationAttemptedChallenge => "RegistrationAttemptedChallenge",
                    Self::InvalidScopeOrigin => "InvalidScopeOrigin",
                    Self::ScopeOriginContainsPath => "ScopeOriginContainsPath",
                    Self::RefreshInitiatorNotString => "RefreshInitiatorNotString",
                    Self::RefreshInitiatorInvalidHostPattern => {
                        "RefreshInitiatorInvalidHostPattern"
                    }
                    Self::InvalidScopeSpecification => "InvalidScopeSpecification",
                    Self::MissingScopeSpecificationType => "MissingScopeSpecificationType",
                    Self::EmptyScopeSpecificationDomain => "EmptyScopeSpecificationDomain",
                    Self::EmptyScopeSpecificationPath => "EmptyScopeSpecificationPath",
                    Self::InvalidScopeSpecificationType => "InvalidScopeSpecificationType",
                    Self::InvalidScopeIncludeSite => "InvalidScopeIncludeSite",
                    Self::MissingScopeIncludeSite => "MissingScopeIncludeSite",
                    Self::FederatedNotAuthorizedByProvider => "FederatedNotAuthorizedByProvider",
                    Self::FederatedNotAuthorizedByRelyingParty => {
                        "FederatedNotAuthorizedByRelyingParty"
                    }
                    Self::SessionProviderWellKnownMalformed => "SessionProviderWellKnownMalformed",
                    Self::SessionProviderWellKnownHasProviderOrigin => {
                        "SessionProviderWellKnownHasProviderOrigin"
                    }
                    Self::RelyingPartyWellKnownMalformed => "RelyingPartyWellKnownMalformed",
                    Self::RelyingPartyWellKnownHasRelyingOrigins => {
                        "RelyingPartyWellKnownHasRelyingOrigins"
                    }
                    Self::InvalidFederatedSessionProviderSessionMissing => {
                        "InvalidFederatedSessionProviderSessionMissing"
                    }
                    Self::InvalidFederatedSessionWrongProviderOrigin => {
                        "InvalidFederatedSessionWrongProviderOrigin"
                    }
                    Self::InvalidCredentialsCookieCreationTime => {
                        "InvalidCredentialsCookieCreationTime"
                    }
                    Self::InvalidCredentialsCookieName => "InvalidCredentialsCookieName",
                    Self::InvalidCredentialsCookieParsing => "InvalidCredentialsCookieParsing",
                    Self::InvalidCredentialsCookieUnpermittedAttribute => {
                        "InvalidCredentialsCookieUnpermittedAttribute"
                    }
                    Self::InvalidCredentialsCookieInvalidDomain => {
                        "InvalidCredentialsCookieInvalidDomain"
                    }
                    Self::InvalidCredentialsCookiePrefix => "InvalidCredentialsCookiePrefix",
                    Self::InvalidScopeRulePath => "InvalidScopeRulePath",
                    Self::InvalidScopeRuleHostPattern => "InvalidScopeRuleHostPattern",
                    Self::ScopeRuleOriginScopedHostPatternMismatch => {
                        "ScopeRuleOriginScopedHostPatternMismatch"
                    }
                    Self::ScopeRuleSiteScopedHostPatternMismatch => {
                        "ScopeRuleSiteScopedHostPatternMismatch"
                    }
                    Self::SigningQuotaExceeded => "SigningQuotaExceeded",
                    Self::InvalidConfigJson => "InvalidConfigJson",
                    Self::InvalidFederatedSessionProviderFailedToRestoreKey => {
                        "InvalidFederatedSessionProviderFailedToRestoreKey"
                    }
                    Self::FailedToUnwrapKey => "FailedToUnwrapKey",
                    Self::SessionDeletedDuringRefresh => "SessionDeletedDuringRefresh",
                }
            }
        }
        impl std::str::FromStr for DeviceBoundSessionFetchResult {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Success" => Ok(Self::Success),
                    "KeyError" => Ok(Self::KeyError),
                    "SigningError" => Ok(Self::SigningError),
                    "ServerRequestedTermination" => Ok(Self::ServerRequestedTermination),
                    "InvalidSessionId" => Ok(Self::InvalidSessionId),
                    "InvalidChallenge" => Ok(Self::InvalidChallenge),
                    "TooManyChallenges" => Ok(Self::TooManyChallenges),
                    "InvalidFetcherUrl" => Ok(Self::InvalidFetcherUrl),
                    "InvalidRefreshUrl" => Ok(Self::InvalidRefreshUrl),
                    "TransientHttpError" => Ok(Self::TransientHttpError),
                    "ScopeOriginSameSiteMismatch" => Ok(Self::ScopeOriginSameSiteMismatch),
                    "RefreshUrlSameSiteMismatch" => Ok(Self::RefreshUrlSameSiteMismatch),
                    "MismatchedSessionId" => Ok(Self::MismatchedSessionId),
                    "MissingScope" => Ok(Self::MissingScope),
                    "NoCredentials" => Ok(Self::NoCredentials),
                    "SubdomainRegistrationWellKnownUnavailable" => {
                        Ok(Self::SubdomainRegistrationWellKnownUnavailable)
                    }
                    "SubdomainRegistrationUnauthorized" => {
                        Ok(Self::SubdomainRegistrationUnauthorized)
                    }
                    "SubdomainRegistrationWellKnownMalformed" => {
                        Ok(Self::SubdomainRegistrationWellKnownMalformed)
                    }
                    "SessionProviderWellKnownUnavailable" => {
                        Ok(Self::SessionProviderWellKnownUnavailable)
                    }
                    "RelyingPartyWellKnownUnavailable" => {
                        Ok(Self::RelyingPartyWellKnownUnavailable)
                    }
                    "FederatedKeyThumbprintMismatch" => Ok(Self::FederatedKeyThumbprintMismatch),
                    "InvalidFederatedSessionUrl" => Ok(Self::InvalidFederatedSessionUrl),
                    "InvalidFederatedKey" => Ok(Self::InvalidFederatedKey),
                    "TooManyRelyingOriginLabels" => Ok(Self::TooManyRelyingOriginLabels),
                    "BoundCookieSetForbidden" => Ok(Self::BoundCookieSetForbidden),
                    "NetError" => Ok(Self::NetError),
                    "ProxyError" => Ok(Self::ProxyError),
                    "EmptySessionConfig" => Ok(Self::EmptySessionConfig),
                    "InvalidCredentialsConfig" => Ok(Self::InvalidCredentialsConfig),
                    "InvalidCredentialsType" => Ok(Self::InvalidCredentialsType),
                    "InvalidCredentialsEmptyName" => Ok(Self::InvalidCredentialsEmptyName),
                    "InvalidCredentialsCookie" => Ok(Self::InvalidCredentialsCookie),
                    "PersistentHttpError" => Ok(Self::PersistentHttpError),
                    "RegistrationAttemptedChallenge" => Ok(Self::RegistrationAttemptedChallenge),
                    "InvalidScopeOrigin" => Ok(Self::InvalidScopeOrigin),
                    "ScopeOriginContainsPath" => Ok(Self::ScopeOriginContainsPath),
                    "RefreshInitiatorNotString" => Ok(Self::RefreshInitiatorNotString),
                    "RefreshInitiatorInvalidHostPattern" => {
                        Ok(Self::RefreshInitiatorInvalidHostPattern)
                    }
                    "InvalidScopeSpecification" => Ok(Self::InvalidScopeSpecification),
                    "MissingScopeSpecificationType" => Ok(Self::MissingScopeSpecificationType),
                    "EmptyScopeSpecificationDomain" => Ok(Self::EmptyScopeSpecificationDomain),
                    "EmptyScopeSpecificationPath" => Ok(Self::EmptyScopeSpecificationPath),
                    "InvalidScopeSpecificationType" => Ok(Self::InvalidScopeSpecificationType),
                    "InvalidScopeIncludeSite" => Ok(Self::InvalidScopeIncludeSite),
                    "MissingScopeIncludeSite" => Ok(Self::MissingScopeIncludeSite),
                    "FederatedNotAuthorizedByProvider" => {
                        Ok(Self::FederatedNotAuthorizedByProvider)
                    }
                    "FederatedNotAuthorizedByRelyingParty" => {
                        Ok(Self::FederatedNotAuthorizedByRelyingParty)
                    }
                    "SessionProviderWellKnownMalformed" => {
                        Ok(Self::SessionProviderWellKnownMalformed)
                    }
                    "SessionProviderWellKnownHasProviderOrigin" => {
                        Ok(Self::SessionProviderWellKnownHasProviderOrigin)
                    }
                    "RelyingPartyWellKnownMalformed" => Ok(Self::RelyingPartyWellKnownMalformed),
                    "RelyingPartyWellKnownHasRelyingOrigins" => {
                        Ok(Self::RelyingPartyWellKnownHasRelyingOrigins)
                    }
                    "InvalidFederatedSessionProviderSessionMissing" => {
                        Ok(Self::InvalidFederatedSessionProviderSessionMissing)
                    }
                    "InvalidFederatedSessionWrongProviderOrigin" => {
                        Ok(Self::InvalidFederatedSessionWrongProviderOrigin)
                    }
                    "InvalidCredentialsCookieCreationTime" => {
                        Ok(Self::InvalidCredentialsCookieCreationTime)
                    }
                    "InvalidCredentialsCookieName" => Ok(Self::InvalidCredentialsCookieName),
                    "InvalidCredentialsCookieParsing" => Ok(Self::InvalidCredentialsCookieParsing),
                    "InvalidCredentialsCookieUnpermittedAttribute" => {
                        Ok(Self::InvalidCredentialsCookieUnpermittedAttribute)
                    }
                    "InvalidCredentialsCookieInvalidDomain" => {
                        Ok(Self::InvalidCredentialsCookieInvalidDomain)
                    }
                    "InvalidCredentialsCookiePrefix" => Ok(Self::InvalidCredentialsCookiePrefix),
                    "InvalidScopeRulePath" => Ok(Self::InvalidScopeRulePath),
                    "InvalidScopeRuleHostPattern" => Ok(Self::InvalidScopeRuleHostPattern),
                    "ScopeRuleOriginScopedHostPatternMismatch" => {
                        Ok(Self::ScopeRuleOriginScopedHostPatternMismatch)
                    }
                    "ScopeRuleSiteScopedHostPatternMismatch" => {
                        Ok(Self::ScopeRuleSiteScopedHostPatternMismatch)
                    }
                    "SigningQuotaExceeded" => Ok(Self::SigningQuotaExceeded),
                    "InvalidConfigJson" => Ok(Self::InvalidConfigJson),
                    "InvalidFederatedSessionProviderFailedToRestoreKey" => {
                        Ok(Self::InvalidFederatedSessionProviderFailedToRestoreKey)
                    }
                    "FailedToUnwrapKey" => Ok(Self::FailedToUnwrapKey),
                    "SessionDeletedDuringRefresh" => Ok(Self::SessionDeletedDuringRefresh),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DeviceBoundSessionFetchResult {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Session event details specific to creation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreationEventDetails {
            /// The result of the fetch attempt.
            pub fetch_result: DeviceBoundSessionFetchResult,
            /// The session if there was a newly created session. This is populated for all successful creation events.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub new_session: Option<DeviceBoundSession>,
        }

        /// Session event details specific to refresh.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RefreshEventDetails {
            /// The result of a refresh.
            pub refresh_result: String,
            /// If there was a fetch attempt, the result of that.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub fetch_result: Option<DeviceBoundSessionFetchResult>,
            /// The session display if there was a newly created session. This is populated for any refresh event that modifies the session config.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub new_session: Option<DeviceBoundSession>,
            /// See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.
            pub was_fully_proactive_refresh: bool,
        }

        /// Session event details specific to termination.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TerminationEventDetails {
            /// The reason for a session being deleted.
            pub deletion_reason: String,
        }

        /// Session event details specific to challenges.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ChallengeEventDetails {
            /// The result of a challenge.
            pub challenge_result: String,
            /// The challenge set.
            pub challenge: String,
        }

        /// An object providing the result of a network resource load.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadNetworkResourcePageResult {
            pub success: bool,
            /// Optional values used for error reporting.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub net_error: Option<f64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub net_error_name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub http_status_code: Option<f64>,
            /// If successful, one of the following two fields holds the result.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stream: Option<io::types::StreamHandle>,
            /// Response headers.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub headers: Option<network::types::Headers>,
        }

        /// An options object that may be extended later to better support CORS, CORB and streaming.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadNetworkResourceOptions {
            pub disable_cache: bool,
            pub include_credentials: bool,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanClearBrowserCacheResponse {
            /// True if browser cache can be cleared.
            pub result: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanClearBrowserCookiesResponse {
            /// True if browser cookies can be cleared.
            pub result: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanEmulateNetworkConditionsResponse {
            /// True if emulation of network conditions is supported.
            pub result: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EmulateNetworkConditionsByRuleResponse {
            /// An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for requests affected by a rule.
            pub rule_ids: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAllCookiesResponse {
            /// Array of cookie objects.
            pub cookies: Vec<types::Cookie>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCertificateResponse {
            pub table_names: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCookiesResponse {
            /// Array of cookie objects.
            pub cookies: Vec<types::Cookie>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResponseBodyResponse {
            /// Response body.
            pub body: String,
            /// True, if content was sent as base64.
            pub base64_encoded: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRequestPostDataResponse {
            /// Request body string, omitting files from multipart requests
            pub post_data: String,
            /// True, if content was sent as base64.
            pub base64_encoded: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResponseBodyForInterceptionResponse {
            /// Response body.
            pub body: String,
            /// True, if content was sent as base64.
            pub base64_encoded: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeResponseBodyForInterceptionAsStreamResponse {
            pub stream: io::types::StreamHandle,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SearchInResponseBodyResponse {
            /// List of search matches.
            pub result: Vec<debugger::types::SearchMatch>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCookieResponse {
            /// Always set to true. If an error occurs, the response indicates protocol error.
            #[deprecated]
            pub success: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StreamResourceContentResponse {
            /// Data that has been buffered until streaming is enabled. (Encoded as a base64 string when passed over JSON)
            pub buffered_data: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSecurityIsolationStatusResponse {
            pub status: types::SecurityIsolationStatus,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FetchSchemefulSiteResponse {
            /// The corresponding schemeful site.
            pub schemeful_site: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadNetworkResourceResponse {
            pub resource: types::LoadNetworkResourcePageResult,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAcceptedEncodings {
            /// List of accepted content encodings.
            pub encodings: Vec<types::ContentEncoding>,
        }

        impl SetAcceptedEncodings {
            pub fn new(encodings: Vec<types::ContentEncoding>) -> Self {
                Self { encodings }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAcceptedEncodings {
            type Response = ();
            const METHOD: &'static str = "Network.setAcceptedEncodings";
        }

        /// Clears accepted encodings set by setAcceptedEncodings
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearAcceptedEncodingsOverride {}

        impl ClearAcceptedEncodingsOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearAcceptedEncodingsOverride {
            type Response = ();
            const METHOD: &'static str = "Network.clearAcceptedEncodingsOverride";
        }

        /// Tells whether clearing browser cache is supported.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanClearBrowserCache {}

        impl CanClearBrowserCache {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CanClearBrowserCacheResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CanClearBrowserCache {
            type Response = responses::CanClearBrowserCacheResponse;
            const METHOD: &'static str = "Network.canClearBrowserCache";
        }

        /// Tells whether clearing browser cookies is supported.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanClearBrowserCookies {}

        impl CanClearBrowserCookies {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CanClearBrowserCookiesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CanClearBrowserCookies {
            type Response = responses::CanClearBrowserCookiesResponse;
            const METHOD: &'static str = "Network.canClearBrowserCookies";
        }

        /// Tells whether emulation of network conditions is supported.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CanEmulateNetworkConditions {}

        impl CanEmulateNetworkConditions {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CanEmulateNetworkConditionsResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for CanEmulateNetworkConditions {
            type Response = responses::CanEmulateNetworkConditionsResponse;
            const METHOD: &'static str = "Network.canEmulateNetworkConditions";
        }

        /// Clears browser cache.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearBrowserCache {}

        impl ClearBrowserCache {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearBrowserCache {
            type Response = ();
            const METHOD: &'static str = "Network.clearBrowserCache";
        }

        /// Clears browser cookies.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearBrowserCookies {}

        impl ClearBrowserCookies {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearBrowserCookies {
            type Response = ();
            const METHOD: &'static str = "Network.clearBrowserCookies";
        }

        /// Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId. Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContinueInterceptedRequest {
            pub interception_id: types::InterceptionId,
            /// If set this causes the request to fail with the given reason. Passing `Aborted` for requests marked with `isNavigationRequest` also cancels the navigation. Must not be set in response to an authChallenge.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub error_reason: Option<types::ErrorReason>,
            /// If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub raw_response: Option<String>,
            /// If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// If set this allows the request method to be overridden. Must not be set in response to an authChallenge.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub method: Option<String>,
            /// If set this allows postData to be set. Must not be set in response to an authChallenge.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub post_data: Option<String>,
            /// If set this allows the request headers to be changed. Must not be set in response to an authChallenge.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub headers: Option<types::Headers>,
            /// Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub auth_challenge_response: Option<types::AuthChallengeResponse>,
        }

        impl ContinueInterceptedRequest {
            pub fn new(interception_id: types::InterceptionId) -> Self {
                Self {
                    interception_id,
                    error_reason: None,
                    raw_response: None,
                    url: None,
                    method: None,
                    post_data: None,
                    headers: None,
                    auth_challenge_response: None,
                }
            }

            pub fn with_error_reason(mut self, error_reason: types::ErrorReason) -> Self {
                self.error_reason = Some(error_reason);
                self
            }

            pub fn with_raw_response(mut self, raw_response: impl Into<String>) -> Self {
                self.raw_response = Some(raw_response.into());
                self
            }

            pub fn with_url(mut self, url: impl Into<String>) -> Self {
                self.url = Some(url.into());
                self
            }

            pub fn with_method(mut self, method: impl Into<String>) -> Self {
                self.method = Some(method.into());
                self
            }

            pub fn with_post_data(mut self, post_data: impl Into<String>) -> Self {
                self.post_data = Some(post_data.into());
                self
            }

            pub fn with_headers(mut self, headers: types::Headers) -> Self {
                self.headers = Some(headers);
                self
            }

            pub fn with_auth_challenge_response(
                mut self,
                auth_challenge_response: types::AuthChallengeResponse,
            ) -> Self {
                self.auth_challenge_response = Some(auth_challenge_response);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ContinueInterceptedRequest {
            type Response = ();
            const METHOD: &'static str = "Network.continueInterceptedRequest";
        }

        /// Deletes browser cookies with matching name and url or domain/path/partitionKey pair.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteCookies {
            /// Name of the cookies to remove.
            pub name: String,
            /// If specified, deletes all the cookies with the given name where domain and path match provided URL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// If specified, deletes only cookies with the exact domain.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub domain: Option<String>,
            /// If specified, deletes only cookies with the exact path.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub path: Option<String>,
            /// If specified, deletes only cookies with the the given name and partitionKey where all partition key attributes match the cookie partition key attribute.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub partition_key: Option<types::CookiePartitionKey>,
        }

        impl DeleteCookies {
            pub fn new(name: impl Into<String>) -> Self {
                Self {
                    name: name.into(),
                    url: None,
                    domain: None,
                    path: None,
                    partition_key: None,
                }
            }

            pub fn with_url(mut self, url: impl Into<String>) -> Self {
                self.url = Some(url.into());
                self
            }

            pub fn with_domain(mut self, domain: impl Into<String>) -> Self {
                self.domain = Some(domain.into());
                self
            }

            pub fn with_path(mut self, path: impl Into<String>) -> Self {
                self.path = Some(path.into());
                self
            }

            pub fn with_partition_key(mut self, partition_key: types::CookiePartitionKey) -> Self {
                self.partition_key = Some(partition_key);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteCookies {
            type Response = ();
            const METHOD: &'static str = "Network.deleteCookies";
        }

        /// Disables network tracking, prevents network events from being sent to the client.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Network.disable";
        }

        /// Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule and overrideNetworkState commands, which can be used together to the same effect.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EmulateNetworkConditions {
            /// True to emulate internet disconnection.
            pub offline: bool,
            /// Minimum latency from request sent to response headers received (ms).
            pub latency: f64,
            /// Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
            pub download_throughput: f64,
            /// Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
            pub upload_throughput: f64,
            /// Connection type if known.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub connection_type: Option<types::ConnectionType>,
            /// WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub packet_loss: Option<f64>,
            /// WebRTC packet queue length (packet). 0 removes any queue length limitations.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub packet_queue_length: Option<i64>,
            /// WebRTC packetReordering feature.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub packet_reordering: Option<bool>,
        }

        impl EmulateNetworkConditions {
            pub fn new(
                offline: bool,
                latency: f64,
                download_throughput: f64,
                upload_throughput: f64,
            ) -> Self {
                Self {
                    offline,
                    latency,
                    download_throughput,
                    upload_throughput,
                    connection_type: None,
                    packet_loss: None,
                    packet_queue_length: None,
                    packet_reordering: None,
                }
            }

            pub fn with_connection_type(mut self, connection_type: types::ConnectionType) -> Self {
                self.connection_type = Some(connection_type);
                self
            }

            pub fn with_packet_loss(mut self, packet_loss: f64) -> Self {
                self.packet_loss = Some(packet_loss);
                self
            }

            pub fn with_packet_queue_length(mut self, packet_queue_length: i64) -> Self {
                self.packet_queue_length = Some(packet_queue_length);
                self
            }

            pub fn with_packet_reordering(mut self, packet_reordering: bool) -> Self {
                self.packet_reordering = Some(packet_reordering);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for EmulateNetworkConditions {
            type Response = ();
            const METHOD: &'static str = "Network.emulateNetworkConditions";
        }

        /// Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to explicitly modify `navigator` behavior.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EmulateNetworkConditionsByRule {
            /// True to emulate internet disconnection.
            pub offline: bool,
            /// Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are also applied for throttling of p2p connections.
            pub matched_network_conditions: Vec<types::NetworkConditions>,
        }

        impl EmulateNetworkConditionsByRule {
            pub fn new(
                offline: bool,
                matched_network_conditions: Vec<types::NetworkConditions>,
            ) -> Self {
                Self {
                    offline,
                    matched_network_conditions,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::EmulateNetworkConditionsByRuleResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for EmulateNetworkConditionsByRule {
            type Response = responses::EmulateNetworkConditionsByRuleResponse;
            const METHOD: &'static str = "Network.emulateNetworkConditionsByRule";
        }

        /// Override the state of navigator.onLine and navigator.connection.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OverrideNetworkState {
            /// True to emulate internet disconnection.
            pub offline: bool,
            /// Minimum latency from request sent to response headers received (ms).
            pub latency: f64,
            /// Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
            pub download_throughput: f64,
            /// Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
            pub upload_throughput: f64,
            /// Connection type if known.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub connection_type: Option<types::ConnectionType>,
        }

        impl OverrideNetworkState {
            pub fn new(
                offline: bool,
                latency: f64,
                download_throughput: f64,
                upload_throughput: f64,
            ) -> Self {
                Self {
                    offline,
                    latency,
                    download_throughput,
                    upload_throughput,
                    connection_type: None,
                }
            }

            pub fn with_connection_type(mut self, connection_type: types::ConnectionType) -> Self {
                self.connection_type = Some(connection_type);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for OverrideNetworkState {
            type Response = ();
            const METHOD: &'static str = "Network.overrideNetworkState";
        }

        /// Enables network tracking, network events will now be delivered to the client.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// Buffer size in bytes to use when preserving network payloads (XHRs, etc).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_total_buffer_size: Option<i64>,
            /// Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_resource_buffer_size: Option<i64>,
            /// Longest post body size (in bytes) that would be included in requestWillBeSent notification
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_post_data_size: Option<i64>,
            /// Whether DirectSocket chunk send/receive events should be reported.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub report_direct_socket_traffic: Option<bool>,
            /// Enable storing response bodies outside of renderer, so that these survive a cross-process navigation. Requires maxTotalBufferSize to be set. Currently defaults to false. This field is being deprecated in favor of the dedicated configureDurableMessages command, due to the possibility of deadlocks when awaiting Network.enable before issuing Runtime.runIfWaitingForDebugger.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enable_durable_messages: Option<bool>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self {
                    max_total_buffer_size: None,
                    max_resource_buffer_size: None,
                    max_post_data_size: None,
                    report_direct_socket_traffic: None,
                    enable_durable_messages: None,
                }
            }

            pub fn with_max_total_buffer_size(mut self, max_total_buffer_size: i64) -> Self {
                self.max_total_buffer_size = Some(max_total_buffer_size);
                self
            }

            pub fn with_max_resource_buffer_size(mut self, max_resource_buffer_size: i64) -> Self {
                self.max_resource_buffer_size = Some(max_resource_buffer_size);
                self
            }

            pub fn with_max_post_data_size(mut self, max_post_data_size: i64) -> Self {
                self.max_post_data_size = Some(max_post_data_size);
                self
            }

            pub fn with_report_direct_socket_traffic(
                mut self,
                report_direct_socket_traffic: bool,
            ) -> Self {
                self.report_direct_socket_traffic = Some(report_direct_socket_traffic);
                self
            }

            pub fn with_enable_durable_messages(mut self, enable_durable_messages: bool) -> Self {
                self.enable_durable_messages = Some(enable_durable_messages);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Network.enable";
        }

        /// Configures storing response bodies outside of renderer, so that these survive a cross-process navigation. If maxTotalBufferSize is not set, durable messages are disabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ConfigureDurableMessages {
            /// Buffer size in bytes to use when preserving network payloads (XHRs, etc).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_total_buffer_size: Option<i64>,
            /// Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_resource_buffer_size: Option<i64>,
        }

        impl ConfigureDurableMessages {
            pub fn new() -> Self {
                Self {
                    max_total_buffer_size: None,
                    max_resource_buffer_size: None,
                }
            }

            pub fn with_max_total_buffer_size(mut self, max_total_buffer_size: i64) -> Self {
                self.max_total_buffer_size = Some(max_total_buffer_size);
                self
            }

            pub fn with_max_resource_buffer_size(mut self, max_resource_buffer_size: i64) -> Self {
                self.max_resource_buffer_size = Some(max_resource_buffer_size);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ConfigureDurableMessages {
            type Response = ();
            const METHOD: &'static str = "Network.configureDurableMessages";
        }

        /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field. Deprecated. Use Storage.getCookies instead.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAllCookies {}

        impl GetAllCookies {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAllCookiesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAllCookies {
            type Response = responses::GetAllCookiesResponse;
            const METHOD: &'static str = "Network.getAllCookies";
        }

        /// Returns the DER-encoded certificate.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCertificate {
            /// Origin to get certificate for.
            pub origin: String,
        }

        impl GetCertificate {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetCertificateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetCertificate {
            type Response = responses::GetCertificateResponse;
            const METHOD: &'static str = "Network.getCertificate";
        }

        /// Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the `cookies` field.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCookies {
            /// The list of URLs for which applicable cookies will be fetched. If not specified, it's assumed to be set to the list containing the URLs of the page and all of its subframes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub urls: Option<Vec<String>>,
        }

        impl GetCookies {
            pub fn new() -> Self {
                Self { urls: None }
            }

            pub fn with_urls(mut self, urls: Vec<String>) -> Self {
                self.urls = Some(urls);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetCookiesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetCookies {
            type Response = responses::GetCookiesResponse;
            const METHOD: &'static str = "Network.getCookies";
        }

        /// Returns content served for the given request.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResponseBody {
            /// Identifier of the network request to get content for.
            pub request_id: types::RequestId,
        }

        impl GetResponseBody {
            pub fn new(request_id: types::RequestId) -> Self {
                Self { request_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetResponseBodyResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetResponseBody {
            type Response = responses::GetResponseBodyResponse;
            const METHOD: &'static str = "Network.getResponseBody";
        }

        /// Returns post data sent with the request. Returns an error when no data was sent with the request.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRequestPostData {
            /// Identifier of the network request to get content for.
            pub request_id: types::RequestId,
        }

        impl GetRequestPostData {
            pub fn new(request_id: types::RequestId) -> Self {
                Self { request_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetRequestPostDataResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetRequestPostData {
            type Response = responses::GetRequestPostDataResponse;
            const METHOD: &'static str = "Network.getRequestPostData";
        }

        /// Returns content served for the given currently intercepted request.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResponseBodyForInterception {
            /// Identifier for the intercepted request to get body for.
            pub interception_id: types::InterceptionId,
        }

        impl GetResponseBodyForInterception {
            pub fn new(interception_id: types::InterceptionId) -> Self {
                Self { interception_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetResponseBodyForInterceptionResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for GetResponseBodyForInterception {
            type Response = responses::GetResponseBodyForInterceptionResponse;
            const METHOD: &'static str = "Network.getResponseBodyForInterception";
        }

        /// Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeResponseBodyForInterceptionAsStream {
            pub interception_id: types::InterceptionId,
        }

        impl TakeResponseBodyForInterceptionAsStream {
            pub fn new(interception_id: types::InterceptionId) -> Self {
                Self { interception_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::TakeResponseBodyForInterceptionAsStreamResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for TakeResponseBodyForInterceptionAsStream {
            type Response = responses::TakeResponseBodyForInterceptionAsStreamResponse;
            const METHOD: &'static str = "Network.takeResponseBodyForInterceptionAsStream";
        }

        /// This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReplayXhr {
            /// Identifier of XHR to replay.
            pub request_id: types::RequestId,
        }

        impl ReplayXhr {
            pub fn new(request_id: types::RequestId) -> Self {
                Self { request_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReplayXhr {
            type Response = ();
            const METHOD: &'static str = "Network.replayXHR";
        }

        /// Searches for given string in response content.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SearchInResponseBody {
            /// Identifier of the network response to search.
            pub request_id: types::RequestId,
            /// String to search for.
            pub query: String,
            /// If true, search is case sensitive.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub case_sensitive: Option<bool>,
            /// If true, treats string parameter as regex.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_regex: Option<bool>,
        }

        impl SearchInResponseBody {
            pub fn new(request_id: types::RequestId, query: impl Into<String>) -> Self {
                Self {
                    request_id,
                    query: query.into(),
                    case_sensitive: None,
                    is_regex: None,
                }
            }

            pub fn with_case_sensitive(mut self, case_sensitive: bool) -> Self {
                self.case_sensitive = Some(case_sensitive);
                self
            }

            pub fn with_is_regex(mut self, is_regex: bool) -> Self {
                self.is_regex = Some(is_regex);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SearchInResponseBodyResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SearchInResponseBody {
            type Response = responses::SearchInResponseBodyResponse;
            const METHOD: &'static str = "Network.searchInResponseBody";
        }

        /// Blocks URLs from loading.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBlockedUrLs {
            /// Patterns to match in the order in which they are given. These patterns also take precedence over any wildcard patterns defined in `urls`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url_patterns: Option<Vec<types::BlockPattern>>,
            /// URL patterns to block. Wildcards ('*') are allowed.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub urls: Option<Vec<String>>,
        }

        impl SetBlockedUrLs {
            pub fn new() -> Self {
                Self {
                    url_patterns: None,
                    urls: None,
                }
            }

            pub fn with_url_patterns(mut self, url_patterns: Vec<types::BlockPattern>) -> Self {
                self.url_patterns = Some(url_patterns);
                self
            }

            pub fn with_urls(mut self, urls: Vec<String>) -> Self {
                self.urls = Some(urls);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBlockedUrLs {
            type Response = ();
            const METHOD: &'static str = "Network.setBlockedURLs";
        }

        /// Toggles ignoring of service worker for each request.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBypassServiceWorker {
            /// Bypass service worker and load from network.
            pub bypass: bool,
        }

        impl SetBypassServiceWorker {
            pub fn new(bypass: bool) -> Self {
                Self { bypass }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBypassServiceWorker {
            type Response = ();
            const METHOD: &'static str = "Network.setBypassServiceWorker";
        }

        /// Toggles ignoring cache for each request. If `true`, cache will not be used.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCacheDisabled {
            /// Cache disabled state.
            pub cache_disabled: bool,
        }

        impl SetCacheDisabled {
            pub fn new(cache_disabled: bool) -> Self {
                Self { cache_disabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCacheDisabled {
            type Response = ();
            const METHOD: &'static str = "Network.setCacheDisabled";
        }

        /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCookie {
            /// Cookie name.
            pub name: String,
            /// Cookie value.
            pub value: String,
            /// The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// Cookie domain.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub domain: Option<String>,
            /// Cookie path.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub path: Option<String>,
            /// True if cookie is secure.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub secure: Option<bool>,
            /// True if cookie is http-only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub http_only: Option<bool>,
            /// Cookie SameSite type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub same_site: Option<types::CookieSameSite>,
            /// Cookie expiration date, session cookie if not set
            #[serde(skip_serializing_if = "Option::is_none")]
            pub expires: Option<types::TimeSinceEpoch>,
            /// Cookie Priority type.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub priority: Option<types::CookiePriority>,
            /// Cookie source scheme type.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source_scheme: Option<types::CookieSourceScheme>,
            /// Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub source_port: Option<i64>,
            /// Cookie partition key. If not set, the cookie will be set as not partitioned.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub partition_key: Option<types::CookiePartitionKey>,
        }

        impl SetCookie {
            pub fn new(name: impl Into<String>, value: impl Into<String>) -> Self {
                Self {
                    name: name.into(),
                    value: value.into(),
                    url: None,
                    domain: None,
                    path: None,
                    secure: None,
                    http_only: None,
                    same_site: None,
                    expires: None,
                    priority: None,
                    source_scheme: None,
                    source_port: None,
                    partition_key: None,
                }
            }

            pub fn with_url(mut self, url: impl Into<String>) -> Self {
                self.url = Some(url.into());
                self
            }

            pub fn with_domain(mut self, domain: impl Into<String>) -> Self {
                self.domain = Some(domain.into());
                self
            }

            pub fn with_path(mut self, path: impl Into<String>) -> Self {
                self.path = Some(path.into());
                self
            }

            pub fn with_secure(mut self, secure: bool) -> Self {
                self.secure = Some(secure);
                self
            }

            pub fn with_http_only(mut self, http_only: bool) -> Self {
                self.http_only = Some(http_only);
                self
            }

            pub fn with_same_site(mut self, same_site: types::CookieSameSite) -> Self {
                self.same_site = Some(same_site);
                self
            }

            pub fn with_expires(mut self, expires: types::TimeSinceEpoch) -> Self {
                self.expires = Some(expires);
                self
            }

            pub fn with_priority(mut self, priority: types::CookiePriority) -> Self {
                self.priority = Some(priority);
                self
            }

            pub fn with_source_scheme(mut self, source_scheme: types::CookieSourceScheme) -> Self {
                self.source_scheme = Some(source_scheme);
                self
            }

            pub fn with_source_port(mut self, source_port: i64) -> Self {
                self.source_port = Some(source_port);
                self
            }

            pub fn with_partition_key(mut self, partition_key: types::CookiePartitionKey) -> Self {
                self.partition_key = Some(partition_key);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetCookieResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCookie {
            type Response = responses::SetCookieResponse;
            const METHOD: &'static str = "Network.setCookie";
        }

        /// Sets given cookies.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCookies {
            /// Cookies to be set.
            pub cookies: Vec<types::CookieParam>,
        }

        impl SetCookies {
            pub fn new(cookies: Vec<types::CookieParam>) -> Self {
                Self { cookies }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCookies {
            type Response = ();
            const METHOD: &'static str = "Network.setCookies";
        }

        /// Specifies whether to always send extra HTTP headers with the requests from this page.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetExtraHttpHeaders {
            /// Map with extra HTTP headers.
            pub headers: types::Headers,
        }

        impl SetExtraHttpHeaders {
            pub fn new(headers: types::Headers) -> Self {
                Self { headers }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetExtraHttpHeaders {
            type Response = ();
            const METHOD: &'static str = "Network.setExtraHTTPHeaders";
        }

        /// Specifies whether to attach a page script stack id in requests
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAttachDebugStack {
            /// Whether to attach a page script stack for debugging purpose.
            pub enabled: bool,
        }

        impl SetAttachDebugStack {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAttachDebugStack {
            type Response = ();
            const METHOD: &'static str = "Network.setAttachDebugStack";
        }

        /// Sets the requests to intercept that match the provided patterns and optionally resource types. Deprecated, please use Fetch.enable instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetRequestInterception {
            /// Requests matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call.
            pub patterns: Vec<types::RequestPattern>,
        }

        impl SetRequestInterception {
            pub fn new(patterns: Vec<types::RequestPattern>) -> Self {
                Self { patterns }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetRequestInterception {
            type Response = ();
            const METHOD: &'static str = "Network.setRequestInterception";
        }

        /// Allows overriding user agent with the given string.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetUserAgentOverride {
            /// User agent to use.
            pub user_agent: String,
            /// Browser language to emulate.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accept_language: Option<String>,
            /// The platform navigator.platform should return.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub platform: Option<String>,
            /// To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_agent_metadata: Option<emulation::types::UserAgentMetadata>,
        }

        impl SetUserAgentOverride {
            pub fn new(user_agent: impl Into<String>) -> Self {
                Self {
                    user_agent: user_agent.into(),
                    accept_language: None,
                    platform: None,
                    user_agent_metadata: None,
                }
            }

            pub fn with_accept_language(mut self, accept_language: impl Into<String>) -> Self {
                self.accept_language = Some(accept_language.into());
                self
            }

            pub fn with_platform(mut self, platform: impl Into<String>) -> Self {
                self.platform = Some(platform.into());
                self
            }

            pub fn with_user_agent_metadata(
                mut self,
                user_agent_metadata: emulation::types::UserAgentMetadata,
            ) -> Self {
                self.user_agent_metadata = Some(user_agent_metadata);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetUserAgentOverride {
            type Response = ();
            const METHOD: &'static str = "Network.setUserAgentOverride";
        }

        /// Enables streaming of the response for the given requestId. If enabled, the dataReceived event contains the data that was received during streaming.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StreamResourceContent {
            /// Identifier of the request to stream.
            pub request_id: types::RequestId,
        }

        impl StreamResourceContent {
            pub fn new(request_id: types::RequestId) -> Self {
                Self { request_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::StreamResourceContentResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StreamResourceContent {
            type Response = responses::StreamResourceContentResponse;
            const METHOD: &'static str = "Network.streamResourceContent";
        }

        /// Returns information about the COEP/COOP isolation status.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSecurityIsolationStatus {
            /// If no frameId is provided, the status of the target is provided.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
        }

        impl GetSecurityIsolationStatus {
            pub fn new() -> Self {
                Self { frame_id: None }
            }

            pub fn with_frame_id(mut self, frame_id: page::types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSecurityIsolationStatusResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSecurityIsolationStatus {
            type Response = responses::GetSecurityIsolationStatusResponse;
            const METHOD: &'static str = "Network.getSecurityIsolationStatus";
        }

        /// Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. Enabling triggers 'reportingApiReportAdded' for all existing reports.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EnableReportingApi {
            /// Whether to enable or disable events for the Reporting API
            pub enable: bool,
        }

        impl EnableReportingApi {
            pub fn new(enable: bool) -> Self {
                Self { enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for EnableReportingApi {
            type Response = ();
            const METHOD: &'static str = "Network.enableReportingApi";
        }

        /// Sets up tracking device bound sessions and fetching of initial set of sessions.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EnableDeviceBoundSessions {
            /// Whether to enable or disable events.
            pub enable: bool,
        }

        impl EnableDeviceBoundSessions {
            pub fn new(enable: bool) -> Self {
                Self { enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for EnableDeviceBoundSessions {
            type Response = ();
            const METHOD: &'static str = "Network.enableDeviceBoundSessions";
        }

        /// Fetches the schemeful site for a specific origin.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FetchSchemefulSite {
            /// The URL origin.
            pub origin: String,
        }

        impl FetchSchemefulSite {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::FetchSchemefulSiteResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for FetchSchemefulSite {
            type Response = responses::FetchSchemefulSiteResponse;
            const METHOD: &'static str = "Network.fetchSchemefulSite";
        }

        /// Fetches the resource and returns the content.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadNetworkResource {
            /// Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
            /// URL of the resource to get content for.
            pub url: String,
            /// Options for the request.
            pub options: types::LoadNetworkResourceOptions,
        }

        impl LoadNetworkResource {
            pub fn new(url: impl Into<String>, options: types::LoadNetworkResourceOptions) -> Self {
                Self {
                    frame_id: None,
                    url: url.into(),
                    options,
                }
            }

            pub fn with_frame_id(mut self, frame_id: page::types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::LoadNetworkResourceResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for LoadNetworkResource {
            type Response = responses::LoadNetworkResourceResponse;
            const METHOD: &'static str = "Network.loadNetworkResource";
        }

        /// Sets Controls for third-party cookie access Page reload is required before the new cookie behavior will be observed
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCookieControls {
            /// Whether 3pc restriction is enabled.
            pub enable_third_party_cookie_restriction: bool,
            /// Whether 3pc grace period exception should be enabled; false by default.
            pub disable_third_party_cookie_metadata: bool,
            /// Whether 3pc heuristics exceptions should be enabled; false by default.
            pub disable_third_party_cookie_heuristics: bool,
        }

        impl SetCookieControls {
            pub fn new(
                enable_third_party_cookie_restriction: bool,
                disable_third_party_cookie_metadata: bool,
                disable_third_party_cookie_heuristics: bool,
            ) -> Self {
                Self {
                    enable_third_party_cookie_restriction,
                    disable_third_party_cookie_metadata,
                    disable_third_party_cookie_heuristics,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCookieControls {
            type Response = ();
            const METHOD: &'static str = "Network.setCookieControls";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Fired when data chunk was received over the network.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DataReceived {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// Data chunk length.
            pub data_length: i64,
            /// Actual bytes received (might be less than dataLength for compressed encodings).
            pub encoded_data_length: i64,
            /// Data that was received. (Encoded as a base64 string when passed over JSON)
            /// **EXPERIMENTAL**
            pub data: Option<String>,
        }

        impl DataReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.dataReceived")
            }
        }

        /// Fired when EventSource message is received.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EventSourceMessageReceived {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// Message type.
            pub event_name: String,
            /// Message identifier.
            pub event_id: String,
            /// Message content.
            pub data: String,
        }

        impl EventSourceMessageReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.eventSourceMessageReceived")
            }
        }

        /// Fired when HTTP request has failed to load.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadingFailed {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// Resource type.
            pub type_: types::ResourceType,
            /// Error message. List of network errors: https://cs.chromium.org/chromium/src/net/base/net_error_list.h
            pub error_text: String,
            /// True if loading was canceled.
            pub canceled: Option<bool>,
            /// The reason why loading was blocked, if any.
            pub blocked_reason: Option<types::BlockedReason>,
            /// The reason why loading was blocked by CORS, if any.
            pub cors_error_status: Option<types::CorsErrorStatus>,
        }

        impl LoadingFailed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.loadingFailed")
            }
        }

        /// Fired when HTTP request has finished loading.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadingFinished {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// Total number of bytes received for this request.
            pub encoded_data_length: f64,
        }

        impl LoadingFinished {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.loadingFinished")
            }
        }

        /// Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestIntercepted {
            /// Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used.
            pub interception_id: types::InterceptionId,
            pub request: types::Request,
            /// The id of the frame that initiated the request.
            pub frame_id: page::types::FrameId,
            /// How the requested resource will be used.
            pub resource_type: types::ResourceType,
            /// Whether this is a navigation request, which can abort the navigation completely.
            pub is_navigation_request: bool,
            /// Set if the request is a navigation that will result in a download. Only present after response is received from the server (i.e. HeadersReceived stage).
            pub is_download: Option<bool>,
            /// Redirect location, only sent if a redirect was intercepted.
            pub redirect_url: Option<String>,
            /// Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
            pub auth_challenge: Option<types::AuthChallenge>,
            /// Response error if intercepted at response stage or if redirect occurred while intercepting request.
            pub response_error_reason: Option<types::ErrorReason>,
            /// Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
            pub response_status_code: Option<i64>,
            /// Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
            pub response_headers: Option<types::Headers>,
            /// If the intercepted request had a corresponding requestWillBeSent event fired for it, then this requestId will be the same as the requestId present in the requestWillBeSent event.
            pub request_id: Option<types::RequestId>,
        }

        impl RequestIntercepted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.requestIntercepted")
            }
        }

        /// Fired if request ended up loading from cache.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestServedFromCache {
            /// Request identifier.
            pub request_id: types::RequestId,
        }

        impl RequestServedFromCache {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.requestServedFromCache")
            }
        }

        /// Fired when page is about to send HTTP request.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestWillBeSent {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Loader identifier. Empty string if the request is fetched from worker.
            pub loader_id: types::LoaderId,
            /// URL of the document this request is loaded for.
            #[serde(rename = "documentURL")]
            pub document_url: String,
            /// Request data.
            pub request: types::Request,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// Timestamp.
            pub wall_time: types::TimeSinceEpoch,
            /// Request initiator.
            pub initiator: types::Initiator,
            /// In the case that redirectResponse is populated, this flag indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted for the request which was just redirected.
            /// **EXPERIMENTAL**
            pub redirect_has_extra_info: bool,
            /// Redirect response data.
            pub redirect_response: Option<types::Response>,
            /// Type of this resource.
            pub type_: Option<types::ResourceType>,
            /// Frame identifier.
            pub frame_id: Option<page::types::FrameId>,
            /// Whether the request is initiated by a user gesture. Defaults to false.
            pub has_user_gesture: Option<bool>,
            /// The render blocking behavior of the request.
            /// **EXPERIMENTAL**
            pub render_blocking_behavior: Option<types::RenderBlockingBehavior>,
        }

        impl RequestWillBeSent {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.requestWillBeSent")
            }
        }

        /// Fired when resource loading priority is changed
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResourceChangedPriority {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// New priority
            pub new_priority: types::ResourcePriority,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
        }

        impl ResourceChangedPriority {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.resourceChangedPriority")
            }
        }

        /// Fired when a signed exchange was received over the network
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SignedExchangeReceived {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Information about the signed exchange response.
            pub info: types::SignedExchangeInfo,
        }

        impl SignedExchangeReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.signedExchangeReceived")
            }
        }

        /// Fired when HTTP response is available.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResponseReceived {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Loader identifier. Empty string if the request is fetched from worker.
            pub loader_id: types::LoaderId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// Resource type.
            pub type_: types::ResourceType,
            /// Response data.
            pub response: types::Response,
            /// Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted for this request.
            /// **EXPERIMENTAL**
            pub has_extra_info: bool,
            /// Frame identifier.
            pub frame_id: Option<page::types::FrameId>,
        }

        impl ResponseReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.responseReceived")
            }
        }

        /// Fired when WebSocket is closed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketClosed {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
        }

        impl WebSocketClosed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webSocketClosed")
            }
        }

        /// Fired upon WebSocket creation.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketCreated {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// WebSocket request URL.
            pub url: String,
            /// Request initiator.
            pub initiator: Option<types::Initiator>,
        }

        impl WebSocketCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webSocketCreated")
            }
        }

        /// Fired when WebSocket message error occurs.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketFrameError {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// WebSocket error message.
            pub error_message: String,
        }

        impl WebSocketFrameError {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webSocketFrameError")
            }
        }

        /// Fired when WebSocket message is received.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketFrameReceived {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// WebSocket response data.
            pub response: types::WebSocketFrame,
        }

        impl WebSocketFrameReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webSocketFrameReceived")
            }
        }

        /// Fired when WebSocket message is sent.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketFrameSent {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// WebSocket response data.
            pub response: types::WebSocketFrame,
        }

        impl WebSocketFrameSent {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webSocketFrameSent")
            }
        }

        /// Fired when WebSocket handshake response becomes available.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketHandshakeResponseReceived {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// WebSocket response data.
            pub response: types::WebSocketResponse,
        }

        impl WebSocketHandshakeResponseReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webSocketHandshakeResponseReceived")
            }
        }

        /// Fired when WebSocket is about to initiate handshake.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebSocketWillSendHandshakeRequest {
            /// Request identifier.
            pub request_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// UTC Timestamp.
            pub wall_time: types::TimeSinceEpoch,
            /// WebSocket request data.
            pub request: types::WebSocketRequest,
        }

        impl WebSocketWillSendHandshakeRequest {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webSocketWillSendHandshakeRequest")
            }
        }

        /// Fired upon WebTransport creation.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebTransportCreated {
            /// WebTransport identifier.
            pub transport_id: types::RequestId,
            /// WebTransport request URL.
            pub url: String,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
            /// Request initiator.
            pub initiator: Option<types::Initiator>,
        }

        impl WebTransportCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webTransportCreated")
            }
        }

        /// Fired when WebTransport handshake is finished.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebTransportConnectionEstablished {
            /// WebTransport identifier.
            pub transport_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
        }

        impl WebTransportConnectionEstablished {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webTransportConnectionEstablished")
            }
        }

        /// Fired when WebTransport is disposed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebTransportClosed {
            /// WebTransport identifier.
            pub transport_id: types::RequestId,
            /// Timestamp.
            pub timestamp: types::MonotonicTime,
        }

        impl WebTransportClosed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.webTransportClosed")
            }
        }

        /// Fired upon direct_socket.TCPSocket creation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectTcpSocketCreated {
            pub identifier: types::RequestId,
            pub remote_addr: String,
            /// Unsigned int 16.
            pub remote_port: i64,
            pub options: types::DirectTCPSocketOptions,
            pub timestamp: types::MonotonicTime,
            pub initiator: Option<types::Initiator>,
        }

        impl DirectTcpSocketCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directTCPSocketCreated")
            }
        }

        /// Fired when direct_socket.TCPSocket connection is opened.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectTcpSocketOpened {
            pub identifier: types::RequestId,
            pub remote_addr: String,
            /// Expected to be unsigned integer.
            pub remote_port: i64,
            pub timestamp: types::MonotonicTime,
            pub local_addr: Option<String>,
            /// Expected to be unsigned integer.
            pub local_port: Option<i64>,
        }

        impl DirectTcpSocketOpened {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directTCPSocketOpened")
            }
        }

        /// Fired when direct_socket.TCPSocket is aborted.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectTcpSocketAborted {
            pub identifier: types::RequestId,
            pub error_message: String,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectTcpSocketAborted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directTCPSocketAborted")
            }
        }

        /// Fired when direct_socket.TCPSocket is closed.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectTcpSocketClosed {
            pub identifier: types::RequestId,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectTcpSocketClosed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directTCPSocketClosed")
            }
        }

        /// Fired when data is sent to tcp direct socket stream.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectTcpSocketChunkSent {
            pub identifier: types::RequestId,
            pub data: String,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectTcpSocketChunkSent {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directTCPSocketChunkSent")
            }
        }

        /// Fired when data is received from tcp direct socket stream.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectTcpSocketChunkReceived {
            pub identifier: types::RequestId,
            pub data: String,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectTcpSocketChunkReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directTCPSocketChunkReceived")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketJoinedMulticastGroup {
            pub identifier: types::RequestId,
            #[serde(rename = "IPAddress")]
            pub ip_address: String,
        }

        impl DirectUdpSocketJoinedMulticastGroup {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketJoinedMulticastGroup")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketLeftMulticastGroup {
            pub identifier: types::RequestId,
            #[serde(rename = "IPAddress")]
            pub ip_address: String,
        }

        impl DirectUdpSocketLeftMulticastGroup {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketLeftMulticastGroup")
            }
        }

        /// Fired upon direct_socket.UDPSocket creation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketCreated {
            pub identifier: types::RequestId,
            pub options: types::DirectUDPSocketOptions,
            pub timestamp: types::MonotonicTime,
            pub initiator: Option<types::Initiator>,
        }

        impl DirectUdpSocketCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketCreated")
            }
        }

        /// Fired when direct_socket.UDPSocket connection is opened.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketOpened {
            pub identifier: types::RequestId,
            pub local_addr: String,
            /// Expected to be unsigned integer.
            pub local_port: i64,
            pub timestamp: types::MonotonicTime,
            pub remote_addr: Option<String>,
            /// Expected to be unsigned integer.
            pub remote_port: Option<i64>,
        }

        impl DirectUdpSocketOpened {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketOpened")
            }
        }

        /// Fired when direct_socket.UDPSocket is aborted.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketAborted {
            pub identifier: types::RequestId,
            pub error_message: String,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectUdpSocketAborted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketAborted")
            }
        }

        /// Fired when direct_socket.UDPSocket is closed.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketClosed {
            pub identifier: types::RequestId,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectUdpSocketClosed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketClosed")
            }
        }

        /// Fired when message is sent to udp direct socket stream.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketChunkSent {
            pub identifier: types::RequestId,
            pub message: types::DirectUDPMessage,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectUdpSocketChunkSent {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketChunkSent")
            }
        }

        /// Fired when message is received from udp direct socket stream.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DirectUdpSocketChunkReceived {
            pub identifier: types::RequestId,
            pub message: types::DirectUDPMessage,
            pub timestamp: types::MonotonicTime,
        }

        impl DirectUdpSocketChunkReceived {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.directUDPSocketChunkReceived")
            }
        }

        /// Fired when additional information about a requestWillBeSent event is available from the network stack. Not every requestWillBeSent event will have an additional requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestWillBeSentExtraInfo {
            /// Request identifier. Used to match this information to an existing requestWillBeSent event.
            pub request_id: types::RequestId,
            /// A list of cookies potentially associated to the requested URL. This includes both cookies sent with the request and the ones not sent; the latter are distinguished by having blockedReasons field set.
            pub associated_cookies: Vec<types::AssociatedCookie>,
            /// Raw request headers as they will be sent over the wire.
            pub headers: types::Headers,
            /// Connection timing information for the request.
            /// **EXPERIMENTAL**
            pub connect_timing: types::ConnectTiming,
            /// How the request site's device bound sessions were used during this request.
            pub device_bound_session_usages: Option<Vec<types::DeviceBoundSessionWithUsage>>,
            /// The client security state set for the request.
            pub client_security_state: Option<types::ClientSecurityState>,
            /// Whether the site has partitioned cookies stored in a partition different than the current one.
            pub site_has_cookie_in_other_partition: Option<bool>,
            /// The network conditions id if this request was affected by network conditions configured via emulateNetworkConditionsByRule.
            pub applied_network_conditions_id: Option<String>,
        }

        impl RequestWillBeSentExtraInfo {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.requestWillBeSentExtraInfo")
            }
        }

        /// Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResponseReceivedExtraInfo {
            /// Request identifier. Used to match this information to another responseReceived event.
            pub request_id: types::RequestId,
            /// A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
            pub blocked_cookies: Vec<types::BlockedSetCookieWithReason>,
            /// Raw response headers as they were received over the wire. Duplicate headers in the response are represented as a single key with their values concatentated using `\n` as the separator. See also `headersText` that contains verbatim text for HTTP/1.*.
            pub headers: types::Headers,
            /// The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in `requestWillBeSentExtraInfo`.
            #[serde(rename = "resourceIPAddressSpace")]
            pub resource_ip_address_space: types::IPAddressSpace,
            /// The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.
            pub status_code: i64,
            /// Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
            pub headers_text: Option<String>,
            /// The cookie partition key that will be used to store partitioned cookies set in this response. Only sent when partitioned cookies are enabled.
            /// **EXPERIMENTAL**
            pub cookie_partition_key: Option<types::CookiePartitionKey>,
            /// True if partitioned cookies are enabled, but the partition key is not serializable to string.
            pub cookie_partition_key_opaque: Option<bool>,
            /// A list of cookies which should have been blocked by 3PCD but are exempted and stored from the response with the corresponding reason.
            pub exempted_cookies: Option<Vec<types::ExemptedSetCookieWithReason>>,
        }

        impl ResponseReceivedExtraInfo {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.responseReceivedExtraInfo")
            }
        }

        /// Fired when 103 Early Hints headers is received in addition to the common response. Not every responseReceived event will have an responseReceivedEarlyHints fired. Only one responseReceivedEarlyHints may be fired for eached responseReceived event.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResponseReceivedEarlyHints {
            /// Request identifier. Used to match this information to another responseReceived event.
            pub request_id: types::RequestId,
            /// Raw response headers as they were received over the wire. Duplicate headers in the response are represented as a single key with their values concatentated using `\n` as the separator. See also `headersText` that contains verbatim text for HTTP/1.*.
            pub headers: types::Headers,
        }

        impl ResponseReceivedEarlyHints {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.responseReceivedEarlyHints")
            }
        }

        /// Fired exactly once for each Trust Token operation. Depending on the type of the operation and whether the operation succeeded or failed, the event is fired before the corresponding request was sent or after the response was received.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrustTokenOperationDone {
            /// Detailed success or error status of the operation. 'AlreadyExists' also signifies a successful operation, as the result of the operation already exists und thus, the operation was abort preemptively (e.g. a cache hit).
            pub status: String,
            pub type_: types::TrustTokenOperationType,
            pub request_id: types::RequestId,
            /// Top level origin. The context in which the operation was attempted.
            pub top_level_origin: Option<String>,
            /// Origin of the issuer in case of a "Issuance" or "Redemption" operation.
            pub issuer_origin: Option<String>,
            /// The number of obtained Trust Tokens on a successful "Issuance" operation.
            pub issued_token_count: Option<i64>,
        }

        impl TrustTokenOperationDone {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.trustTokenOperationDone")
            }
        }

        /// Fired once security policy has been updated.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PolicyUpdated {}

        impl PolicyUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.policyUpdated")
            }
        }

        /// Is sent whenever a new report is added. And after 'enableReportingApi' for all existing reports.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportingApiReportAdded {
            pub report: types::ReportingApiReport,
        }

        impl ReportingApiReportAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.reportingApiReportAdded")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportingApiReportUpdated {
            pub report: types::ReportingApiReport,
        }

        impl ReportingApiReportUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.reportingApiReportUpdated")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportingApiEndpointsChangedForOrigin {
            /// Origin of the document(s) which configured the endpoints.
            pub origin: String,
            pub endpoints: Vec<types::ReportingApiEndpoint>,
        }

        impl ReportingApiEndpointsChangedForOrigin {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.reportingApiEndpointsChangedForOrigin")
            }
        }

        /// Triggered when the initial set of device bound sessions is added.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSessionsAdded {
            /// The device bound sessions.
            pub sessions: Vec<types::DeviceBoundSession>,
        }

        impl DeviceBoundSessionsAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.deviceBoundSessionsAdded")
            }
        }

        /// Triggered when a device bound session event occurs.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeviceBoundSessionEventOccurred {
            /// A unique identifier for this session event.
            pub event_id: types::DeviceBoundSessionEventId,
            /// The site this session event is associated with.
            pub site: String,
            /// Whether this event was considered successful.
            pub succeeded: bool,
            /// The session ID this event is associated with. May not be populated for failed events.
            pub session_id: Option<String>,
            /// The below are the different session event type details. Exactly one is populated.
            pub creation_event_details: Option<types::CreationEventDetails>,
            pub refresh_event_details: Option<types::RefreshEventDetails>,
            pub termination_event_details: Option<types::TerminationEventDetails>,
            pub challenge_event_details: Option<types::ChallengeEventDetails>,
        }

        impl DeviceBoundSessionEventOccurred {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Network.deviceBoundSessionEventOccurred")
            }
        }
    }
}

pub mod overlay {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Configuration data for drawing the source order of an elements children.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SourceOrderConfig {
            /// the color to outline the given element in.
            pub parent_outline_color: dom::types::RGBA,
            /// the color to outline the child elements in.
            pub child_outline_color: dom::types::RGBA,
        }

        /// Configuration data for the highlighting of Grid elements.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GridHighlightConfig {
            /// Whether the extension lines from grid cells to the rulers should be shown (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_grid_extension_lines: Option<bool>,
            /// Show Positive line number labels (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_positive_line_numbers: Option<bool>,
            /// Show Negative line number labels (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_negative_line_numbers: Option<bool>,
            /// Show area name labels (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_area_names: Option<bool>,
            /// Show line name labels (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_line_names: Option<bool>,
            /// Show track size labels (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_track_sizes: Option<bool>,
            /// The grid container border highlight color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub grid_border_color: Option<dom::types::RGBA>,
            /// The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cell_border_color: Option<dom::types::RGBA>,
            /// The row line color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub row_line_color: Option<dom::types::RGBA>,
            /// The column line color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_line_color: Option<dom::types::RGBA>,
            /// Whether the grid border is dashed (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub grid_border_dash: Option<bool>,
            /// Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cell_border_dash: Option<bool>,
            /// Whether row lines are dashed (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub row_line_dash: Option<bool>,
            /// Whether column lines are dashed (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_line_dash: Option<bool>,
            /// The row gap highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub row_gap_color: Option<dom::types::RGBA>,
            /// The row gap hatching fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub row_hatch_color: Option<dom::types::RGBA>,
            /// The column gap highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_gap_color: Option<dom::types::RGBA>,
            /// The column gap hatching fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_hatch_color: Option<dom::types::RGBA>,
            /// The named grid areas border color (Default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub area_border_color: Option<dom::types::RGBA>,
            /// The grid container background color (Default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub grid_background_color: Option<dom::types::RGBA>,
        }

        /// Configuration data for the highlighting of Flex container elements.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FlexContainerHighlightConfig {
            /// The style of the container border
            #[serde(skip_serializing_if = "Option::is_none")]
            pub container_border: Option<LineStyle>,
            /// The style of the separator between lines
            #[serde(skip_serializing_if = "Option::is_none")]
            pub line_separator: Option<LineStyle>,
            /// The style of the separator between items
            #[serde(skip_serializing_if = "Option::is_none")]
            pub item_separator: Option<LineStyle>,
            /// Style of content-distribution space on the main axis (justify-content).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub main_distributed_space: Option<BoxStyle>,
            /// Style of content-distribution space on the cross axis (align-content).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cross_distributed_space: Option<BoxStyle>,
            /// Style of empty space caused by row gaps (gap/row-gap).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub row_gap_space: Option<BoxStyle>,
            /// Style of empty space caused by columns gaps (gap/column-gap).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_gap_space: Option<BoxStyle>,
            /// Style of the self-alignment line (align-items).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cross_alignment: Option<LineStyle>,
        }

        /// Configuration data for the highlighting of Flex item elements.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FlexItemHighlightConfig {
            /// Style of the box representing the item's base size
            #[serde(skip_serializing_if = "Option::is_none")]
            pub base_size_box: Option<BoxStyle>,
            /// Style of the border around the box representing the item's base size
            #[serde(skip_serializing_if = "Option::is_none")]
            pub base_size_border: Option<LineStyle>,
            /// Style of the arrow representing if the item grew or shrank
            #[serde(skip_serializing_if = "Option::is_none")]
            pub flexibility_arrow: Option<LineStyle>,
        }

        /// Style information for drawing a line.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LineStyle {
            /// The color of the line (default: transparent)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub color: Option<dom::types::RGBA>,
            /// The line pattern (default: solid)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub pattern: Option<String>,
        }

        /// Style information for drawing a box.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BoxStyle {
            /// The background color for the box (default: transparent)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub fill_color: Option<dom::types::RGBA>,
            /// The hatching color for the box (default: transparent)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub hatch_color: Option<dom::types::RGBA>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ContrastAlgorithm {
            #[serde(rename = "aa")]
            Aa,
            #[serde(rename = "aaa")]
            Aaa,
            #[serde(rename = "apca")]
            Apca,
        }
        impl AsRef<str> for ContrastAlgorithm {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Aa => "aa",
                    Self::Aaa => "aaa",
                    Self::Apca => "apca",
                }
            }
        }
        impl std::str::FromStr for ContrastAlgorithm {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "aa" => Ok(Self::Aa),
                    "aaa" => Ok(Self::Aaa),
                    "apca" => Ok(Self::Apca),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ContrastAlgorithm {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Configuration data for the highlighting of page elements.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightConfig {
            /// Whether the node info tooltip should be shown (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_info: Option<bool>,
            /// Whether the node styles in the tooltip (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_styles: Option<bool>,
            /// Whether the rulers should be shown (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_rulers: Option<bool>,
            /// Whether the a11y info should be shown (default: true).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_accessibility_info: Option<bool>,
            /// Whether the extension lines from node to the rulers should be shown (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_extension_lines: Option<bool>,
            /// The content box highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_color: Option<dom::types::RGBA>,
            /// The padding highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub padding_color: Option<dom::types::RGBA>,
            /// The border highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub border_color: Option<dom::types::RGBA>,
            /// The margin highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub margin_color: Option<dom::types::RGBA>,
            /// The event target element highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub event_target_color: Option<dom::types::RGBA>,
            /// The shape outside fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shape_color: Option<dom::types::RGBA>,
            /// The shape margin fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shape_margin_color: Option<dom::types::RGBA>,
            /// The grid layout color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub css_grid_color: Option<dom::types::RGBA>,
            /// The color format used to format color styles (default: hex).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub color_format: Option<ColorFormat>,
            /// The grid layout highlight configuration (default: all transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub grid_highlight_config: Option<GridHighlightConfig>,
            /// The flex container highlight configuration (default: all transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub flex_container_highlight_config: Option<FlexContainerHighlightConfig>,
            /// The flex item highlight configuration (default: all transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub flex_item_highlight_config: Option<FlexItemHighlightConfig>,
            /// The contrast algorithm to use for the contrast ratio (default: aa).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub contrast_algorithm: Option<ContrastAlgorithm>,
            /// The container query container highlight configuration (default: all transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub container_query_container_highlight_config:
                Option<ContainerQueryContainerHighlightConfig>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ColorFormat {
            #[serde(rename = "rgb")]
            Rgb,
            #[serde(rename = "hsl")]
            Hsl,
            #[serde(rename = "hwb")]
            Hwb,
            #[serde(rename = "hex")]
            Hex,
        }
        impl AsRef<str> for ColorFormat {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Rgb => "rgb",
                    Self::Hsl => "hsl",
                    Self::Hwb => "hwb",
                    Self::Hex => "hex",
                }
            }
        }
        impl std::str::FromStr for ColorFormat {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "rgb" => Ok(Self::Rgb),
                    "hsl" => Ok(Self::Hsl),
                    "hwb" => Ok(Self::Hwb),
                    "hex" => Ok(Self::Hex),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ColorFormat {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Configurations for Persistent Grid Highlight
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GridNodeHighlightConfig {
            /// A descriptor for the highlight appearance.
            pub grid_highlight_config: GridHighlightConfig,
            /// Identifier of the node to highlight.
            pub node_id: dom::types::NodeId,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FlexNodeHighlightConfig {
            /// A descriptor for the highlight appearance of flex containers.
            pub flex_container_highlight_config: FlexContainerHighlightConfig,
            /// Identifier of the node to highlight.
            pub node_id: dom::types::NodeId,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScrollSnapContainerHighlightConfig {
            /// The style of the snapport border (default: transparent)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub snapport_border: Option<LineStyle>,
            /// The style of the snap area border (default: transparent)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub snap_area_border: Option<LineStyle>,
            /// The margin highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_margin_color: Option<dom::types::RGBA>,
            /// The padding highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scroll_padding_color: Option<dom::types::RGBA>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScrollSnapHighlightConfig {
            /// A descriptor for the highlight appearance of scroll snap containers.
            pub scroll_snap_container_highlight_config: ScrollSnapContainerHighlightConfig,
            /// Identifier of the node to highlight.
            pub node_id: dom::types::NodeId,
        }

        /// Configuration for dual screen hinge
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HingeConfig {
            /// A rectangle represent hinge
            pub rect: dom::types::Rect,
            /// The content box highlight fill color (default: a dark color).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_color: Option<dom::types::RGBA>,
            /// The content box highlight outline color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub outline_color: Option<dom::types::RGBA>,
        }

        /// Configuration for Window Controls Overlay
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WindowControlsOverlayConfig {
            /// Whether the title bar CSS should be shown when emulating the Window Controls Overlay.
            #[serde(rename = "showCSS")]
            pub show_css: bool,
            /// Selected platforms to show the overlay.
            pub selected_platform: String,
            /// The theme color defined in app manifest.
            pub theme_color: String,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContainerQueryHighlightConfig {
            /// A descriptor for the highlight appearance of container query containers.
            pub container_query_container_highlight_config: ContainerQueryContainerHighlightConfig,
            /// Identifier of the container node to highlight.
            pub node_id: dom::types::NodeId,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContainerQueryContainerHighlightConfig {
            /// The style of the container border.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub container_border: Option<LineStyle>,
            /// The style of the descendants' borders.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub descendant_border: Option<LineStyle>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct IsolatedElementHighlightConfig {
            /// A descriptor for the highlight appearance of an element in isolation mode.
            pub isolation_mode_highlight_config: IsolationModeHighlightConfig,
            /// Identifier of the isolated element to highlight.
            pub node_id: dom::types::NodeId,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct IsolationModeHighlightConfig {
            /// The fill color of the resizers (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub resizer_color: Option<dom::types::RGBA>,
            /// The fill color for resizer handles (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub resizer_handle_color: Option<dom::types::RGBA>,
            /// The fill color for the mask covering non-isolated elements (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub mask_color: Option<dom::types::RGBA>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum InspectMode {
            #[serde(rename = "searchForNode")]
            SearchForNode,
            #[serde(rename = "searchForUAShadowDOM")]
            SearchForUaShadowDom,
            #[serde(rename = "captureAreaScreenshot")]
            CaptureAreaScreenshot,
            #[serde(rename = "none")]
            None,
        }
        impl AsRef<str> for InspectMode {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SearchForNode => "searchForNode",
                    Self::SearchForUaShadowDom => "searchForUAShadowDOM",
                    Self::CaptureAreaScreenshot => "captureAreaScreenshot",
                    Self::None => "none",
                }
            }
        }
        impl std::str::FromStr for InspectMode {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "searchForNode" => Ok(Self::SearchForNode),
                    "searchForUAShadowDOM" => Ok(Self::SearchForUaShadowDom),
                    "captureAreaScreenshot" => Ok(Self::CaptureAreaScreenshot),
                    "none" => Ok(Self::None),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for InspectMode {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHighlightObjectForTestResponse {
            /// Highlight data for the node.
            pub highlight: serde_json::Value,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetGridHighlightObjectsForTestResponse {
            /// Grid Highlight data for the node ids provided.
            pub highlights: serde_json::Value,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSourceOrderHighlightObjectForTestResponse {
            /// Source order highlight data for the node id provided.
            pub highlight: serde_json::Value,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Disables domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Overlay.disable";
        }

        /// Enables domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Overlay.enable";
        }

        /// For testing.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHighlightObjectForTest {
            /// Id of the node to get highlight object for.
            pub node_id: dom::types::NodeId,
            /// Whether to include distance info.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_distance: Option<bool>,
            /// Whether to include style info.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_style: Option<bool>,
            /// The color format to get config with (default: hex).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub color_format: Option<types::ColorFormat>,
            /// Whether to show accessibility info (default: true).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub show_accessibility_info: Option<bool>,
        }

        impl GetHighlightObjectForTest {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self {
                    node_id,
                    include_distance: None,
                    include_style: None,
                    color_format: None,
                    show_accessibility_info: None,
                }
            }

            pub fn with_include_distance(mut self, include_distance: bool) -> Self {
                self.include_distance = Some(include_distance);
                self
            }

            pub fn with_include_style(mut self, include_style: bool) -> Self {
                self.include_style = Some(include_style);
                self
            }

            pub fn with_color_format(mut self, color_format: types::ColorFormat) -> Self {
                self.color_format = Some(color_format);
                self
            }

            pub fn with_show_accessibility_info(mut self, show_accessibility_info: bool) -> Self {
                self.show_accessibility_info = Some(show_accessibility_info);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetHighlightObjectForTestResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetHighlightObjectForTest {
            type Response = responses::GetHighlightObjectForTestResponse;
            const METHOD: &'static str = "Overlay.getHighlightObjectForTest";
        }

        /// For Persistent Grid testing.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetGridHighlightObjectsForTest {
            /// Ids of the node to get highlight object for.
            pub node_ids: Vec<dom::types::NodeId>,
        }

        impl GetGridHighlightObjectsForTest {
            pub fn new(node_ids: Vec<dom::types::NodeId>) -> Self {
                Self { node_ids }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetGridHighlightObjectsForTestResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for GetGridHighlightObjectsForTest {
            type Response = responses::GetGridHighlightObjectsForTestResponse;
            const METHOD: &'static str = "Overlay.getGridHighlightObjectsForTest";
        }

        /// For Source Order Viewer testing.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSourceOrderHighlightObjectForTest {
            /// Id of the node to highlight.
            pub node_id: dom::types::NodeId,
        }

        impl GetSourceOrderHighlightObjectForTest {
            pub fn new(node_id: dom::types::NodeId) -> Self {
                Self { node_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSourceOrderHighlightObjectForTestResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSourceOrderHighlightObjectForTest {
            type Response = responses::GetSourceOrderHighlightObjectForTestResponse;
            const METHOD: &'static str = "Overlay.getSourceOrderHighlightObjectForTest";
        }

        /// Hides any highlight.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HideHighlight {}

        impl HideHighlight {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HideHighlight {
            type Response = ();
            const METHOD: &'static str = "Overlay.hideHighlight";
        }

        /// Highlights owner element of the frame with given id. Deprecated: Doesn't work reliably and cannot be fixed due to process separation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightFrame {
            /// Identifier of the frame to highlight.
            pub frame_id: page::types::FrameId,
            /// The content box highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_color: Option<dom::types::RGBA>,
            /// The content box highlight outline color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_outline_color: Option<dom::types::RGBA>,
        }

        impl HighlightFrame {
            pub fn new(frame_id: page::types::FrameId) -> Self {
                Self {
                    frame_id,
                    content_color: None,
                    content_outline_color: None,
                }
            }

            pub fn with_content_color(mut self, content_color: dom::types::RGBA) -> Self {
                self.content_color = Some(content_color);
                self
            }

            pub fn with_content_outline_color(
                mut self,
                content_outline_color: dom::types::RGBA,
            ) -> Self {
                self.content_outline_color = Some(content_outline_color);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HighlightFrame {
            type Response = ();
            const METHOD: &'static str = "Overlay.highlightFrame";
        }

        /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightNode {
            /// A descriptor for the highlight appearance.
            pub highlight_config: types::HighlightConfig,
            /// Identifier of the node to highlight.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::NodeId>,
            /// Identifier of the backend node to highlight.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// JavaScript object id of the node to be highlighted.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
            /// Selectors to highlight relevant nodes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub selector: Option<String>,
        }

        impl HighlightNode {
            pub fn new(highlight_config: types::HighlightConfig) -> Self {
                Self {
                    highlight_config,
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                    selector: None,
                }
            }

            pub fn with_node_id(mut self, node_id: dom::types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(
                mut self,
                backend_node_id: dom::types::BackendNodeId,
            ) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }

            pub fn with_selector(mut self, selector: impl Into<String>) -> Self {
                self.selector = Some(selector.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HighlightNode {
            type Response = ();
            const METHOD: &'static str = "Overlay.highlightNode";
        }

        /// Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightQuad {
            /// Quad to highlight
            pub quad: dom::types::Quad,
            /// The highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub color: Option<dom::types::RGBA>,
            /// The highlight outline color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub outline_color: Option<dom::types::RGBA>,
        }

        impl HighlightQuad {
            pub fn new(quad: dom::types::Quad) -> Self {
                Self {
                    quad,
                    color: None,
                    outline_color: None,
                }
            }

            pub fn with_color(mut self, color: dom::types::RGBA) -> Self {
                self.color = Some(color);
                self
            }

            pub fn with_outline_color(mut self, outline_color: dom::types::RGBA) -> Self {
                self.outline_color = Some(outline_color);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HighlightQuad {
            type Response = ();
            const METHOD: &'static str = "Overlay.highlightQuad";
        }

        /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. Issue: the method does not handle device pixel ratio (DPR) correctly. The coordinates currently have to be adjusted by the client if DPR is not 1 (see crbug.com/437807128).
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightRect {
            /// X coordinate
            pub x: i64,
            /// Y coordinate
            pub y: i64,
            /// Rectangle width
            pub width: i64,
            /// Rectangle height
            pub height: i64,
            /// The highlight fill color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub color: Option<dom::types::RGBA>,
            /// The highlight outline color (default: transparent).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub outline_color: Option<dom::types::RGBA>,
        }

        impl HighlightRect {
            pub fn new(x: i64, y: i64, width: i64, height: i64) -> Self {
                Self {
                    x,
                    y,
                    width,
                    height,
                    color: None,
                    outline_color: None,
                }
            }

            pub fn with_color(mut self, color: dom::types::RGBA) -> Self {
                self.color = Some(color);
                self
            }

            pub fn with_outline_color(mut self, outline_color: dom::types::RGBA) -> Self {
                self.outline_color = Some(outline_color);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HighlightRect {
            type Response = ();
            const METHOD: &'static str = "Overlay.highlightRect";
        }

        /// Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HighlightSourceOrder {
            /// A descriptor for the appearance of the overlay drawing.
            pub source_order_config: types::SourceOrderConfig,
            /// Identifier of the node to highlight.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::NodeId>,
            /// Identifier of the backend node to highlight.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            /// JavaScript object id of the node to be highlighted.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<runtime::types::RemoteObjectId>,
        }

        impl HighlightSourceOrder {
            pub fn new(source_order_config: types::SourceOrderConfig) -> Self {
                Self {
                    source_order_config,
                    node_id: None,
                    backend_node_id: None,
                    object_id: None,
                }
            }

            pub fn with_node_id(mut self, node_id: dom::types::NodeId) -> Self {
                self.node_id = Some(node_id);
                self
            }

            pub fn with_backend_node_id(
                mut self,
                backend_node_id: dom::types::BackendNodeId,
            ) -> Self {
                self.backend_node_id = Some(backend_node_id);
                self
            }

            pub fn with_object_id(mut self, object_id: runtime::types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HighlightSourceOrder {
            type Response = ();
            const METHOD: &'static str = "Overlay.highlightSourceOrder";
        }

        /// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInspectMode {
            /// Set an inspection mode.
            pub mode: types::InspectMode,
            /// A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled == false`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub highlight_config: Option<types::HighlightConfig>,
        }

        impl SetInspectMode {
            pub fn new(mode: types::InspectMode) -> Self {
                Self {
                    mode,
                    highlight_config: None,
                }
            }

            pub fn with_highlight_config(
                mut self,
                highlight_config: types::HighlightConfig,
            ) -> Self {
                self.highlight_config = Some(highlight_config);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInspectMode {
            type Response = ();
            const METHOD: &'static str = "Overlay.setInspectMode";
        }

        /// Highlights owner element of all frames detected to be ads.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowAdHighlights {
            /// True for showing ad highlights
            pub show: bool,
        }

        impl SetShowAdHighlights {
            pub fn new(show: bool) -> Self {
                Self { show }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowAdHighlights {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowAdHighlights";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPausedInDebuggerMessage {
            /// The message to display, also triggers resume and step over controls.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub message: Option<String>,
        }

        impl SetPausedInDebuggerMessage {
            pub fn new() -> Self {
                Self { message: None }
            }

            pub fn with_message(mut self, message: impl Into<String>) -> Self {
                self.message = Some(message.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPausedInDebuggerMessage {
            type Response = ();
            const METHOD: &'static str = "Overlay.setPausedInDebuggerMessage";
        }

        /// Requests that backend shows debug borders on layers
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowDebugBorders {
            /// True for showing debug borders
            pub show: bool,
        }

        impl SetShowDebugBorders {
            pub fn new(show: bool) -> Self {
                Self { show }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowDebugBorders {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowDebugBorders";
        }

        /// Requests that backend shows the FPS counter
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowFpsCounter {
            /// True for showing the FPS counter
            pub show: bool,
        }

        impl SetShowFpsCounter {
            pub fn new(show: bool) -> Self {
                Self { show }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowFpsCounter {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowFPSCounter";
        }

        /// Highlight multiple elements with the CSS Grid overlay.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowGridOverlays {
            /// An array of node identifiers and descriptors for the highlight appearance.
            pub grid_node_highlight_configs: Vec<types::GridNodeHighlightConfig>,
        }

        impl SetShowGridOverlays {
            pub fn new(grid_node_highlight_configs: Vec<types::GridNodeHighlightConfig>) -> Self {
                Self {
                    grid_node_highlight_configs,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowGridOverlays {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowGridOverlays";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowFlexOverlays {
            /// An array of node identifiers and descriptors for the highlight appearance.
            pub flex_node_highlight_configs: Vec<types::FlexNodeHighlightConfig>,
        }

        impl SetShowFlexOverlays {
            pub fn new(flex_node_highlight_configs: Vec<types::FlexNodeHighlightConfig>) -> Self {
                Self {
                    flex_node_highlight_configs,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowFlexOverlays {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowFlexOverlays";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowScrollSnapOverlays {
            /// An array of node identifiers and descriptors for the highlight appearance.
            pub scroll_snap_highlight_configs: Vec<types::ScrollSnapHighlightConfig>,
        }

        impl SetShowScrollSnapOverlays {
            pub fn new(
                scroll_snap_highlight_configs: Vec<types::ScrollSnapHighlightConfig>,
            ) -> Self {
                Self {
                    scroll_snap_highlight_configs,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowScrollSnapOverlays {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowScrollSnapOverlays";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowContainerQueryOverlays {
            /// An array of node identifiers and descriptors for the highlight appearance.
            pub container_query_highlight_configs: Vec<types::ContainerQueryHighlightConfig>,
        }

        impl SetShowContainerQueryOverlays {
            pub fn new(
                container_query_highlight_configs: Vec<types::ContainerQueryHighlightConfig>,
            ) -> Self {
                Self {
                    container_query_highlight_configs,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowContainerQueryOverlays {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowContainerQueryOverlays";
        }

        /// Requests that backend shows paint rectangles
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowPaintRects {
            /// True for showing paint rectangles
            pub result: bool,
        }

        impl SetShowPaintRects {
            pub fn new(result: bool) -> Self {
                Self { result }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowPaintRects {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowPaintRects";
        }

        /// Requests that backend shows layout shift regions
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowLayoutShiftRegions {
            /// True for showing layout shift regions
            pub result: bool,
        }

        impl SetShowLayoutShiftRegions {
            pub fn new(result: bool) -> Self {
                Self { result }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowLayoutShiftRegions {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowLayoutShiftRegions";
        }

        /// Requests that backend shows scroll bottleneck rects
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowScrollBottleneckRects {
            /// True for showing scroll bottleneck rects
            pub show: bool,
        }

        impl SetShowScrollBottleneckRects {
            pub fn new(show: bool) -> Self {
                Self { show }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowScrollBottleneckRects {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowScrollBottleneckRects";
        }

        /// Deprecated, no longer has any effect.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowHitTestBorders {
            /// True for showing hit-test borders
            pub show: bool,
        }

        impl SetShowHitTestBorders {
            pub fn new(show: bool) -> Self {
                Self { show }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowHitTestBorders {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowHitTestBorders";
        }

        /// Deprecated, no longer has any effect.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowWebVitals {
            pub show: bool,
        }

        impl SetShowWebVitals {
            pub fn new(show: bool) -> Self {
                Self { show }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowWebVitals {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowWebVitals";
        }

        /// Paints viewport size upon main frame resize.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowViewportSizeOnResize {
            /// Whether to paint size or not.
            pub show: bool,
        }

        impl SetShowViewportSizeOnResize {
            pub fn new(show: bool) -> Self {
                Self { show }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowViewportSizeOnResize {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowViewportSizeOnResize";
        }

        /// Add a dual screen device hinge
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowHinge {
            /// hinge data, null means hideHinge
            #[serde(skip_serializing_if = "Option::is_none")]
            pub hinge_config: Option<types::HingeConfig>,
        }

        impl SetShowHinge {
            pub fn new() -> Self {
                Self { hinge_config: None }
            }

            pub fn with_hinge_config(mut self, hinge_config: types::HingeConfig) -> Self {
                self.hinge_config = Some(hinge_config);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowHinge {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowHinge";
        }

        /// Show elements in isolation mode with overlays.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowIsolatedElements {
            /// An array of node identifiers and descriptors for the highlight appearance.
            pub isolated_element_highlight_configs: Vec<types::IsolatedElementHighlightConfig>,
        }

        impl SetShowIsolatedElements {
            pub fn new(
                isolated_element_highlight_configs: Vec<types::IsolatedElementHighlightConfig>,
            ) -> Self {
                Self {
                    isolated_element_highlight_configs,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowIsolatedElements {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowIsolatedElements";
        }

        /// Show Window Controls Overlay for PWA
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetShowWindowControlsOverlay {
            /// Window Controls Overlay data, null means hide Window Controls Overlay
            #[serde(skip_serializing_if = "Option::is_none")]
            pub window_controls_overlay_config: Option<types::WindowControlsOverlayConfig>,
        }

        impl SetShowWindowControlsOverlay {
            pub fn new() -> Self {
                Self {
                    window_controls_overlay_config: None,
                }
            }

            pub fn with_window_controls_overlay_config(
                mut self,
                window_controls_overlay_config: types::WindowControlsOverlayConfig,
            ) -> Self {
                self.window_controls_overlay_config = Some(window_controls_overlay_config);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetShowWindowControlsOverlay {
            type Response = ();
            const METHOD: &'static str = "Overlay.setShowWindowControlsOverlay";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Fired when the node should be inspected. This happens after call to `setInspectMode` or when user manually inspects an element.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InspectNodeRequested {
            /// Id of the node to inspect.
            pub backend_node_id: dom::types::BackendNodeId,
        }

        impl InspectNodeRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Overlay.inspectNodeRequested")
            }
        }

        /// Fired when the node should be highlighted. This happens after call to `setInspectMode`.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NodeHighlightRequested {
            pub node_id: dom::types::NodeId,
        }

        impl NodeHighlightRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Overlay.nodeHighlightRequested")
            }
        }

        /// Fired when user asks to capture screenshot of some area on the page.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreenshotRequested {
            /// Viewport to capture, in device independent pixels (dip).
            pub viewport: page::types::Viewport,
        }

        impl ScreenshotRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Overlay.screenshotRequested")
            }
        }

        /// Fired when user cancels the inspect mode.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InspectModeCanceled {}

        impl InspectModeCanceled {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Overlay.inspectModeCanceled")
            }
        }
    }
}

pub mod pwa {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// The following types are the replica of https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FileHandlerAccept {
            /// New name of the mimetype according to https://www.iana.org/assignments/media-types/media-types.xhtml
            pub media_type: String,
            pub file_extensions: Vec<String>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FileHandler {
            pub action: String,
            pub accepts: Vec<FileHandlerAccept>,
            pub display_name: String,
        }

        /// If user prefers opening the app in browser or an app window.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DisplayMode {
            #[serde(rename = "standalone")]
            Standalone,
            #[serde(rename = "browser")]
            Browser,
        }
        impl AsRef<str> for DisplayMode {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Standalone => "standalone",
                    Self::Browser => "browser",
                }
            }
        }
        impl std::str::FromStr for DisplayMode {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "standalone" => Ok(Self::Standalone),
                    "browser" => Ok(Self::Browser),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DisplayMode {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOsAppStateResponse {
            pub badge_count: i64,
            pub file_handlers: Vec<types::FileHandler>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LaunchResponse {
            /// ID of the tab target created as a result.
            pub target_id: target::types::TargetID,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LaunchFilesInAppResponse {
            /// IDs of the tab targets created as the result.
            pub target_ids: Vec<target::types::TargetID>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Returns the following OS state for the given manifest id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOsAppState {
            /// The id from the webapp's manifest file, commonly it's the url of the site installing the webapp. See https://web.dev/learn/pwa/web-app-manifest.
            pub manifest_id: String,
        }

        impl GetOsAppState {
            pub fn new(manifest_id: impl Into<String>) -> Self {
                Self {
                    manifest_id: manifest_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetOsAppStateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetOsAppState {
            type Response = responses::GetOsAppStateResponse;
            const METHOD: &'static str = "PWA.getOsAppState";
        }

        /// Installs the given manifest identity, optionally using the given installUrlOrBundleUrl IWA-specific install description: manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId File installation mode: The installUrlOrBundleUrl can be either file:// or http(s):// pointing to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to The .swbn file's signing key. Dev proxy installation mode: installUrlOrBundleUrl must be http(s):// that serves dev mode IWA. web_package::SignedWebBundleId must be of type dev proxy. The advantage of dev proxy mode is that all changes to IWA automatically will be reflected in the running app without reinstallation. To generate bundle id for proxy mode: 1. Generate 32 random bytes. 2. Add a specific suffix at the end following the documentation  https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix 3. Encode the entire sequence using Base32 without padding. If Chrome is not in IWA dev mode, the installation will fail, regardless of the state of the allowlist.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Install {
            pub manifest_id: String,
            /// The location of the app or bundle overriding the one derived from the manifestId.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub install_url_or_bundle_url: Option<String>,
        }

        impl Install {
            pub fn new(manifest_id: impl Into<String>) -> Self {
                Self {
                    manifest_id: manifest_id.into(),
                    install_url_or_bundle_url: None,
                }
            }

            pub fn with_install_url_or_bundle_url(
                mut self,
                install_url_or_bundle_url: impl Into<String>,
            ) -> Self {
                self.install_url_or_bundle_url = Some(install_url_or_bundle_url.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Install {
            type Response = ();
            const METHOD: &'static str = "PWA.install";
        }

        /// Uninstalls the given manifest_id and closes any opened app windows.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Uninstall {
            pub manifest_id: String,
        }

        impl Uninstall {
            pub fn new(manifest_id: impl Into<String>) -> Self {
                Self {
                    manifest_id: manifest_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Uninstall {
            type Response = ();
            const METHOD: &'static str = "PWA.uninstall";
        }

        /// Launches the installed web app, or an url in the same web app instead of the default start url if it is provided. Returns a page Target.TargetID which can be used to attach to via Target.attachToTarget or similar APIs.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Launch {
            pub manifest_id: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
        }

        impl Launch {
            pub fn new(manifest_id: impl Into<String>) -> Self {
                Self {
                    manifest_id: manifest_id.into(),
                    url: None,
                }
            }

            pub fn with_url(mut self, url: impl Into<String>) -> Self {
                self.url = Some(url.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::LaunchResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Launch {
            type Response = responses::LaunchResponse;
            const METHOD: &'static str = "PWA.launch";
        }

        /// Opens one or more local files from an installed web app identified by its manifestId. The web app needs to have file handlers registered to process the files. The API returns one or more page Target.TargetIDs which can be used to attach to via Target.attachToTarget or similar APIs. If some files in the parameters cannot be handled by the web app, they will be ignored. If none of the files can be handled, this API returns an error. If no files are provided as the parameter, this API also returns an error. According to the definition of the file handlers in the manifest file, one Target.TargetID may represent a page handling one or more files. The order of the returned Target.TargetIDs is not guaranteed. TODO(crbug.com/339454034): Check the existences of the input files.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LaunchFilesInApp {
            pub manifest_id: String,
            pub files: Vec<String>,
        }

        impl LaunchFilesInApp {
            pub fn new(manifest_id: impl Into<String>, files: Vec<String>) -> Self {
                Self {
                    manifest_id: manifest_id.into(),
                    files,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::LaunchFilesInAppResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for LaunchFilesInApp {
            type Response = responses::LaunchFilesInAppResponse;
            const METHOD: &'static str = "PWA.launchFilesInApp";
        }

        /// Opens the current page in its web app identified by the manifest id, needs to be called on a page target. This function returns immediately without waiting for the app to finish loading.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OpenCurrentPageInApp {
            pub manifest_id: String,
        }

        impl OpenCurrentPageInApp {
            pub fn new(manifest_id: impl Into<String>) -> Self {
                Self {
                    manifest_id: manifest_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for OpenCurrentPageInApp {
            type Response = ();
            const METHOD: &'static str = "PWA.openCurrentPageInApp";
        }

        /// Changes user settings of the web app identified by its manifestId. If the app was not installed, this command returns an error. Unset parameters will be ignored; unrecognized values will cause an error. Unlike the ones defined in the manifest files of the web apps, these settings are provided by the browser and controlled by the users, they impact the way the browser handling the web apps. See the comment of each parameter.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ChangeAppUserSettings {
            pub manifest_id: String,
            /// If user allows the links clicked on by the user in the app's scope, or extended scope if the manifest has scope extensions and the flags `DesktopPWAsLinkCapturingWithScopeExtensions` and `WebAppEnableScopeExtensions` are enabled. Note, the API does not support resetting the linkCapturing to the initial value, uninstalling and installing the web app again will reset it. TODO(crbug.com/339453269): Setting this value on ChromeOS is not supported yet.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub link_capturing: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub display_mode: Option<types::DisplayMode>,
        }

        impl ChangeAppUserSettings {
            pub fn new(manifest_id: impl Into<String>) -> Self {
                Self {
                    manifest_id: manifest_id.into(),
                    link_capturing: None,
                    display_mode: None,
                }
            }

            pub fn with_link_capturing(mut self, link_capturing: bool) -> Self {
                self.link_capturing = Some(link_capturing);
                self
            }

            pub fn with_display_mode(mut self, display_mode: types::DisplayMode) -> Self {
                self.display_mode = Some(display_mode);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ChangeAppUserSettings {
            type Response = ();
            const METHOD: &'static str = "PWA.changeAppUserSettings";
        }
    }
}

pub mod page {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique frame identifier.
        pub type FrameId = String;

        /// Indicates whether a frame has been identified as an ad.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AdFrameType {
            #[serde(rename = "none")]
            None,
            #[serde(rename = "child")]
            Child,
            #[serde(rename = "root")]
            Root,
        }
        impl AsRef<str> for AdFrameType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::None => "none",
                    Self::Child => "child",
                    Self::Root => "root",
                }
            }
        }
        impl std::str::FromStr for AdFrameType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "none" => Ok(Self::None),
                    "child" => Ok(Self::Child),
                    "root" => Ok(Self::Root),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AdFrameType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AdFrameExplanation {
            #[serde(rename = "ParentIsAd")]
            ParentIsAd,
            #[serde(rename = "CreatedByAdScript")]
            CreatedByAdScript,
            #[serde(rename = "MatchedBlockingRule")]
            MatchedBlockingRule,
        }
        impl AsRef<str> for AdFrameExplanation {
            fn as_ref(&self) -> &str {
                match self {
                    Self::ParentIsAd => "ParentIsAd",
                    Self::CreatedByAdScript => "CreatedByAdScript",
                    Self::MatchedBlockingRule => "MatchedBlockingRule",
                }
            }
        }
        impl std::str::FromStr for AdFrameExplanation {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "ParentIsAd" => Ok(Self::ParentIsAd),
                    "CreatedByAdScript" => Ok(Self::CreatedByAdScript),
                    "MatchedBlockingRule" => Ok(Self::MatchedBlockingRule),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AdFrameExplanation {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Indicates whether a frame has been identified as an ad and why.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AdFrameStatus {
            pub ad_frame_type: AdFrameType,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub explanations: Option<Vec<AdFrameExplanation>>,
        }

        /// Identifies the script which caused a script or frame to be labelled as an ad.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AdScriptId {
            /// Script Id of the script which caused a script or frame to be labelled as an ad.
            pub script_id: runtime::types::ScriptId,
            /// Id of scriptId's debugger.
            pub debugger_id: runtime::types::UniqueDebuggerId,
        }

        /// Encapsulates the script ancestry and the root script filterlist rule that caused the frame to be labelled as an ad. Only created when `ancestryChain` is not empty.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AdScriptAncestry {
            /// A chain of `AdScriptId`s representing the ancestry of an ad script that led to the creation of a frame. The chain is ordered from the script itself (lower level) up to its root ancestor that was flagged by filterlist.
            pub ancestry_chain: Vec<AdScriptId>,
            /// The filterlist rule that caused the root (last) script in `ancestryChain` to be ad-tagged. Only populated if the rule is available.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub root_script_filterlist_rule: Option<String>,
        }

        /// Indicates whether the frame is a secure context and why it is the case.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SecureContextType {
            #[serde(rename = "Secure")]
            Secure,
            #[serde(rename = "SecureLocalhost")]
            SecureLocalhost,
            #[serde(rename = "InsecureScheme")]
            InsecureScheme,
            #[serde(rename = "InsecureAncestor")]
            InsecureAncestor,
        }
        impl AsRef<str> for SecureContextType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Secure => "Secure",
                    Self::SecureLocalhost => "SecureLocalhost",
                    Self::InsecureScheme => "InsecureScheme",
                    Self::InsecureAncestor => "InsecureAncestor",
                }
            }
        }
        impl std::str::FromStr for SecureContextType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Secure" => Ok(Self::Secure),
                    "SecureLocalhost" => Ok(Self::SecureLocalhost),
                    "InsecureScheme" => Ok(Self::InsecureScheme),
                    "InsecureAncestor" => Ok(Self::InsecureAncestor),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SecureContextType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Indicates whether the frame is cross-origin isolated and why it is the case.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CrossOriginIsolatedContextType {
            #[serde(rename = "Isolated")]
            Isolated,
            #[serde(rename = "NotIsolated")]
            NotIsolated,
            #[serde(rename = "NotIsolatedFeatureDisabled")]
            NotIsolatedFeatureDisabled,
        }
        impl AsRef<str> for CrossOriginIsolatedContextType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Isolated => "Isolated",
                    Self::NotIsolated => "NotIsolated",
                    Self::NotIsolatedFeatureDisabled => "NotIsolatedFeatureDisabled",
                }
            }
        }
        impl std::str::FromStr for CrossOriginIsolatedContextType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Isolated" => Ok(Self::Isolated),
                    "NotIsolated" => Ok(Self::NotIsolated),
                    "NotIsolatedFeatureDisabled" => Ok(Self::NotIsolatedFeatureDisabled),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CrossOriginIsolatedContextType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum GatedAPIFeatures {
            #[serde(rename = "SharedArrayBuffers")]
            SharedArrayBuffers,
            #[serde(rename = "SharedArrayBuffersTransferAllowed")]
            SharedArrayBuffersTransferAllowed,
            #[serde(rename = "PerformanceMeasureMemory")]
            PerformanceMeasureMemory,
            #[serde(rename = "PerformanceProfile")]
            PerformanceProfile,
        }
        impl AsRef<str> for GatedAPIFeatures {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SharedArrayBuffers => "SharedArrayBuffers",
                    Self::SharedArrayBuffersTransferAllowed => "SharedArrayBuffersTransferAllowed",
                    Self::PerformanceMeasureMemory => "PerformanceMeasureMemory",
                    Self::PerformanceProfile => "PerformanceProfile",
                }
            }
        }
        impl std::str::FromStr for GatedAPIFeatures {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SharedArrayBuffers" => Ok(Self::SharedArrayBuffers),
                    "SharedArrayBuffersTransferAllowed" => {
                        Ok(Self::SharedArrayBuffersTransferAllowed)
                    }
                    "PerformanceMeasureMemory" => Ok(Self::PerformanceMeasureMemory),
                    "PerformanceProfile" => Ok(Self::PerformanceProfile),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for GatedAPIFeatures {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// All Permissions Policy features. This enum should match the one defined in services/network/public/cpp/permissions_policy/permissions_policy_features.json5. LINT.IfChange(PermissionsPolicyFeature)
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PermissionsPolicyFeature {
            #[serde(rename = "accelerometer")]
            Accelerometer,
            #[serde(rename = "all-screens-capture")]
            AllScreensCapture,
            #[serde(rename = "ambient-light-sensor")]
            AmbientLightSensor,
            #[serde(rename = "aria-notify")]
            AriaNotify,
            #[serde(rename = "attribution-reporting")]
            AttributionReporting,
            #[serde(rename = "autofill")]
            Autofill,
            #[serde(rename = "autoplay")]
            Autoplay,
            #[serde(rename = "bluetooth")]
            Bluetooth,
            #[serde(rename = "browsing-topics")]
            BrowsingTopics,
            #[serde(rename = "camera")]
            Camera,
            #[serde(rename = "captured-surface-control")]
            CapturedSurfaceControl,
            #[serde(rename = "ch-dpr")]
            ChDpr,
            #[serde(rename = "ch-device-memory")]
            ChDeviceMemory,
            #[serde(rename = "ch-downlink")]
            ChDownlink,
            #[serde(rename = "ch-ect")]
            ChEct,
            #[serde(rename = "ch-prefers-color-scheme")]
            ChPrefersColorScheme,
            #[serde(rename = "ch-prefers-reduced-motion")]
            ChPrefersReducedMotion,
            #[serde(rename = "ch-prefers-reduced-transparency")]
            ChPrefersReducedTransparency,
            #[serde(rename = "ch-rtt")]
            ChRtt,
            #[serde(rename = "ch-save-data")]
            ChSaveData,
            #[serde(rename = "ch-ua")]
            ChUa,
            #[serde(rename = "ch-ua-arch")]
            ChUaArch,
            #[serde(rename = "ch-ua-bitness")]
            ChUaBitness,
            #[serde(rename = "ch-ua-high-entropy-values")]
            ChUaHighEntropyValues,
            #[serde(rename = "ch-ua-platform")]
            ChUaPlatform,
            #[serde(rename = "ch-ua-model")]
            ChUaModel,
            #[serde(rename = "ch-ua-mobile")]
            ChUaMobile,
            #[serde(rename = "ch-ua-form-factors")]
            ChUaFormFactors,
            #[serde(rename = "ch-ua-full-version")]
            ChUaFullVersion,
            #[serde(rename = "ch-ua-full-version-list")]
            ChUaFullVersionList,
            #[serde(rename = "ch-ua-platform-version")]
            ChUaPlatformVersion,
            #[serde(rename = "ch-ua-wow64")]
            ChUaWow64,
            #[serde(rename = "ch-viewport-height")]
            ChViewportHeight,
            #[serde(rename = "ch-viewport-width")]
            ChViewportWidth,
            #[serde(rename = "ch-width")]
            ChWidth,
            #[serde(rename = "clipboard-read")]
            ClipboardRead,
            #[serde(rename = "clipboard-write")]
            ClipboardWrite,
            #[serde(rename = "compute-pressure")]
            ComputePressure,
            #[serde(rename = "controlled-frame")]
            ControlledFrame,
            #[serde(rename = "cross-origin-isolated")]
            CrossOriginIsolated,
            #[serde(rename = "deferred-fetch")]
            DeferredFetch,
            #[serde(rename = "deferred-fetch-minimal")]
            DeferredFetchMinimal,
            #[serde(rename = "device-attributes")]
            DeviceAttributes,
            #[serde(rename = "digital-credentials-create")]
            DigitalCredentialsCreate,
            #[serde(rename = "digital-credentials-get")]
            DigitalCredentialsGet,
            #[serde(rename = "direct-sockets")]
            DirectSockets,
            #[serde(rename = "direct-sockets-multicast")]
            DirectSocketsMulticast,
            #[serde(rename = "direct-sockets-private")]
            DirectSocketsPrivate,
            #[serde(rename = "display-capture")]
            DisplayCapture,
            #[serde(rename = "document-domain")]
            DocumentDomain,
            #[serde(rename = "encrypted-media")]
            EncryptedMedia,
            #[serde(rename = "execution-while-out-of-viewport")]
            ExecutionWhileOutOfViewport,
            #[serde(rename = "execution-while-not-rendered")]
            ExecutionWhileNotRendered,
            #[serde(rename = "fenced-unpartitioned-storage-read")]
            FencedUnpartitionedStorageRead,
            #[serde(rename = "focus-without-user-activation")]
            FocusWithoutUserActivation,
            #[serde(rename = "fullscreen")]
            Fullscreen,
            #[serde(rename = "frobulate")]
            Frobulate,
            #[serde(rename = "gamepad")]
            Gamepad,
            #[serde(rename = "geolocation")]
            Geolocation,
            #[serde(rename = "gyroscope")]
            Gyroscope,
            #[serde(rename = "hid")]
            Hid,
            #[serde(rename = "identity-credentials-get")]
            IdentityCredentialsGet,
            #[serde(rename = "idle-detection")]
            IdleDetection,
            #[serde(rename = "interest-cohort")]
            InterestCohort,
            #[serde(rename = "join-ad-interest-group")]
            JoinAdInterestGroup,
            #[serde(rename = "keyboard-map")]
            KeyboardMap,
            #[serde(rename = "language-detector")]
            LanguageDetector,
            #[serde(rename = "language-model")]
            LanguageModel,
            #[serde(rename = "local-fonts")]
            LocalFonts,
            #[serde(rename = "local-network")]
            LocalNetwork,
            #[serde(rename = "local-network-access")]
            LocalNetworkAccess,
            #[serde(rename = "loopback-network")]
            LoopbackNetwork,
            #[serde(rename = "magnetometer")]
            Magnetometer,
            #[serde(rename = "manual-text")]
            ManualText,
            #[serde(rename = "media-playback-while-not-visible")]
            MediaPlaybackWhileNotVisible,
            #[serde(rename = "microphone")]
            Microphone,
            #[serde(rename = "midi")]
            Midi,
            #[serde(rename = "on-device-speech-recognition")]
            OnDeviceSpeechRecognition,
            #[serde(rename = "otp-credentials")]
            OtpCredentials,
            #[serde(rename = "payment")]
            Payment,
            #[serde(rename = "picture-in-picture")]
            PictureInPicture,
            #[serde(rename = "private-aggregation")]
            PrivateAggregation,
            #[serde(rename = "private-state-token-issuance")]
            PrivateStateTokenIssuance,
            #[serde(rename = "private-state-token-redemption")]
            PrivateStateTokenRedemption,
            #[serde(rename = "publickey-credentials-create")]
            PublickeyCredentialsCreate,
            #[serde(rename = "publickey-credentials-get")]
            PublickeyCredentialsGet,
            #[serde(rename = "record-ad-auction-events")]
            RecordAdAuctionEvents,
            #[serde(rename = "rewriter")]
            Rewriter,
            #[serde(rename = "run-ad-auction")]
            RunAdAuction,
            #[serde(rename = "screen-wake-lock")]
            ScreenWakeLock,
            #[serde(rename = "serial")]
            Serial,
            #[serde(rename = "shared-storage")]
            SharedStorage,
            #[serde(rename = "shared-storage-select-url")]
            SharedStorageSelectUrl,
            #[serde(rename = "smart-card")]
            SmartCard,
            #[serde(rename = "speaker-selection")]
            SpeakerSelection,
            #[serde(rename = "storage-access")]
            StorageAccess,
            #[serde(rename = "sub-apps")]
            SubApps,
            #[serde(rename = "summarizer")]
            Summarizer,
            #[serde(rename = "sync-xhr")]
            SyncXhr,
            #[serde(rename = "translator")]
            Translator,
            #[serde(rename = "unload")]
            Unload,
            #[serde(rename = "usb")]
            Usb,
            #[serde(rename = "usb-unrestricted")]
            UsbUnrestricted,
            #[serde(rename = "vertical-scroll")]
            VerticalScroll,
            #[serde(rename = "web-app-installation")]
            WebAppInstallation,
            #[serde(rename = "web-printing")]
            WebPrinting,
            #[serde(rename = "web-share")]
            WebShare,
            #[serde(rename = "window-management")]
            WindowManagement,
            #[serde(rename = "writer")]
            Writer,
            #[serde(rename = "xr-spatial-tracking")]
            XrSpatialTracking,
        }
        impl AsRef<str> for PermissionsPolicyFeature {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Accelerometer => "accelerometer",
                    Self::AllScreensCapture => "all-screens-capture",
                    Self::AmbientLightSensor => "ambient-light-sensor",
                    Self::AriaNotify => "aria-notify",
                    Self::AttributionReporting => "attribution-reporting",
                    Self::Autofill => "autofill",
                    Self::Autoplay => "autoplay",
                    Self::Bluetooth => "bluetooth",
                    Self::BrowsingTopics => "browsing-topics",
                    Self::Camera => "camera",
                    Self::CapturedSurfaceControl => "captured-surface-control",
                    Self::ChDpr => "ch-dpr",
                    Self::ChDeviceMemory => "ch-device-memory",
                    Self::ChDownlink => "ch-downlink",
                    Self::ChEct => "ch-ect",
                    Self::ChPrefersColorScheme => "ch-prefers-color-scheme",
                    Self::ChPrefersReducedMotion => "ch-prefers-reduced-motion",
                    Self::ChPrefersReducedTransparency => "ch-prefers-reduced-transparency",
                    Self::ChRtt => "ch-rtt",
                    Self::ChSaveData => "ch-save-data",
                    Self::ChUa => "ch-ua",
                    Self::ChUaArch => "ch-ua-arch",
                    Self::ChUaBitness => "ch-ua-bitness",
                    Self::ChUaHighEntropyValues => "ch-ua-high-entropy-values",
                    Self::ChUaPlatform => "ch-ua-platform",
                    Self::ChUaModel => "ch-ua-model",
                    Self::ChUaMobile => "ch-ua-mobile",
                    Self::ChUaFormFactors => "ch-ua-form-factors",
                    Self::ChUaFullVersion => "ch-ua-full-version",
                    Self::ChUaFullVersionList => "ch-ua-full-version-list",
                    Self::ChUaPlatformVersion => "ch-ua-platform-version",
                    Self::ChUaWow64 => "ch-ua-wow64",
                    Self::ChViewportHeight => "ch-viewport-height",
                    Self::ChViewportWidth => "ch-viewport-width",
                    Self::ChWidth => "ch-width",
                    Self::ClipboardRead => "clipboard-read",
                    Self::ClipboardWrite => "clipboard-write",
                    Self::ComputePressure => "compute-pressure",
                    Self::ControlledFrame => "controlled-frame",
                    Self::CrossOriginIsolated => "cross-origin-isolated",
                    Self::DeferredFetch => "deferred-fetch",
                    Self::DeferredFetchMinimal => "deferred-fetch-minimal",
                    Self::DeviceAttributes => "device-attributes",
                    Self::DigitalCredentialsCreate => "digital-credentials-create",
                    Self::DigitalCredentialsGet => "digital-credentials-get",
                    Self::DirectSockets => "direct-sockets",
                    Self::DirectSocketsMulticast => "direct-sockets-multicast",
                    Self::DirectSocketsPrivate => "direct-sockets-private",
                    Self::DisplayCapture => "display-capture",
                    Self::DocumentDomain => "document-domain",
                    Self::EncryptedMedia => "encrypted-media",
                    Self::ExecutionWhileOutOfViewport => "execution-while-out-of-viewport",
                    Self::ExecutionWhileNotRendered => "execution-while-not-rendered",
                    Self::FencedUnpartitionedStorageRead => "fenced-unpartitioned-storage-read",
                    Self::FocusWithoutUserActivation => "focus-without-user-activation",
                    Self::Fullscreen => "fullscreen",
                    Self::Frobulate => "frobulate",
                    Self::Gamepad => "gamepad",
                    Self::Geolocation => "geolocation",
                    Self::Gyroscope => "gyroscope",
                    Self::Hid => "hid",
                    Self::IdentityCredentialsGet => "identity-credentials-get",
                    Self::IdleDetection => "idle-detection",
                    Self::InterestCohort => "interest-cohort",
                    Self::JoinAdInterestGroup => "join-ad-interest-group",
                    Self::KeyboardMap => "keyboard-map",
                    Self::LanguageDetector => "language-detector",
                    Self::LanguageModel => "language-model",
                    Self::LocalFonts => "local-fonts",
                    Self::LocalNetwork => "local-network",
                    Self::LocalNetworkAccess => "local-network-access",
                    Self::LoopbackNetwork => "loopback-network",
                    Self::Magnetometer => "magnetometer",
                    Self::ManualText => "manual-text",
                    Self::MediaPlaybackWhileNotVisible => "media-playback-while-not-visible",
                    Self::Microphone => "microphone",
                    Self::Midi => "midi",
                    Self::OnDeviceSpeechRecognition => "on-device-speech-recognition",
                    Self::OtpCredentials => "otp-credentials",
                    Self::Payment => "payment",
                    Self::PictureInPicture => "picture-in-picture",
                    Self::PrivateAggregation => "private-aggregation",
                    Self::PrivateStateTokenIssuance => "private-state-token-issuance",
                    Self::PrivateStateTokenRedemption => "private-state-token-redemption",
                    Self::PublickeyCredentialsCreate => "publickey-credentials-create",
                    Self::PublickeyCredentialsGet => "publickey-credentials-get",
                    Self::RecordAdAuctionEvents => "record-ad-auction-events",
                    Self::Rewriter => "rewriter",
                    Self::RunAdAuction => "run-ad-auction",
                    Self::ScreenWakeLock => "screen-wake-lock",
                    Self::Serial => "serial",
                    Self::SharedStorage => "shared-storage",
                    Self::SharedStorageSelectUrl => "shared-storage-select-url",
                    Self::SmartCard => "smart-card",
                    Self::SpeakerSelection => "speaker-selection",
                    Self::StorageAccess => "storage-access",
                    Self::SubApps => "sub-apps",
                    Self::Summarizer => "summarizer",
                    Self::SyncXhr => "sync-xhr",
                    Self::Translator => "translator",
                    Self::Unload => "unload",
                    Self::Usb => "usb",
                    Self::UsbUnrestricted => "usb-unrestricted",
                    Self::VerticalScroll => "vertical-scroll",
                    Self::WebAppInstallation => "web-app-installation",
                    Self::WebPrinting => "web-printing",
                    Self::WebShare => "web-share",
                    Self::WindowManagement => "window-management",
                    Self::Writer => "writer",
                    Self::XrSpatialTracking => "xr-spatial-tracking",
                }
            }
        }
        impl std::str::FromStr for PermissionsPolicyFeature {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "accelerometer" => Ok(Self::Accelerometer),
                    "all-screens-capture" => Ok(Self::AllScreensCapture),
                    "ambient-light-sensor" => Ok(Self::AmbientLightSensor),
                    "aria-notify" => Ok(Self::AriaNotify),
                    "attribution-reporting" => Ok(Self::AttributionReporting),
                    "autofill" => Ok(Self::Autofill),
                    "autoplay" => Ok(Self::Autoplay),
                    "bluetooth" => Ok(Self::Bluetooth),
                    "browsing-topics" => Ok(Self::BrowsingTopics),
                    "camera" => Ok(Self::Camera),
                    "captured-surface-control" => Ok(Self::CapturedSurfaceControl),
                    "ch-dpr" => Ok(Self::ChDpr),
                    "ch-device-memory" => Ok(Self::ChDeviceMemory),
                    "ch-downlink" => Ok(Self::ChDownlink),
                    "ch-ect" => Ok(Self::ChEct),
                    "ch-prefers-color-scheme" => Ok(Self::ChPrefersColorScheme),
                    "ch-prefers-reduced-motion" => Ok(Self::ChPrefersReducedMotion),
                    "ch-prefers-reduced-transparency" => Ok(Self::ChPrefersReducedTransparency),
                    "ch-rtt" => Ok(Self::ChRtt),
                    "ch-save-data" => Ok(Self::ChSaveData),
                    "ch-ua" => Ok(Self::ChUa),
                    "ch-ua-arch" => Ok(Self::ChUaArch),
                    "ch-ua-bitness" => Ok(Self::ChUaBitness),
                    "ch-ua-high-entropy-values" => Ok(Self::ChUaHighEntropyValues),
                    "ch-ua-platform" => Ok(Self::ChUaPlatform),
                    "ch-ua-model" => Ok(Self::ChUaModel),
                    "ch-ua-mobile" => Ok(Self::ChUaMobile),
                    "ch-ua-form-factors" => Ok(Self::ChUaFormFactors),
                    "ch-ua-full-version" => Ok(Self::ChUaFullVersion),
                    "ch-ua-full-version-list" => Ok(Self::ChUaFullVersionList),
                    "ch-ua-platform-version" => Ok(Self::ChUaPlatformVersion),
                    "ch-ua-wow64" => Ok(Self::ChUaWow64),
                    "ch-viewport-height" => Ok(Self::ChViewportHeight),
                    "ch-viewport-width" => Ok(Self::ChViewportWidth),
                    "ch-width" => Ok(Self::ChWidth),
                    "clipboard-read" => Ok(Self::ClipboardRead),
                    "clipboard-write" => Ok(Self::ClipboardWrite),
                    "compute-pressure" => Ok(Self::ComputePressure),
                    "controlled-frame" => Ok(Self::ControlledFrame),
                    "cross-origin-isolated" => Ok(Self::CrossOriginIsolated),
                    "deferred-fetch" => Ok(Self::DeferredFetch),
                    "deferred-fetch-minimal" => Ok(Self::DeferredFetchMinimal),
                    "device-attributes" => Ok(Self::DeviceAttributes),
                    "digital-credentials-create" => Ok(Self::DigitalCredentialsCreate),
                    "digital-credentials-get" => Ok(Self::DigitalCredentialsGet),
                    "direct-sockets" => Ok(Self::DirectSockets),
                    "direct-sockets-multicast" => Ok(Self::DirectSocketsMulticast),
                    "direct-sockets-private" => Ok(Self::DirectSocketsPrivate),
                    "display-capture" => Ok(Self::DisplayCapture),
                    "document-domain" => Ok(Self::DocumentDomain),
                    "encrypted-media" => Ok(Self::EncryptedMedia),
                    "execution-while-out-of-viewport" => Ok(Self::ExecutionWhileOutOfViewport),
                    "execution-while-not-rendered" => Ok(Self::ExecutionWhileNotRendered),
                    "fenced-unpartitioned-storage-read" => Ok(Self::FencedUnpartitionedStorageRead),
                    "focus-without-user-activation" => Ok(Self::FocusWithoutUserActivation),
                    "fullscreen" => Ok(Self::Fullscreen),
                    "frobulate" => Ok(Self::Frobulate),
                    "gamepad" => Ok(Self::Gamepad),
                    "geolocation" => Ok(Self::Geolocation),
                    "gyroscope" => Ok(Self::Gyroscope),
                    "hid" => Ok(Self::Hid),
                    "identity-credentials-get" => Ok(Self::IdentityCredentialsGet),
                    "idle-detection" => Ok(Self::IdleDetection),
                    "interest-cohort" => Ok(Self::InterestCohort),
                    "join-ad-interest-group" => Ok(Self::JoinAdInterestGroup),
                    "keyboard-map" => Ok(Self::KeyboardMap),
                    "language-detector" => Ok(Self::LanguageDetector),
                    "language-model" => Ok(Self::LanguageModel),
                    "local-fonts" => Ok(Self::LocalFonts),
                    "local-network" => Ok(Self::LocalNetwork),
                    "local-network-access" => Ok(Self::LocalNetworkAccess),
                    "loopback-network" => Ok(Self::LoopbackNetwork),
                    "magnetometer" => Ok(Self::Magnetometer),
                    "manual-text" => Ok(Self::ManualText),
                    "media-playback-while-not-visible" => Ok(Self::MediaPlaybackWhileNotVisible),
                    "microphone" => Ok(Self::Microphone),
                    "midi" => Ok(Self::Midi),
                    "on-device-speech-recognition" => Ok(Self::OnDeviceSpeechRecognition),
                    "otp-credentials" => Ok(Self::OtpCredentials),
                    "payment" => Ok(Self::Payment),
                    "picture-in-picture" => Ok(Self::PictureInPicture),
                    "private-aggregation" => Ok(Self::PrivateAggregation),
                    "private-state-token-issuance" => Ok(Self::PrivateStateTokenIssuance),
                    "private-state-token-redemption" => Ok(Self::PrivateStateTokenRedemption),
                    "publickey-credentials-create" => Ok(Self::PublickeyCredentialsCreate),
                    "publickey-credentials-get" => Ok(Self::PublickeyCredentialsGet),
                    "record-ad-auction-events" => Ok(Self::RecordAdAuctionEvents),
                    "rewriter" => Ok(Self::Rewriter),
                    "run-ad-auction" => Ok(Self::RunAdAuction),
                    "screen-wake-lock" => Ok(Self::ScreenWakeLock),
                    "serial" => Ok(Self::Serial),
                    "shared-storage" => Ok(Self::SharedStorage),
                    "shared-storage-select-url" => Ok(Self::SharedStorageSelectUrl),
                    "smart-card" => Ok(Self::SmartCard),
                    "speaker-selection" => Ok(Self::SpeakerSelection),
                    "storage-access" => Ok(Self::StorageAccess),
                    "sub-apps" => Ok(Self::SubApps),
                    "summarizer" => Ok(Self::Summarizer),
                    "sync-xhr" => Ok(Self::SyncXhr),
                    "translator" => Ok(Self::Translator),
                    "unload" => Ok(Self::Unload),
                    "usb" => Ok(Self::Usb),
                    "usb-unrestricted" => Ok(Self::UsbUnrestricted),
                    "vertical-scroll" => Ok(Self::VerticalScroll),
                    "web-app-installation" => Ok(Self::WebAppInstallation),
                    "web-printing" => Ok(Self::WebPrinting),
                    "web-share" => Ok(Self::WebShare),
                    "window-management" => Ok(Self::WindowManagement),
                    "writer" => Ok(Self::Writer),
                    "xr-spatial-tracking" => Ok(Self::XrSpatialTracking),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PermissionsPolicyFeature {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Reason for a permissions policy feature to be disabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PermissionsPolicyBlockReason {
            #[serde(rename = "Header")]
            Header,
            #[serde(rename = "IframeAttribute")]
            IframeAttribute,
            #[serde(rename = "InFencedFrameTree")]
            InFencedFrameTree,
            #[serde(rename = "InIsolatedApp")]
            InIsolatedApp,
        }
        impl AsRef<str> for PermissionsPolicyBlockReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Header => "Header",
                    Self::IframeAttribute => "IframeAttribute",
                    Self::InFencedFrameTree => "InFencedFrameTree",
                    Self::InIsolatedApp => "InIsolatedApp",
                }
            }
        }
        impl std::str::FromStr for PermissionsPolicyBlockReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Header" => Ok(Self::Header),
                    "IframeAttribute" => Ok(Self::IframeAttribute),
                    "InFencedFrameTree" => Ok(Self::InFencedFrameTree),
                    "InIsolatedApp" => Ok(Self::InIsolatedApp),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PermissionsPolicyBlockReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PermissionsPolicyBlockLocator {
            pub frame_id: FrameId,
            pub block_reason: PermissionsPolicyBlockReason,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PermissionsPolicyFeatureState {
            pub feature: PermissionsPolicyFeature,
            pub allowed: bool,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub locator: Option<PermissionsPolicyBlockLocator>,
        }

        /// Origin Trial(https://www.chromium.org/blink/origin-trials) support. Status for an Origin Trial token.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum OriginTrialTokenStatus {
            #[serde(rename = "Success")]
            Success,
            #[serde(rename = "NotSupported")]
            NotSupported,
            #[serde(rename = "Insecure")]
            Insecure,
            #[serde(rename = "Expired")]
            Expired,
            #[serde(rename = "WrongOrigin")]
            WrongOrigin,
            #[serde(rename = "InvalidSignature")]
            InvalidSignature,
            #[serde(rename = "Malformed")]
            Malformed,
            #[serde(rename = "WrongVersion")]
            WrongVersion,
            #[serde(rename = "FeatureDisabled")]
            FeatureDisabled,
            #[serde(rename = "TokenDisabled")]
            TokenDisabled,
            #[serde(rename = "FeatureDisabledForUser")]
            FeatureDisabledForUser,
            #[serde(rename = "UnknownTrial")]
            UnknownTrial,
        }
        impl AsRef<str> for OriginTrialTokenStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Success => "Success",
                    Self::NotSupported => "NotSupported",
                    Self::Insecure => "Insecure",
                    Self::Expired => "Expired",
                    Self::WrongOrigin => "WrongOrigin",
                    Self::InvalidSignature => "InvalidSignature",
                    Self::Malformed => "Malformed",
                    Self::WrongVersion => "WrongVersion",
                    Self::FeatureDisabled => "FeatureDisabled",
                    Self::TokenDisabled => "TokenDisabled",
                    Self::FeatureDisabledForUser => "FeatureDisabledForUser",
                    Self::UnknownTrial => "UnknownTrial",
                }
            }
        }
        impl std::str::FromStr for OriginTrialTokenStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Success" => Ok(Self::Success),
                    "NotSupported" => Ok(Self::NotSupported),
                    "Insecure" => Ok(Self::Insecure),
                    "Expired" => Ok(Self::Expired),
                    "WrongOrigin" => Ok(Self::WrongOrigin),
                    "InvalidSignature" => Ok(Self::InvalidSignature),
                    "Malformed" => Ok(Self::Malformed),
                    "WrongVersion" => Ok(Self::WrongVersion),
                    "FeatureDisabled" => Ok(Self::FeatureDisabled),
                    "TokenDisabled" => Ok(Self::TokenDisabled),
                    "FeatureDisabledForUser" => Ok(Self::FeatureDisabledForUser),
                    "UnknownTrial" => Ok(Self::UnknownTrial),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for OriginTrialTokenStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Status for an Origin Trial.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum OriginTrialStatus {
            #[serde(rename = "Enabled")]
            Enabled,
            #[serde(rename = "ValidTokenNotProvided")]
            ValidTokenNotProvided,
            #[serde(rename = "OSNotSupported")]
            OsNotSupported,
            #[serde(rename = "TrialNotAllowed")]
            TrialNotAllowed,
        }
        impl AsRef<str> for OriginTrialStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Enabled => "Enabled",
                    Self::ValidTokenNotProvided => "ValidTokenNotProvided",
                    Self::OsNotSupported => "OSNotSupported",
                    Self::TrialNotAllowed => "TrialNotAllowed",
                }
            }
        }
        impl std::str::FromStr for OriginTrialStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Enabled" => Ok(Self::Enabled),
                    "ValidTokenNotProvided" => Ok(Self::ValidTokenNotProvided),
                    "OSNotSupported" => Ok(Self::OsNotSupported),
                    "TrialNotAllowed" => Ok(Self::TrialNotAllowed),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for OriginTrialStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum OriginTrialUsageRestriction {
            #[serde(rename = "None")]
            None,
            #[serde(rename = "Subset")]
            Subset,
        }
        impl AsRef<str> for OriginTrialUsageRestriction {
            fn as_ref(&self) -> &str {
                match self {
                    Self::None => "None",
                    Self::Subset => "Subset",
                }
            }
        }
        impl std::str::FromStr for OriginTrialUsageRestriction {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "None" => Ok(Self::None),
                    "Subset" => Ok(Self::Subset),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for OriginTrialUsageRestriction {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OriginTrialToken {
            pub origin: String,
            pub match_sub_domains: bool,
            pub trial_name: String,
            pub expiry_time: network::types::TimeSinceEpoch,
            pub is_third_party: bool,
            pub usage_restriction: OriginTrialUsageRestriction,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OriginTrialTokenWithStatus {
            pub raw_token_text: String,
            /// `parsedToken` is present only when the token is extractable and parsable.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parsed_token: Option<OriginTrialToken>,
            pub status: OriginTrialTokenStatus,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OriginTrial {
            pub trial_name: String,
            pub status: OriginTrialStatus,
            pub tokens_with_status: Vec<OriginTrialTokenWithStatus>,
        }

        /// Additional information about the frame document's security origin.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SecurityOriginDetails {
            /// Indicates whether the frame document's security origin is one of the local hostnames (e.g. "localhost") or IP addresses (IPv4 127.0.0.0/8 or IPv6 ::1).
            pub is_localhost: bool,
        }

        /// Information about the Frame on the page.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Frame {
            /// Frame unique identifier.
            pub id: FrameId,
            /// Parent frame identifier.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_id: Option<FrameId>,
            /// Identifier of the loader associated with this frame.
            pub loader_id: network::types::LoaderId,
            /// Frame's name as specified in the tag.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            /// Frame document's URL without fragment.
            pub url: String,
            /// Frame document's URL fragment including the '#'.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url_fragment: Option<String>,
            /// Frame document's registered domain, taking the public suffixes list into account. Extracted from the Frame's url. Example URLs: http://www.google.com/file.html -> "google.com"        http://a.b.co.uk/file.html   -> "b.co.uk"
            /// **EXPERIMENTAL**
            pub domain_and_registry: String,
            /// Frame document's security origin.
            pub security_origin: String,
            /// Additional details about the frame document's security origin.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub security_origin_details: Option<SecurityOriginDetails>,
            /// Frame document's mimeType as determined by the browser.
            pub mime_type: String,
            /// If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unreachable_url: Option<String>,
            /// Indicates whether this frame was tagged as an ad and why.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ad_frame_status: Option<AdFrameStatus>,
            /// Indicates whether the main document is a secure context and explains why that is the case.
            /// **EXPERIMENTAL**
            pub secure_context_type: SecureContextType,
            /// Indicates whether this is a cross origin isolated context.
            /// **EXPERIMENTAL**
            pub cross_origin_isolated_context_type: CrossOriginIsolatedContextType,
            /// Indicated which gated APIs / features are available.
            /// **EXPERIMENTAL**
            #[serde(rename = "gatedAPIFeatures")]
            pub gated_api_features: Vec<GatedAPIFeatures>,
        }

        /// Information about the Resource on the page.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameResource {
            /// Resource URL.
            pub url: String,
            /// Type of this resource.
            pub type_: network::types::ResourceType,
            /// Resource mimeType as determined by the browser.
            pub mime_type: String,
            /// last-modified timestamp as reported by server.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub last_modified: Option<network::types::TimeSinceEpoch>,
            /// Resource content size.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub content_size: Option<f64>,
            /// True if the resource failed to load.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub failed: Option<bool>,
            /// True if the resource was canceled during loading.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub canceled: Option<bool>,
        }

        /// Information about the Frame hierarchy along with their cached resources.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameResourceTree {
            /// Frame information for this tree item.
            pub frame: Frame,
            /// Child frames.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub child_frames: Option<Vec<FrameResourceTree>>,
            /// Information about frame resources.
            pub resources: Vec<FrameResource>,
        }

        /// Information about the Frame hierarchy.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameTree {
            /// Frame information for this tree item.
            pub frame: Frame,
            /// Child frames.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub child_frames: Option<Vec<FrameTree>>,
        }

        /// Unique script identifier.
        pub type ScriptIdentifier = String;

        /// Transition type.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum TransitionType {
            #[serde(rename = "link")]
            Link,
            #[serde(rename = "typed")]
            Typed,
            #[serde(rename = "address_bar")]
            AddressBar,
            #[serde(rename = "auto_bookmark")]
            AutoBookmark,
            #[serde(rename = "auto_subframe")]
            AutoSubframe,
            #[serde(rename = "manual_subframe")]
            ManualSubframe,
            #[serde(rename = "generated")]
            Generated,
            #[serde(rename = "auto_toplevel")]
            AutoToplevel,
            #[serde(rename = "form_submit")]
            FormSubmit,
            #[serde(rename = "reload")]
            Reload,
            #[serde(rename = "keyword")]
            Keyword,
            #[serde(rename = "keyword_generated")]
            KeywordGenerated,
            #[serde(rename = "other")]
            Other,
        }
        impl AsRef<str> for TransitionType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Link => "link",
                    Self::Typed => "typed",
                    Self::AddressBar => "address_bar",
                    Self::AutoBookmark => "auto_bookmark",
                    Self::AutoSubframe => "auto_subframe",
                    Self::ManualSubframe => "manual_subframe",
                    Self::Generated => "generated",
                    Self::AutoToplevel => "auto_toplevel",
                    Self::FormSubmit => "form_submit",
                    Self::Reload => "reload",
                    Self::Keyword => "keyword",
                    Self::KeywordGenerated => "keyword_generated",
                    Self::Other => "other",
                }
            }
        }
        impl std::str::FromStr for TransitionType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "link" => Ok(Self::Link),
                    "typed" => Ok(Self::Typed),
                    "address_bar" => Ok(Self::AddressBar),
                    "auto_bookmark" => Ok(Self::AutoBookmark),
                    "auto_subframe" => Ok(Self::AutoSubframe),
                    "manual_subframe" => Ok(Self::ManualSubframe),
                    "generated" => Ok(Self::Generated),
                    "auto_toplevel" => Ok(Self::AutoToplevel),
                    "form_submit" => Ok(Self::FormSubmit),
                    "reload" => Ok(Self::Reload),
                    "keyword" => Ok(Self::Keyword),
                    "keyword_generated" => Ok(Self::KeywordGenerated),
                    "other" => Ok(Self::Other),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for TransitionType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Navigation history entry.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NavigationEntry {
            /// Unique id of the navigation history entry.
            pub id: i64,
            /// URL of the navigation history entry.
            pub url: String,
            /// URL that the user typed in the url bar.
            #[serde(rename = "userTypedURL")]
            pub user_typed_url: String,
            /// Title of the navigation history entry.
            pub title: String,
            /// Transition type.
            pub transition_type: TransitionType,
        }

        /// Screencast frame metadata.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreencastFrameMetadata {
            /// Top offset in DIP.
            pub offset_top: f64,
            /// Page scale factor.
            pub page_scale_factor: f64,
            /// Device screen width in DIP.
            pub device_width: f64,
            /// Device screen height in DIP.
            pub device_height: f64,
            /// Position of horizontal scroll in CSS pixels.
            pub scroll_offset_x: f64,
            /// Position of vertical scroll in CSS pixels.
            pub scroll_offset_y: f64,
            /// Frame swap timestamp.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timestamp: Option<network::types::TimeSinceEpoch>,
        }

        /// Javascript dialog type.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum DialogType {
            #[serde(rename = "alert")]
            Alert,
            #[serde(rename = "confirm")]
            Confirm,
            #[serde(rename = "prompt")]
            Prompt,
            #[serde(rename = "beforeunload")]
            Beforeunload,
        }
        impl AsRef<str> for DialogType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Alert => "alert",
                    Self::Confirm => "confirm",
                    Self::Prompt => "prompt",
                    Self::Beforeunload => "beforeunload",
                }
            }
        }
        impl std::str::FromStr for DialogType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "alert" => Ok(Self::Alert),
                    "confirm" => Ok(Self::Confirm),
                    "prompt" => Ok(Self::Prompt),
                    "beforeunload" => Ok(Self::Beforeunload),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for DialogType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Error while paring app manifest.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AppManifestError {
            /// Error message.
            pub message: String,
            /// If critical, this is a non-recoverable parse error.
            pub critical: i64,
            /// Error line.
            pub line: i64,
            /// Error column.
            pub column: i64,
        }

        /// Parsed app manifest properties.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AppManifestParsedProperties {
            /// Computed scope value
            pub scope: String,
        }

        /// Layout viewport position and dimensions.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LayoutViewport {
            /// Horizontal offset relative to the document (CSS pixels).
            pub page_x: i64,
            /// Vertical offset relative to the document (CSS pixels).
            pub page_y: i64,
            /// Width (CSS pixels), excludes scrollbar if present.
            pub client_width: i64,
            /// Height (CSS pixels), excludes scrollbar if present.
            pub client_height: i64,
        }

        /// Visual viewport position, dimensions, and scale.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct VisualViewport {
            /// Horizontal offset relative to the layout viewport (CSS pixels).
            pub offset_x: f64,
            /// Vertical offset relative to the layout viewport (CSS pixels).
            pub offset_y: f64,
            /// Horizontal offset relative to the document (CSS pixels).
            pub page_x: f64,
            /// Vertical offset relative to the document (CSS pixels).
            pub page_y: f64,
            /// Width (CSS pixels), excludes scrollbar if present.
            pub client_width: f64,
            /// Height (CSS pixels), excludes scrollbar if present.
            pub client_height: f64,
            /// Scale relative to the ideal viewport (size at width=device-width).
            pub scale: f64,
            /// Page zoom factor (CSS to device independent pixels ratio).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub zoom: Option<f64>,
        }

        /// Viewport for capturing screenshot.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Viewport {
            /// X offset in device independent pixels (dip).
            pub x: f64,
            /// Y offset in device independent pixels (dip).
            pub y: f64,
            /// Rectangle width in device independent pixels (dip).
            pub width: f64,
            /// Rectangle height in device independent pixels (dip).
            pub height: f64,
            /// Page scale factor.
            pub scale: f64,
        }

        /// Generic font families collection.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FontFamilies {
            /// The standard font-family.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub standard: Option<String>,
            /// The fixed font-family.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub fixed: Option<String>,
            /// The serif font-family.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub serif: Option<String>,
            /// The sansSerif font-family.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sans_serif: Option<String>,
            /// The cursive font-family.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cursive: Option<String>,
            /// The fantasy font-family.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub fantasy: Option<String>,
            /// The math font-family.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub math: Option<String>,
        }

        /// Font families collection for a script.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScriptFontFamilies {
            /// Name of the script which these font families are defined for.
            pub script: String,
            /// Generic font families collection for the script.
            pub font_families: FontFamilies,
        }

        /// Default font sizes.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FontSizes {
            /// Default standard font size.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub standard: Option<i64>,
            /// Default fixed font size.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub fixed: Option<i64>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ClientNavigationReason {
            #[serde(rename = "anchorClick")]
            AnchorClick,
            #[serde(rename = "formSubmissionGet")]
            FormSubmissionGet,
            #[serde(rename = "formSubmissionPost")]
            FormSubmissionPost,
            #[serde(rename = "httpHeaderRefresh")]
            HttpHeaderRefresh,
            #[serde(rename = "initialFrameNavigation")]
            InitialFrameNavigation,
            #[serde(rename = "metaTagRefresh")]
            MetaTagRefresh,
            #[serde(rename = "other")]
            Other,
            #[serde(rename = "pageBlockInterstitial")]
            PageBlockInterstitial,
            #[serde(rename = "reload")]
            Reload,
            #[serde(rename = "scriptInitiated")]
            ScriptInitiated,
        }
        impl AsRef<str> for ClientNavigationReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::AnchorClick => "anchorClick",
                    Self::FormSubmissionGet => "formSubmissionGet",
                    Self::FormSubmissionPost => "formSubmissionPost",
                    Self::HttpHeaderRefresh => "httpHeaderRefresh",
                    Self::InitialFrameNavigation => "initialFrameNavigation",
                    Self::MetaTagRefresh => "metaTagRefresh",
                    Self::Other => "other",
                    Self::PageBlockInterstitial => "pageBlockInterstitial",
                    Self::Reload => "reload",
                    Self::ScriptInitiated => "scriptInitiated",
                }
            }
        }
        impl std::str::FromStr for ClientNavigationReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "anchorClick" => Ok(Self::AnchorClick),
                    "formSubmissionGet" => Ok(Self::FormSubmissionGet),
                    "formSubmissionPost" => Ok(Self::FormSubmissionPost),
                    "httpHeaderRefresh" => Ok(Self::HttpHeaderRefresh),
                    "initialFrameNavigation" => Ok(Self::InitialFrameNavigation),
                    "metaTagRefresh" => Ok(Self::MetaTagRefresh),
                    "other" => Ok(Self::Other),
                    "pageBlockInterstitial" => Ok(Self::PageBlockInterstitial),
                    "reload" => Ok(Self::Reload),
                    "scriptInitiated" => Ok(Self::ScriptInitiated),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ClientNavigationReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ClientNavigationDisposition {
            #[serde(rename = "currentTab")]
            CurrentTab,
            #[serde(rename = "newTab")]
            NewTab,
            #[serde(rename = "newWindow")]
            NewWindow,
            #[serde(rename = "download")]
            Download,
        }
        impl AsRef<str> for ClientNavigationDisposition {
            fn as_ref(&self) -> &str {
                match self {
                    Self::CurrentTab => "currentTab",
                    Self::NewTab => "newTab",
                    Self::NewWindow => "newWindow",
                    Self::Download => "download",
                }
            }
        }
        impl std::str::FromStr for ClientNavigationDisposition {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "currentTab" => Ok(Self::CurrentTab),
                    "newTab" => Ok(Self::NewTab),
                    "newWindow" => Ok(Self::NewWindow),
                    "download" => Ok(Self::Download),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ClientNavigationDisposition {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InstallabilityErrorArgument {
            /// Argument name (e.g. name:'minimum-icon-size-in-pixels').
            pub name: String,
            /// Argument value (e.g. value:'64').
            pub value: String,
        }

        /// The installability error
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InstallabilityError {
            /// The error id (e.g. 'manifest-missing-suitable-icon').
            pub error_id: String,
            /// The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
            pub error_arguments: Vec<InstallabilityErrorArgument>,
        }

        /// The referring-policy used for the navigation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ReferrerPolicy {
            #[serde(rename = "noReferrer")]
            NoReferrer,
            #[serde(rename = "noReferrerWhenDowngrade")]
            NoReferrerWhenDowngrade,
            #[serde(rename = "origin")]
            Origin,
            #[serde(rename = "originWhenCrossOrigin")]
            OriginWhenCrossOrigin,
            #[serde(rename = "sameOrigin")]
            SameOrigin,
            #[serde(rename = "strictOrigin")]
            StrictOrigin,
            #[serde(rename = "strictOriginWhenCrossOrigin")]
            StrictOriginWhenCrossOrigin,
            #[serde(rename = "unsafeUrl")]
            UnsafeUrl,
        }
        impl AsRef<str> for ReferrerPolicy {
            fn as_ref(&self) -> &str {
                match self {
                    Self::NoReferrer => "noReferrer",
                    Self::NoReferrerWhenDowngrade => "noReferrerWhenDowngrade",
                    Self::Origin => "origin",
                    Self::OriginWhenCrossOrigin => "originWhenCrossOrigin",
                    Self::SameOrigin => "sameOrigin",
                    Self::StrictOrigin => "strictOrigin",
                    Self::StrictOriginWhenCrossOrigin => "strictOriginWhenCrossOrigin",
                    Self::UnsafeUrl => "unsafeUrl",
                }
            }
        }
        impl std::str::FromStr for ReferrerPolicy {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "noReferrer" => Ok(Self::NoReferrer),
                    "noReferrerWhenDowngrade" => Ok(Self::NoReferrerWhenDowngrade),
                    "origin" => Ok(Self::Origin),
                    "originWhenCrossOrigin" => Ok(Self::OriginWhenCrossOrigin),
                    "sameOrigin" => Ok(Self::SameOrigin),
                    "strictOrigin" => Ok(Self::StrictOrigin),
                    "strictOriginWhenCrossOrigin" => Ok(Self::StrictOriginWhenCrossOrigin),
                    "unsafeUrl" => Ok(Self::UnsafeUrl),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ReferrerPolicy {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Per-script compilation cache parameters for `Page.produceCompilationCache`
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CompilationCacheParams {
            /// The URL of the script to produce a compilation cache entry for.
            pub url: String,
            /// A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub eager: Option<bool>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FileFilter {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accepts: Option<Vec<String>>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FileHandler {
            pub action: String,
            pub name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub icons: Option<Vec<ImageResource>>,
            /// Mimic a map, name is the key, accepts is the value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accepts: Option<Vec<FileFilter>>,
            /// Won't repeat the enums, using string for easy comparison. Same as the other enums below.
            pub launch_type: String,
        }

        /// The image definition used in both icon and screenshot.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ImageResource {
            /// The src field in the definition, but changing to url in favor of consistency.
            pub url: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sizes: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub type_: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LaunchHandler {
            pub client_mode: String,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ProtocolHandler {
            pub protocol: String,
            pub url: String,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RelatedApplication {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub id: Option<String>,
            pub url: String,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScopeExtension {
            /// Instead of using tuple, this field always returns the serialized string for easy understanding and comparison.
            pub origin: String,
            pub has_origin_wildcard: bool,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Screenshot {
            pub image: ImageResource,
            pub form_factor: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub label: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ShareTarget {
            pub action: String,
            pub method: String,
            pub enctype: String,
            /// Embed the ShareTargetParams
            #[serde(skip_serializing_if = "Option::is_none")]
            pub title: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub text: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub files: Option<Vec<FileFilter>>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Shortcut {
            pub name: String,
            pub url: String,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WebAppManifest {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub background_color: Option<String>,
            /// The extra description provided by the manifest.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub description: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dir: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub display: Option<String>,
            /// The overrided display mode controlled by the user.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub display_overrides: Option<Vec<String>>,
            /// The handlers to open files.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub file_handlers: Option<Vec<FileHandler>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub icons: Option<Vec<ImageResource>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub id: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub lang: Option<String>,
            /// TODO(crbug.com/1231886): This field is non-standard and part of a Chrome experiment. See: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md
            #[serde(skip_serializing_if = "Option::is_none")]
            pub launch_handler: Option<LaunchHandler>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub orientation: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub prefer_related_applications: Option<bool>,
            /// The handlers to open protocols.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub protocol_handlers: Option<Vec<ProtocolHandler>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub related_applications: Option<Vec<RelatedApplication>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scope: Option<String>,
            /// Non-standard, see https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scope_extensions: Option<Vec<ScopeExtension>>,
            /// The screenshots used by chromium.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screenshots: Option<Vec<Screenshot>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub share_target: Option<ShareTarget>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub short_name: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub shortcuts: Option<Vec<Shortcut>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub start_url: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub theme_color: Option<String>,
        }

        /// The type of a frameNavigated event.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum NavigationType {
            #[serde(rename = "Navigation")]
            Navigation,
            #[serde(rename = "BackForwardCacheRestore")]
            BackForwardCacheRestore,
        }
        impl AsRef<str> for NavigationType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Navigation => "Navigation",
                    Self::BackForwardCacheRestore => "BackForwardCacheRestore",
                }
            }
        }
        impl std::str::FromStr for NavigationType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Navigation" => Ok(Self::Navigation),
                    "BackForwardCacheRestore" => Ok(Self::BackForwardCacheRestore),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for NavigationType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// List of not restored reasons for back-forward cache.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum BackForwardCacheNotRestoredReason {
            #[serde(rename = "NotPrimaryMainFrame")]
            NotPrimaryMainFrame,
            #[serde(rename = "BackForwardCacheDisabled")]
            BackForwardCacheDisabled,
            #[serde(rename = "RelatedActiveContentsExist")]
            RelatedActiveContentsExist,
            #[serde(rename = "HTTPStatusNotOK")]
            HttpStatusNotOk,
            #[serde(rename = "SchemeNotHTTPOrHTTPS")]
            SchemeNotHttpOrHttps,
            #[serde(rename = "Loading")]
            Loading,
            #[serde(rename = "WasGrantedMediaAccess")]
            WasGrantedMediaAccess,
            #[serde(rename = "DisableForRenderFrameHostCalled")]
            DisableForRenderFrameHostCalled,
            #[serde(rename = "DomainNotAllowed")]
            DomainNotAllowed,
            #[serde(rename = "HTTPMethodNotGET")]
            HttpMethodNotGet,
            #[serde(rename = "SubframeIsNavigating")]
            SubframeIsNavigating,
            #[serde(rename = "Timeout")]
            Timeout,
            #[serde(rename = "CacheLimit")]
            CacheLimit,
            #[serde(rename = "JavaScriptExecution")]
            JavaScriptExecution,
            #[serde(rename = "RendererProcessKilled")]
            RendererProcessKilled,
            #[serde(rename = "RendererProcessCrashed")]
            RendererProcessCrashed,
            #[serde(rename = "SchedulerTrackedFeatureUsed")]
            SchedulerTrackedFeatureUsed,
            #[serde(rename = "ConflictingBrowsingInstance")]
            ConflictingBrowsingInstance,
            #[serde(rename = "CacheFlushed")]
            CacheFlushed,
            #[serde(rename = "ServiceWorkerVersionActivation")]
            ServiceWorkerVersionActivation,
            #[serde(rename = "SessionRestored")]
            SessionRestored,
            #[serde(rename = "ServiceWorkerPostMessage")]
            ServiceWorkerPostMessage,
            #[serde(rename = "EnteredBackForwardCacheBeforeServiceWorkerHostAdded")]
            EnteredBackForwardCacheBeforeServiceWorkerHostAdded,
            #[serde(rename = "RenderFrameHostReused_SameSite")]
            RenderFrameHostReusedSameSite,
            #[serde(rename = "RenderFrameHostReused_CrossSite")]
            RenderFrameHostReusedCrossSite,
            #[serde(rename = "ServiceWorkerClaim")]
            ServiceWorkerClaim,
            #[serde(rename = "IgnoreEventAndEvict")]
            IgnoreEventAndEvict,
            #[serde(rename = "HaveInnerContents")]
            HaveInnerContents,
            #[serde(rename = "TimeoutPuttingInCache")]
            TimeoutPuttingInCache,
            #[serde(rename = "BackForwardCacheDisabledByLowMemory")]
            BackForwardCacheDisabledByLowMemory,
            #[serde(rename = "BackForwardCacheDisabledByCommandLine")]
            BackForwardCacheDisabledByCommandLine,
            #[serde(rename = "NetworkRequestDatapipeDrainedAsBytesConsumer")]
            NetworkRequestDatapipeDrainedAsBytesConsumer,
            #[serde(rename = "NetworkRequestRedirected")]
            NetworkRequestRedirected,
            #[serde(rename = "NetworkRequestTimeout")]
            NetworkRequestTimeout,
            #[serde(rename = "NetworkExceedsBufferLimit")]
            NetworkExceedsBufferLimit,
            #[serde(rename = "NavigationCancelledWhileRestoring")]
            NavigationCancelledWhileRestoring,
            #[serde(rename = "NotMostRecentNavigationEntry")]
            NotMostRecentNavigationEntry,
            #[serde(rename = "BackForwardCacheDisabledForPrerender")]
            BackForwardCacheDisabledForPrerender,
            #[serde(rename = "UserAgentOverrideDiffers")]
            UserAgentOverrideDiffers,
            #[serde(rename = "ForegroundCacheLimit")]
            ForegroundCacheLimit,
            #[serde(rename = "BrowsingInstanceNotSwapped")]
            BrowsingInstanceNotSwapped,
            #[serde(rename = "BackForwardCacheDisabledForDelegate")]
            BackForwardCacheDisabledForDelegate,
            #[serde(rename = "UnloadHandlerExistsInMainFrame")]
            UnloadHandlerExistsInMainFrame,
            #[serde(rename = "UnloadHandlerExistsInSubFrame")]
            UnloadHandlerExistsInSubFrame,
            #[serde(rename = "ServiceWorkerUnregistration")]
            ServiceWorkerUnregistration,
            #[serde(rename = "CacheControlNoStore")]
            CacheControlNoStore,
            #[serde(rename = "CacheControlNoStoreCookieModified")]
            CacheControlNoStoreCookieModified,
            #[serde(rename = "CacheControlNoStoreHTTPOnlyCookieModified")]
            CacheControlNoStoreHttpOnlyCookieModified,
            #[serde(rename = "NoResponseHead")]
            NoResponseHead,
            #[serde(rename = "Unknown")]
            Unknown,
            #[serde(rename = "ActivationNavigationsDisallowedForBug1234857")]
            ActivationNavigationsDisallowedForBug1234857,
            #[serde(rename = "ErrorDocument")]
            ErrorDocument,
            #[serde(rename = "FencedFramesEmbedder")]
            FencedFramesEmbedder,
            #[serde(rename = "CookieDisabled")]
            CookieDisabled,
            #[serde(rename = "HTTPAuthRequired")]
            HttpAuthRequired,
            #[serde(rename = "CookieFlushed")]
            CookieFlushed,
            #[serde(rename = "BroadcastChannelOnMessage")]
            BroadcastChannelOnMessage,
            #[serde(rename = "WebViewSettingsChanged")]
            WebViewSettingsChanged,
            #[serde(rename = "WebViewJavaScriptObjectChanged")]
            WebViewJavaScriptObjectChanged,
            #[serde(rename = "WebViewMessageListenerInjected")]
            WebViewMessageListenerInjected,
            #[serde(rename = "WebViewSafeBrowsingAllowlistChanged")]
            WebViewSafeBrowsingAllowlistChanged,
            #[serde(rename = "WebViewDocumentStartJavascriptChanged")]
            WebViewDocumentStartJavascriptChanged,
            #[serde(rename = "WebSocket")]
            WebSocket,
            #[serde(rename = "WebTransport")]
            WebTransport,
            #[serde(rename = "WebRTC")]
            WebRtc,
            #[serde(rename = "MainResourceHasCacheControlNoStore")]
            MainResourceHasCacheControlNoStore,
            #[serde(rename = "MainResourceHasCacheControlNoCache")]
            MainResourceHasCacheControlNoCache,
            #[serde(rename = "SubresourceHasCacheControlNoStore")]
            SubresourceHasCacheControlNoStore,
            #[serde(rename = "SubresourceHasCacheControlNoCache")]
            SubresourceHasCacheControlNoCache,
            #[serde(rename = "ContainsPlugins")]
            ContainsPlugins,
            #[serde(rename = "DocumentLoaded")]
            DocumentLoaded,
            #[serde(rename = "OutstandingNetworkRequestOthers")]
            OutstandingNetworkRequestOthers,
            #[serde(rename = "RequestedMIDIPermission")]
            RequestedMidiPermission,
            #[serde(rename = "RequestedAudioCapturePermission")]
            RequestedAudioCapturePermission,
            #[serde(rename = "RequestedVideoCapturePermission")]
            RequestedVideoCapturePermission,
            #[serde(rename = "RequestedBackForwardCacheBlockedSensors")]
            RequestedBackForwardCacheBlockedSensors,
            #[serde(rename = "RequestedBackgroundWorkPermission")]
            RequestedBackgroundWorkPermission,
            #[serde(rename = "BroadcastChannel")]
            BroadcastChannel,
            #[serde(rename = "WebXR")]
            WebXr,
            #[serde(rename = "SharedWorker")]
            SharedWorker,
            #[serde(rename = "SharedWorkerMessage")]
            SharedWorkerMessage,
            #[serde(rename = "SharedWorkerWithNoActiveClient")]
            SharedWorkerWithNoActiveClient,
            #[serde(rename = "WebLocks")]
            WebLocks,
            #[serde(rename = "WebHID")]
            WebHid,
            #[serde(rename = "WebBluetooth")]
            WebBluetooth,
            #[serde(rename = "WebShare")]
            WebShare,
            #[serde(rename = "RequestedStorageAccessGrant")]
            RequestedStorageAccessGrant,
            #[serde(rename = "WebNfc")]
            WebNfc,
            #[serde(rename = "OutstandingNetworkRequestFetch")]
            OutstandingNetworkRequestFetch,
            #[serde(rename = "OutstandingNetworkRequestXHR")]
            OutstandingNetworkRequestXhr,
            #[serde(rename = "AppBanner")]
            AppBanner,
            #[serde(rename = "Printing")]
            Printing,
            #[serde(rename = "WebDatabase")]
            WebDatabase,
            #[serde(rename = "PictureInPicture")]
            PictureInPicture,
            #[serde(rename = "SpeechRecognizer")]
            SpeechRecognizer,
            #[serde(rename = "IdleManager")]
            IdleManager,
            #[serde(rename = "PaymentManager")]
            PaymentManager,
            #[serde(rename = "SpeechSynthesis")]
            SpeechSynthesis,
            #[serde(rename = "KeyboardLock")]
            KeyboardLock,
            #[serde(rename = "WebOTPService")]
            WebOtpService,
            #[serde(rename = "OutstandingNetworkRequestDirectSocket")]
            OutstandingNetworkRequestDirectSocket,
            #[serde(rename = "InjectedJavascript")]
            InjectedJavascript,
            #[serde(rename = "InjectedStyleSheet")]
            InjectedStyleSheet,
            #[serde(rename = "KeepaliveRequest")]
            KeepaliveRequest,
            #[serde(rename = "IndexedDBEvent")]
            IndexedDbEvent,
            #[serde(rename = "Dummy")]
            Dummy,
            #[serde(rename = "JsNetworkRequestReceivedCacheControlNoStoreResource")]
            JsNetworkRequestReceivedCacheControlNoStoreResource,
            #[serde(rename = "WebRTCUsedWithCCNS")]
            WebRtcUsedWithCcns,
            #[serde(rename = "WebTransportUsedWithCCNS")]
            WebTransportUsedWithCcns,
            #[serde(rename = "WebSocketUsedWithCCNS")]
            WebSocketUsedWithCcns,
            #[serde(rename = "SmartCard")]
            SmartCard,
            #[serde(rename = "LiveMediaStreamTrack")]
            LiveMediaStreamTrack,
            #[serde(rename = "UnloadHandler")]
            UnloadHandler,
            #[serde(rename = "ParserAborted")]
            ParserAborted,
            #[serde(rename = "ContentSecurityHandler")]
            ContentSecurityHandler,
            #[serde(rename = "ContentWebAuthenticationAPI")]
            ContentWebAuthenticationApi,
            #[serde(rename = "ContentFileChooser")]
            ContentFileChooser,
            #[serde(rename = "ContentSerial")]
            ContentSerial,
            #[serde(rename = "ContentFileSystemAccess")]
            ContentFileSystemAccess,
            #[serde(rename = "ContentMediaDevicesDispatcherHost")]
            ContentMediaDevicesDispatcherHost,
            #[serde(rename = "ContentWebBluetooth")]
            ContentWebBluetooth,
            #[serde(rename = "ContentWebUSB")]
            ContentWebUsb,
            #[serde(rename = "ContentMediaSessionService")]
            ContentMediaSessionService,
            #[serde(rename = "ContentScreenReader")]
            ContentScreenReader,
            #[serde(rename = "ContentDiscarded")]
            ContentDiscarded,
            #[serde(rename = "EmbedderPopupBlockerTabHelper")]
            EmbedderPopupBlockerTabHelper,
            #[serde(rename = "EmbedderSafeBrowsingTriggeredPopupBlocker")]
            EmbedderSafeBrowsingTriggeredPopupBlocker,
            #[serde(rename = "EmbedderSafeBrowsingThreatDetails")]
            EmbedderSafeBrowsingThreatDetails,
            #[serde(rename = "EmbedderAppBannerManager")]
            EmbedderAppBannerManager,
            #[serde(rename = "EmbedderDomDistillerViewerSource")]
            EmbedderDomDistillerViewerSource,
            #[serde(rename = "EmbedderDomDistillerSelfDeletingRequestDelegate")]
            EmbedderDomDistillerSelfDeletingRequestDelegate,
            #[serde(rename = "EmbedderOomInterventionTabHelper")]
            EmbedderOomInterventionTabHelper,
            #[serde(rename = "EmbedderOfflinePage")]
            EmbedderOfflinePage,
            #[serde(rename = "EmbedderChromePasswordManagerClientBindCredentialManager")]
            EmbedderChromePasswordManagerClientBindCredentialManager,
            #[serde(rename = "EmbedderPermissionRequestManager")]
            EmbedderPermissionRequestManager,
            #[serde(rename = "EmbedderModalDialog")]
            EmbedderModalDialog,
            #[serde(rename = "EmbedderExtensions")]
            EmbedderExtensions,
            #[serde(rename = "EmbedderExtensionMessaging")]
            EmbedderExtensionMessaging,
            #[serde(rename = "EmbedderExtensionMessagingForOpenPort")]
            EmbedderExtensionMessagingForOpenPort,
            #[serde(rename = "EmbedderExtensionSentMessageToCachedFrame")]
            EmbedderExtensionSentMessageToCachedFrame,
            #[serde(rename = "RequestedByWebViewClient")]
            RequestedByWebViewClient,
            #[serde(rename = "PostMessageByWebViewClient")]
            PostMessageByWebViewClient,
            #[serde(rename = "CacheControlNoStoreDeviceBoundSessionTerminated")]
            CacheControlNoStoreDeviceBoundSessionTerminated,
            #[serde(rename = "CacheLimitPrunedOnModerateMemoryPressure")]
            CacheLimitPrunedOnModerateMemoryPressure,
            #[serde(rename = "CacheLimitPrunedOnCriticalMemoryPressure")]
            CacheLimitPrunedOnCriticalMemoryPressure,
        }
        impl AsRef<str> for BackForwardCacheNotRestoredReason {
            fn as_ref(&self) -> &str {
                match self {
                    Self::NotPrimaryMainFrame => "NotPrimaryMainFrame",
                    Self::BackForwardCacheDisabled => "BackForwardCacheDisabled",
                    Self::RelatedActiveContentsExist => "RelatedActiveContentsExist",
                    Self::HttpStatusNotOk => "HTTPStatusNotOK",
                    Self::SchemeNotHttpOrHttps => "SchemeNotHTTPOrHTTPS",
                    Self::Loading => "Loading",
                    Self::WasGrantedMediaAccess => "WasGrantedMediaAccess",
                    Self::DisableForRenderFrameHostCalled => "DisableForRenderFrameHostCalled",
                    Self::DomainNotAllowed => "DomainNotAllowed",
                    Self::HttpMethodNotGet => "HTTPMethodNotGET",
                    Self::SubframeIsNavigating => "SubframeIsNavigating",
                    Self::Timeout => "Timeout",
                    Self::CacheLimit => "CacheLimit",
                    Self::JavaScriptExecution => "JavaScriptExecution",
                    Self::RendererProcessKilled => "RendererProcessKilled",
                    Self::RendererProcessCrashed => "RendererProcessCrashed",
                    Self::SchedulerTrackedFeatureUsed => "SchedulerTrackedFeatureUsed",
                    Self::ConflictingBrowsingInstance => "ConflictingBrowsingInstance",
                    Self::CacheFlushed => "CacheFlushed",
                    Self::ServiceWorkerVersionActivation => "ServiceWorkerVersionActivation",
                    Self::SessionRestored => "SessionRestored",
                    Self::ServiceWorkerPostMessage => "ServiceWorkerPostMessage",
                    Self::EnteredBackForwardCacheBeforeServiceWorkerHostAdded => {
                        "EnteredBackForwardCacheBeforeServiceWorkerHostAdded"
                    }
                    Self::RenderFrameHostReusedSameSite => "RenderFrameHostReused_SameSite",
                    Self::RenderFrameHostReusedCrossSite => "RenderFrameHostReused_CrossSite",
                    Self::ServiceWorkerClaim => "ServiceWorkerClaim",
                    Self::IgnoreEventAndEvict => "IgnoreEventAndEvict",
                    Self::HaveInnerContents => "HaveInnerContents",
                    Self::TimeoutPuttingInCache => "TimeoutPuttingInCache",
                    Self::BackForwardCacheDisabledByLowMemory => {
                        "BackForwardCacheDisabledByLowMemory"
                    }
                    Self::BackForwardCacheDisabledByCommandLine => {
                        "BackForwardCacheDisabledByCommandLine"
                    }
                    Self::NetworkRequestDatapipeDrainedAsBytesConsumer => {
                        "NetworkRequestDatapipeDrainedAsBytesConsumer"
                    }
                    Self::NetworkRequestRedirected => "NetworkRequestRedirected",
                    Self::NetworkRequestTimeout => "NetworkRequestTimeout",
                    Self::NetworkExceedsBufferLimit => "NetworkExceedsBufferLimit",
                    Self::NavigationCancelledWhileRestoring => "NavigationCancelledWhileRestoring",
                    Self::NotMostRecentNavigationEntry => "NotMostRecentNavigationEntry",
                    Self::BackForwardCacheDisabledForPrerender => {
                        "BackForwardCacheDisabledForPrerender"
                    }
                    Self::UserAgentOverrideDiffers => "UserAgentOverrideDiffers",
                    Self::ForegroundCacheLimit => "ForegroundCacheLimit",
                    Self::BrowsingInstanceNotSwapped => "BrowsingInstanceNotSwapped",
                    Self::BackForwardCacheDisabledForDelegate => {
                        "BackForwardCacheDisabledForDelegate"
                    }
                    Self::UnloadHandlerExistsInMainFrame => "UnloadHandlerExistsInMainFrame",
                    Self::UnloadHandlerExistsInSubFrame => "UnloadHandlerExistsInSubFrame",
                    Self::ServiceWorkerUnregistration => "ServiceWorkerUnregistration",
                    Self::CacheControlNoStore => "CacheControlNoStore",
                    Self::CacheControlNoStoreCookieModified => "CacheControlNoStoreCookieModified",
                    Self::CacheControlNoStoreHttpOnlyCookieModified => {
                        "CacheControlNoStoreHTTPOnlyCookieModified"
                    }
                    Self::NoResponseHead => "NoResponseHead",
                    Self::Unknown => "Unknown",
                    Self::ActivationNavigationsDisallowedForBug1234857 => {
                        "ActivationNavigationsDisallowedForBug1234857"
                    }
                    Self::ErrorDocument => "ErrorDocument",
                    Self::FencedFramesEmbedder => "FencedFramesEmbedder",
                    Self::CookieDisabled => "CookieDisabled",
                    Self::HttpAuthRequired => "HTTPAuthRequired",
                    Self::CookieFlushed => "CookieFlushed",
                    Self::BroadcastChannelOnMessage => "BroadcastChannelOnMessage",
                    Self::WebViewSettingsChanged => "WebViewSettingsChanged",
                    Self::WebViewJavaScriptObjectChanged => "WebViewJavaScriptObjectChanged",
                    Self::WebViewMessageListenerInjected => "WebViewMessageListenerInjected",
                    Self::WebViewSafeBrowsingAllowlistChanged => {
                        "WebViewSafeBrowsingAllowlistChanged"
                    }
                    Self::WebViewDocumentStartJavascriptChanged => {
                        "WebViewDocumentStartJavascriptChanged"
                    }
                    Self::WebSocket => "WebSocket",
                    Self::WebTransport => "WebTransport",
                    Self::WebRtc => "WebRTC",
                    Self::MainResourceHasCacheControlNoStore => {
                        "MainResourceHasCacheControlNoStore"
                    }
                    Self::MainResourceHasCacheControlNoCache => {
                        "MainResourceHasCacheControlNoCache"
                    }
                    Self::SubresourceHasCacheControlNoStore => "SubresourceHasCacheControlNoStore",
                    Self::SubresourceHasCacheControlNoCache => "SubresourceHasCacheControlNoCache",
                    Self::ContainsPlugins => "ContainsPlugins",
                    Self::DocumentLoaded => "DocumentLoaded",
                    Self::OutstandingNetworkRequestOthers => "OutstandingNetworkRequestOthers",
                    Self::RequestedMidiPermission => "RequestedMIDIPermission",
                    Self::RequestedAudioCapturePermission => "RequestedAudioCapturePermission",
                    Self::RequestedVideoCapturePermission => "RequestedVideoCapturePermission",
                    Self::RequestedBackForwardCacheBlockedSensors => {
                        "RequestedBackForwardCacheBlockedSensors"
                    }
                    Self::RequestedBackgroundWorkPermission => "RequestedBackgroundWorkPermission",
                    Self::BroadcastChannel => "BroadcastChannel",
                    Self::WebXr => "WebXR",
                    Self::SharedWorker => "SharedWorker",
                    Self::SharedWorkerMessage => "SharedWorkerMessage",
                    Self::SharedWorkerWithNoActiveClient => "SharedWorkerWithNoActiveClient",
                    Self::WebLocks => "WebLocks",
                    Self::WebHid => "WebHID",
                    Self::WebBluetooth => "WebBluetooth",
                    Self::WebShare => "WebShare",
                    Self::RequestedStorageAccessGrant => "RequestedStorageAccessGrant",
                    Self::WebNfc => "WebNfc",
                    Self::OutstandingNetworkRequestFetch => "OutstandingNetworkRequestFetch",
                    Self::OutstandingNetworkRequestXhr => "OutstandingNetworkRequestXHR",
                    Self::AppBanner => "AppBanner",
                    Self::Printing => "Printing",
                    Self::WebDatabase => "WebDatabase",
                    Self::PictureInPicture => "PictureInPicture",
                    Self::SpeechRecognizer => "SpeechRecognizer",
                    Self::IdleManager => "IdleManager",
                    Self::PaymentManager => "PaymentManager",
                    Self::SpeechSynthesis => "SpeechSynthesis",
                    Self::KeyboardLock => "KeyboardLock",
                    Self::WebOtpService => "WebOTPService",
                    Self::OutstandingNetworkRequestDirectSocket => {
                        "OutstandingNetworkRequestDirectSocket"
                    }
                    Self::InjectedJavascript => "InjectedJavascript",
                    Self::InjectedStyleSheet => "InjectedStyleSheet",
                    Self::KeepaliveRequest => "KeepaliveRequest",
                    Self::IndexedDbEvent => "IndexedDBEvent",
                    Self::Dummy => "Dummy",
                    Self::JsNetworkRequestReceivedCacheControlNoStoreResource => {
                        "JsNetworkRequestReceivedCacheControlNoStoreResource"
                    }
                    Self::WebRtcUsedWithCcns => "WebRTCUsedWithCCNS",
                    Self::WebTransportUsedWithCcns => "WebTransportUsedWithCCNS",
                    Self::WebSocketUsedWithCcns => "WebSocketUsedWithCCNS",
                    Self::SmartCard => "SmartCard",
                    Self::LiveMediaStreamTrack => "LiveMediaStreamTrack",
                    Self::UnloadHandler => "UnloadHandler",
                    Self::ParserAborted => "ParserAborted",
                    Self::ContentSecurityHandler => "ContentSecurityHandler",
                    Self::ContentWebAuthenticationApi => "ContentWebAuthenticationAPI",
                    Self::ContentFileChooser => "ContentFileChooser",
                    Self::ContentSerial => "ContentSerial",
                    Self::ContentFileSystemAccess => "ContentFileSystemAccess",
                    Self::ContentMediaDevicesDispatcherHost => "ContentMediaDevicesDispatcherHost",
                    Self::ContentWebBluetooth => "ContentWebBluetooth",
                    Self::ContentWebUsb => "ContentWebUSB",
                    Self::ContentMediaSessionService => "ContentMediaSessionService",
                    Self::ContentScreenReader => "ContentScreenReader",
                    Self::ContentDiscarded => "ContentDiscarded",
                    Self::EmbedderPopupBlockerTabHelper => "EmbedderPopupBlockerTabHelper",
                    Self::EmbedderSafeBrowsingTriggeredPopupBlocker => {
                        "EmbedderSafeBrowsingTriggeredPopupBlocker"
                    }
                    Self::EmbedderSafeBrowsingThreatDetails => "EmbedderSafeBrowsingThreatDetails",
                    Self::EmbedderAppBannerManager => "EmbedderAppBannerManager",
                    Self::EmbedderDomDistillerViewerSource => "EmbedderDomDistillerViewerSource",
                    Self::EmbedderDomDistillerSelfDeletingRequestDelegate => {
                        "EmbedderDomDistillerSelfDeletingRequestDelegate"
                    }
                    Self::EmbedderOomInterventionTabHelper => "EmbedderOomInterventionTabHelper",
                    Self::EmbedderOfflinePage => "EmbedderOfflinePage",
                    Self::EmbedderChromePasswordManagerClientBindCredentialManager => {
                        "EmbedderChromePasswordManagerClientBindCredentialManager"
                    }
                    Self::EmbedderPermissionRequestManager => "EmbedderPermissionRequestManager",
                    Self::EmbedderModalDialog => "EmbedderModalDialog",
                    Self::EmbedderExtensions => "EmbedderExtensions",
                    Self::EmbedderExtensionMessaging => "EmbedderExtensionMessaging",
                    Self::EmbedderExtensionMessagingForOpenPort => {
                        "EmbedderExtensionMessagingForOpenPort"
                    }
                    Self::EmbedderExtensionSentMessageToCachedFrame => {
                        "EmbedderExtensionSentMessageToCachedFrame"
                    }
                    Self::RequestedByWebViewClient => "RequestedByWebViewClient",
                    Self::PostMessageByWebViewClient => "PostMessageByWebViewClient",
                    Self::CacheControlNoStoreDeviceBoundSessionTerminated => {
                        "CacheControlNoStoreDeviceBoundSessionTerminated"
                    }
                    Self::CacheLimitPrunedOnModerateMemoryPressure => {
                        "CacheLimitPrunedOnModerateMemoryPressure"
                    }
                    Self::CacheLimitPrunedOnCriticalMemoryPressure => {
                        "CacheLimitPrunedOnCriticalMemoryPressure"
                    }
                }
            }
        }
        impl std::str::FromStr for BackForwardCacheNotRestoredReason {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "NotPrimaryMainFrame" => Ok(Self::NotPrimaryMainFrame),
                    "BackForwardCacheDisabled" => Ok(Self::BackForwardCacheDisabled),
                    "RelatedActiveContentsExist" => Ok(Self::RelatedActiveContentsExist),
                    "HTTPStatusNotOK" => Ok(Self::HttpStatusNotOk),
                    "SchemeNotHTTPOrHTTPS" => Ok(Self::SchemeNotHttpOrHttps),
                    "Loading" => Ok(Self::Loading),
                    "WasGrantedMediaAccess" => Ok(Self::WasGrantedMediaAccess),
                    "DisableForRenderFrameHostCalled" => Ok(Self::DisableForRenderFrameHostCalled),
                    "DomainNotAllowed" => Ok(Self::DomainNotAllowed),
                    "HTTPMethodNotGET" => Ok(Self::HttpMethodNotGet),
                    "SubframeIsNavigating" => Ok(Self::SubframeIsNavigating),
                    "Timeout" => Ok(Self::Timeout),
                    "CacheLimit" => Ok(Self::CacheLimit),
                    "JavaScriptExecution" => Ok(Self::JavaScriptExecution),
                    "RendererProcessKilled" => Ok(Self::RendererProcessKilled),
                    "RendererProcessCrashed" => Ok(Self::RendererProcessCrashed),
                    "SchedulerTrackedFeatureUsed" => Ok(Self::SchedulerTrackedFeatureUsed),
                    "ConflictingBrowsingInstance" => Ok(Self::ConflictingBrowsingInstance),
                    "CacheFlushed" => Ok(Self::CacheFlushed),
                    "ServiceWorkerVersionActivation" => Ok(Self::ServiceWorkerVersionActivation),
                    "SessionRestored" => Ok(Self::SessionRestored),
                    "ServiceWorkerPostMessage" => Ok(Self::ServiceWorkerPostMessage),
                    "EnteredBackForwardCacheBeforeServiceWorkerHostAdded" => {
                        Ok(Self::EnteredBackForwardCacheBeforeServiceWorkerHostAdded)
                    }
                    "RenderFrameHostReused_SameSite" => Ok(Self::RenderFrameHostReusedSameSite),
                    "RenderFrameHostReused_CrossSite" => Ok(Self::RenderFrameHostReusedCrossSite),
                    "ServiceWorkerClaim" => Ok(Self::ServiceWorkerClaim),
                    "IgnoreEventAndEvict" => Ok(Self::IgnoreEventAndEvict),
                    "HaveInnerContents" => Ok(Self::HaveInnerContents),
                    "TimeoutPuttingInCache" => Ok(Self::TimeoutPuttingInCache),
                    "BackForwardCacheDisabledByLowMemory" => {
                        Ok(Self::BackForwardCacheDisabledByLowMemory)
                    }
                    "BackForwardCacheDisabledByCommandLine" => {
                        Ok(Self::BackForwardCacheDisabledByCommandLine)
                    }
                    "NetworkRequestDatapipeDrainedAsBytesConsumer" => {
                        Ok(Self::NetworkRequestDatapipeDrainedAsBytesConsumer)
                    }
                    "NetworkRequestRedirected" => Ok(Self::NetworkRequestRedirected),
                    "NetworkRequestTimeout" => Ok(Self::NetworkRequestTimeout),
                    "NetworkExceedsBufferLimit" => Ok(Self::NetworkExceedsBufferLimit),
                    "NavigationCancelledWhileRestoring" => {
                        Ok(Self::NavigationCancelledWhileRestoring)
                    }
                    "NotMostRecentNavigationEntry" => Ok(Self::NotMostRecentNavigationEntry),
                    "BackForwardCacheDisabledForPrerender" => {
                        Ok(Self::BackForwardCacheDisabledForPrerender)
                    }
                    "UserAgentOverrideDiffers" => Ok(Self::UserAgentOverrideDiffers),
                    "ForegroundCacheLimit" => Ok(Self::ForegroundCacheLimit),
                    "BrowsingInstanceNotSwapped" => Ok(Self::BrowsingInstanceNotSwapped),
                    "BackForwardCacheDisabledForDelegate" => {
                        Ok(Self::BackForwardCacheDisabledForDelegate)
                    }
                    "UnloadHandlerExistsInMainFrame" => Ok(Self::UnloadHandlerExistsInMainFrame),
                    "UnloadHandlerExistsInSubFrame" => Ok(Self::UnloadHandlerExistsInSubFrame),
                    "ServiceWorkerUnregistration" => Ok(Self::ServiceWorkerUnregistration),
                    "CacheControlNoStore" => Ok(Self::CacheControlNoStore),
                    "CacheControlNoStoreCookieModified" => {
                        Ok(Self::CacheControlNoStoreCookieModified)
                    }
                    "CacheControlNoStoreHTTPOnlyCookieModified" => {
                        Ok(Self::CacheControlNoStoreHttpOnlyCookieModified)
                    }
                    "NoResponseHead" => Ok(Self::NoResponseHead),
                    "Unknown" => Ok(Self::Unknown),
                    "ActivationNavigationsDisallowedForBug1234857" => {
                        Ok(Self::ActivationNavigationsDisallowedForBug1234857)
                    }
                    "ErrorDocument" => Ok(Self::ErrorDocument),
                    "FencedFramesEmbedder" => Ok(Self::FencedFramesEmbedder),
                    "CookieDisabled" => Ok(Self::CookieDisabled),
                    "HTTPAuthRequired" => Ok(Self::HttpAuthRequired),
                    "CookieFlushed" => Ok(Self::CookieFlushed),
                    "BroadcastChannelOnMessage" => Ok(Self::BroadcastChannelOnMessage),
                    "WebViewSettingsChanged" => Ok(Self::WebViewSettingsChanged),
                    "WebViewJavaScriptObjectChanged" => Ok(Self::WebViewJavaScriptObjectChanged),
                    "WebViewMessageListenerInjected" => Ok(Self::WebViewMessageListenerInjected),
                    "WebViewSafeBrowsingAllowlistChanged" => {
                        Ok(Self::WebViewSafeBrowsingAllowlistChanged)
                    }
                    "WebViewDocumentStartJavascriptChanged" => {
                        Ok(Self::WebViewDocumentStartJavascriptChanged)
                    }
                    "WebSocket" => Ok(Self::WebSocket),
                    "WebTransport" => Ok(Self::WebTransport),
                    "WebRTC" => Ok(Self::WebRtc),
                    "MainResourceHasCacheControlNoStore" => {
                        Ok(Self::MainResourceHasCacheControlNoStore)
                    }
                    "MainResourceHasCacheControlNoCache" => {
                        Ok(Self::MainResourceHasCacheControlNoCache)
                    }
                    "SubresourceHasCacheControlNoStore" => {
                        Ok(Self::SubresourceHasCacheControlNoStore)
                    }
                    "SubresourceHasCacheControlNoCache" => {
                        Ok(Self::SubresourceHasCacheControlNoCache)
                    }
                    "ContainsPlugins" => Ok(Self::ContainsPlugins),
                    "DocumentLoaded" => Ok(Self::DocumentLoaded),
                    "OutstandingNetworkRequestOthers" => Ok(Self::OutstandingNetworkRequestOthers),
                    "RequestedMIDIPermission" => Ok(Self::RequestedMidiPermission),
                    "RequestedAudioCapturePermission" => Ok(Self::RequestedAudioCapturePermission),
                    "RequestedVideoCapturePermission" => Ok(Self::RequestedVideoCapturePermission),
                    "RequestedBackForwardCacheBlockedSensors" => {
                        Ok(Self::RequestedBackForwardCacheBlockedSensors)
                    }
                    "RequestedBackgroundWorkPermission" => {
                        Ok(Self::RequestedBackgroundWorkPermission)
                    }
                    "BroadcastChannel" => Ok(Self::BroadcastChannel),
                    "WebXR" => Ok(Self::WebXr),
                    "SharedWorker" => Ok(Self::SharedWorker),
                    "SharedWorkerMessage" => Ok(Self::SharedWorkerMessage),
                    "SharedWorkerWithNoActiveClient" => Ok(Self::SharedWorkerWithNoActiveClient),
                    "WebLocks" => Ok(Self::WebLocks),
                    "WebHID" => Ok(Self::WebHid),
                    "WebBluetooth" => Ok(Self::WebBluetooth),
                    "WebShare" => Ok(Self::WebShare),
                    "RequestedStorageAccessGrant" => Ok(Self::RequestedStorageAccessGrant),
                    "WebNfc" => Ok(Self::WebNfc),
                    "OutstandingNetworkRequestFetch" => Ok(Self::OutstandingNetworkRequestFetch),
                    "OutstandingNetworkRequestXHR" => Ok(Self::OutstandingNetworkRequestXhr),
                    "AppBanner" => Ok(Self::AppBanner),
                    "Printing" => Ok(Self::Printing),
                    "WebDatabase" => Ok(Self::WebDatabase),
                    "PictureInPicture" => Ok(Self::PictureInPicture),
                    "SpeechRecognizer" => Ok(Self::SpeechRecognizer),
                    "IdleManager" => Ok(Self::IdleManager),
                    "PaymentManager" => Ok(Self::PaymentManager),
                    "SpeechSynthesis" => Ok(Self::SpeechSynthesis),
                    "KeyboardLock" => Ok(Self::KeyboardLock),
                    "WebOTPService" => Ok(Self::WebOtpService),
                    "OutstandingNetworkRequestDirectSocket" => {
                        Ok(Self::OutstandingNetworkRequestDirectSocket)
                    }
                    "InjectedJavascript" => Ok(Self::InjectedJavascript),
                    "InjectedStyleSheet" => Ok(Self::InjectedStyleSheet),
                    "KeepaliveRequest" => Ok(Self::KeepaliveRequest),
                    "IndexedDBEvent" => Ok(Self::IndexedDbEvent),
                    "Dummy" => Ok(Self::Dummy),
                    "JsNetworkRequestReceivedCacheControlNoStoreResource" => {
                        Ok(Self::JsNetworkRequestReceivedCacheControlNoStoreResource)
                    }
                    "WebRTCUsedWithCCNS" => Ok(Self::WebRtcUsedWithCcns),
                    "WebTransportUsedWithCCNS" => Ok(Self::WebTransportUsedWithCcns),
                    "WebSocketUsedWithCCNS" => Ok(Self::WebSocketUsedWithCcns),
                    "SmartCard" => Ok(Self::SmartCard),
                    "LiveMediaStreamTrack" => Ok(Self::LiveMediaStreamTrack),
                    "UnloadHandler" => Ok(Self::UnloadHandler),
                    "ParserAborted" => Ok(Self::ParserAborted),
                    "ContentSecurityHandler" => Ok(Self::ContentSecurityHandler),
                    "ContentWebAuthenticationAPI" => Ok(Self::ContentWebAuthenticationApi),
                    "ContentFileChooser" => Ok(Self::ContentFileChooser),
                    "ContentSerial" => Ok(Self::ContentSerial),
                    "ContentFileSystemAccess" => Ok(Self::ContentFileSystemAccess),
                    "ContentMediaDevicesDispatcherHost" => {
                        Ok(Self::ContentMediaDevicesDispatcherHost)
                    }
                    "ContentWebBluetooth" => Ok(Self::ContentWebBluetooth),
                    "ContentWebUSB" => Ok(Self::ContentWebUsb),
                    "ContentMediaSessionService" => Ok(Self::ContentMediaSessionService),
                    "ContentScreenReader" => Ok(Self::ContentScreenReader),
                    "ContentDiscarded" => Ok(Self::ContentDiscarded),
                    "EmbedderPopupBlockerTabHelper" => Ok(Self::EmbedderPopupBlockerTabHelper),
                    "EmbedderSafeBrowsingTriggeredPopupBlocker" => {
                        Ok(Self::EmbedderSafeBrowsingTriggeredPopupBlocker)
                    }
                    "EmbedderSafeBrowsingThreatDetails" => {
                        Ok(Self::EmbedderSafeBrowsingThreatDetails)
                    }
                    "EmbedderAppBannerManager" => Ok(Self::EmbedderAppBannerManager),
                    "EmbedderDomDistillerViewerSource" => {
                        Ok(Self::EmbedderDomDistillerViewerSource)
                    }
                    "EmbedderDomDistillerSelfDeletingRequestDelegate" => {
                        Ok(Self::EmbedderDomDistillerSelfDeletingRequestDelegate)
                    }
                    "EmbedderOomInterventionTabHelper" => {
                        Ok(Self::EmbedderOomInterventionTabHelper)
                    }
                    "EmbedderOfflinePage" => Ok(Self::EmbedderOfflinePage),
                    "EmbedderChromePasswordManagerClientBindCredentialManager" => {
                        Ok(Self::EmbedderChromePasswordManagerClientBindCredentialManager)
                    }
                    "EmbedderPermissionRequestManager" => {
                        Ok(Self::EmbedderPermissionRequestManager)
                    }
                    "EmbedderModalDialog" => Ok(Self::EmbedderModalDialog),
                    "EmbedderExtensions" => Ok(Self::EmbedderExtensions),
                    "EmbedderExtensionMessaging" => Ok(Self::EmbedderExtensionMessaging),
                    "EmbedderExtensionMessagingForOpenPort" => {
                        Ok(Self::EmbedderExtensionMessagingForOpenPort)
                    }
                    "EmbedderExtensionSentMessageToCachedFrame" => {
                        Ok(Self::EmbedderExtensionSentMessageToCachedFrame)
                    }
                    "RequestedByWebViewClient" => Ok(Self::RequestedByWebViewClient),
                    "PostMessageByWebViewClient" => Ok(Self::PostMessageByWebViewClient),
                    "CacheControlNoStoreDeviceBoundSessionTerminated" => {
                        Ok(Self::CacheControlNoStoreDeviceBoundSessionTerminated)
                    }
                    "CacheLimitPrunedOnModerateMemoryPressure" => {
                        Ok(Self::CacheLimitPrunedOnModerateMemoryPressure)
                    }
                    "CacheLimitPrunedOnCriticalMemoryPressure" => {
                        Ok(Self::CacheLimitPrunedOnCriticalMemoryPressure)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for BackForwardCacheNotRestoredReason {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Types of not restored reasons for back-forward cache.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum BackForwardCacheNotRestoredReasonType {
            #[serde(rename = "SupportPending")]
            SupportPending,
            #[serde(rename = "PageSupportNeeded")]
            PageSupportNeeded,
            #[serde(rename = "Circumstantial")]
            Circumstantial,
        }
        impl AsRef<str> for BackForwardCacheNotRestoredReasonType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SupportPending => "SupportPending",
                    Self::PageSupportNeeded => "PageSupportNeeded",
                    Self::Circumstantial => "Circumstantial",
                }
            }
        }
        impl std::str::FromStr for BackForwardCacheNotRestoredReasonType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SupportPending" => Ok(Self::SupportPending),
                    "PageSupportNeeded" => Ok(Self::PageSupportNeeded),
                    "Circumstantial" => Ok(Self::Circumstantial),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for BackForwardCacheNotRestoredReasonType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BackForwardCacheBlockingDetails {
            /// Url of the file where blockage happened. Optional because of tests.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// Function name where blockage happened. Optional because of anonymous functions and tests.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub function: Option<String>,
            /// Line number in the script (0-based).
            pub line_number: i64,
            /// Column number in the script (0-based).
            pub column_number: i64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BackForwardCacheNotRestoredExplanation {
            /// Type of the reason
            pub type_: BackForwardCacheNotRestoredReasonType,
            /// Not restored reason
            pub reason: BackForwardCacheNotRestoredReason,
            /// Context associated with the reason. The meaning of this context is dependent on the reason: - EmbedderExtensionSentMessageToCachedFrame: the extension ID.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub context: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub details: Option<Vec<BackForwardCacheBlockingDetails>>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BackForwardCacheNotRestoredExplanationTree {
            /// URL of each frame
            pub url: String,
            /// Not restored reasons of each frame
            pub explanations: Vec<BackForwardCacheNotRestoredExplanation>,
            /// Array of children frame
            pub children: Vec<BackForwardCacheNotRestoredExplanationTree>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddScriptToEvaluateOnLoadResponse {
            /// Identifier of the added script.
            pub identifier: types::ScriptIdentifier,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddScriptToEvaluateOnNewDocumentResponse {
            /// Identifier of the added script.
            pub identifier: types::ScriptIdentifier,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CaptureScreenshotResponse {
            /// Base64-encoded image data. (Encoded as a base64 string when passed over JSON)
            pub data: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CaptureSnapshotResponse {
            /// Serialized page data.
            pub data: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateIsolatedWorldResponse {
            /// Execution context of the isolated world.
            pub execution_context_id: runtime::types::ExecutionContextId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAppManifestResponse {
            /// Manifest location.
            pub url: String,
            pub errors: Vec<types::AppManifestError>,
            /// Manifest content.
            pub data: Option<String>,
            /// Parsed manifest properties. Deprecated, use manifest instead.
            /// **EXPERIMENTAL**
            #[deprecated]
            pub parsed: Option<types::AppManifestParsedProperties>,
            /// **EXPERIMENTAL**
            pub manifest: Option<types::WebAppManifest>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInstallabilityErrorsResponse {
            pub installability_errors: Vec<types::InstallabilityError>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetManifestIconsResponse {
            pub primary_icon: Option<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAppIdResponse {
            /// App id, either from manifest's id attribute or computed from start_url
            pub app_id: Option<String>,
            /// Recommendation for manifest's id attribute to match current id computed from start_url
            pub recommended_id: Option<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAdScriptAncestryResponse {
            /// The ancestry chain of ad script identifiers leading to this frame's creation, along with the root script's filterlist rule. The ancestry chain is ordered from the most immediate script (in the frame creation stack) to more distant ancestors (that created the immediately preceding script). Only sent if frame is labelled as an ad and ids are available.
            pub ad_script_ancestry: Option<types::AdScriptAncestry>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFrameTreeResponse {
            /// Present frame tree structure.
            pub frame_tree: types::FrameTree,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLayoutMetricsResponse {
            /// Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead.
            #[deprecated]
            pub layout_viewport: types::LayoutViewport,
            /// Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead.
            #[deprecated]
            pub visual_viewport: types::VisualViewport,
            /// Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead.
            #[deprecated]
            pub content_size: dom::types::Rect,
            /// Metrics relating to the layout viewport in CSS pixels.
            pub css_layout_viewport: types::LayoutViewport,
            /// Metrics relating to the visual viewport in CSS pixels.
            pub css_visual_viewport: types::VisualViewport,
            /// Size of scrollable area in CSS pixels.
            pub css_content_size: dom::types::Rect,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNavigationHistoryResponse {
            /// Index of the current navigation history entry.
            pub current_index: i64,
            /// Array of navigation history entries.
            pub entries: Vec<types::NavigationEntry>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResourceContentResponse {
            /// Resource content.
            pub content: String,
            /// True, if content was served as base64.
            pub base64_encoded: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResourceTreeResponse {
            /// Present frame / resource tree structure.
            pub frame_tree: types::FrameResourceTree,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NavigateResponse {
            /// Frame id that has navigated (or failed to navigate)
            pub frame_id: types::FrameId,
            /// Loader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change.
            pub loader_id: Option<network::types::LoaderId>,
            /// User friendly error message, present if and only if navigation has failed.
            pub error_text: Option<String>,
            /// Whether the navigation resulted in a download.
            /// **EXPERIMENTAL**
            pub is_download: Option<bool>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PrintToPdfResponse {
            /// Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON)
            pub data: String,
            /// A handle of the stream that holds resulting PDF data.
            /// **EXPERIMENTAL**
            pub stream: Option<io::types::StreamHandle>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SearchInResourceResponse {
            /// List of search matches.
            pub result: Vec<debugger::types::SearchMatch>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPermissionsPolicyStateResponse {
            pub states: Vec<types::PermissionsPolicyFeatureState>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOriginTrialsResponse {
            pub origin_trials: Vec<types::OriginTrial>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAnnotatedPageContentResponse {
            /// The annotated page content as a base64 encoded protobuf. The format is defined by the `AnnotatedPageContent` message in components/optimization_guide/proto/features/common_quality_data.proto (Encoded as a base64 string when passed over JSON)
            pub content: String,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Deprecated, please use addScriptToEvaluateOnNewDocument instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddScriptToEvaluateOnLoad {
            pub script_source: String,
        }

        impl AddScriptToEvaluateOnLoad {
            pub fn new(script_source: impl Into<String>) -> Self {
                Self {
                    script_source: script_source.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddScriptToEvaluateOnLoadResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddScriptToEvaluateOnLoad {
            type Response = responses::AddScriptToEvaluateOnLoadResponse;
            const METHOD: &'static str = "Page.addScriptToEvaluateOnLoad";
        }

        /// Evaluates given script in every frame upon creation (before loading frame's scripts).
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddScriptToEvaluateOnNewDocument {
            pub source: String,
            /// If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub world_name: Option<String>,
            /// Specifies whether command line API should be available to the script, defaults to false.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeCommandLineAPI")]
            pub include_command_line_api: Option<bool>,
            /// If true, runs the script immediately on existing execution contexts or worlds. Default: false.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub run_immediately: Option<bool>,
        }

        impl AddScriptToEvaluateOnNewDocument {
            pub fn new(source: impl Into<String>) -> Self {
                Self {
                    source: source.into(),
                    world_name: None,
                    include_command_line_api: None,
                    run_immediately: None,
                }
            }

            pub fn with_world_name(mut self, world_name: impl Into<String>) -> Self {
                self.world_name = Some(world_name.into());
                self
            }

            pub fn with_include_command_line_api(mut self, include_command_line_api: bool) -> Self {
                self.include_command_line_api = Some(include_command_line_api);
                self
            }

            pub fn with_run_immediately(mut self, run_immediately: bool) -> Self {
                self.run_immediately = Some(run_immediately);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddScriptToEvaluateOnNewDocumentResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for AddScriptToEvaluateOnNewDocument {
            type Response = responses::AddScriptToEvaluateOnNewDocumentResponse;
            const METHOD: &'static str = "Page.addScriptToEvaluateOnNewDocument";
        }

        /// Brings page to front (activates tab).
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BringToFront {}

        impl BringToFront {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for BringToFront {
            type Response = ();
            const METHOD: &'static str = "Page.bringToFront";
        }

        /// Capture page screenshot.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CaptureScreenshot {
            /// Image compression format (defaults to png).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub format: Option<String>,
            /// Compression quality from range [0..100] (jpeg only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub quality: Option<i64>,
            /// Capture the screenshot of a given region only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub clip: Option<types::Viewport>,
            /// Capture the screenshot from the surface, rather than the view. Defaults to true.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub from_surface: Option<bool>,
            /// Capture the screenshot beyond the viewport. Defaults to false.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub capture_beyond_viewport: Option<bool>,
            /// Optimize image encoding for speed, not for resulting size (defaults to false)
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub optimize_for_speed: Option<bool>,
        }

        impl CaptureScreenshot {
            pub fn new() -> Self {
                Self {
                    format: None,
                    quality: None,
                    clip: None,
                    from_surface: None,
                    capture_beyond_viewport: None,
                    optimize_for_speed: None,
                }
            }

            pub fn with_format(mut self, format: impl Into<String>) -> Self {
                self.format = Some(format.into());
                self
            }

            pub fn with_quality(mut self, quality: i64) -> Self {
                self.quality = Some(quality);
                self
            }

            pub fn with_clip(mut self, clip: types::Viewport) -> Self {
                self.clip = Some(clip);
                self
            }

            pub fn with_from_surface(mut self, from_surface: bool) -> Self {
                self.from_surface = Some(from_surface);
                self
            }

            pub fn with_capture_beyond_viewport(mut self, capture_beyond_viewport: bool) -> Self {
                self.capture_beyond_viewport = Some(capture_beyond_viewport);
                self
            }

            pub fn with_optimize_for_speed(mut self, optimize_for_speed: bool) -> Self {
                self.optimize_for_speed = Some(optimize_for_speed);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CaptureScreenshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CaptureScreenshot {
            type Response = responses::CaptureScreenshotResponse;
            const METHOD: &'static str = "Page.captureScreenshot";
        }

        /// Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CaptureSnapshot {
            /// Format (defaults to mhtml).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub format: Option<String>,
        }

        impl CaptureSnapshot {
            pub fn new() -> Self {
                Self { format: None }
            }

            pub fn with_format(mut self, format: impl Into<String>) -> Self {
                self.format = Some(format.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CaptureSnapshotResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CaptureSnapshot {
            type Response = responses::CaptureSnapshotResponse;
            const METHOD: &'static str = "Page.captureSnapshot";
        }

        /// Clears the overridden device metrics.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDeviceMetricsOverride {}

        impl ClearDeviceMetricsOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDeviceMetricsOverride {
            type Response = ();
            const METHOD: &'static str = "Page.clearDeviceMetricsOverride";
        }

        /// Clears the overridden Device Orientation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDeviceOrientationOverride {}

        impl ClearDeviceOrientationOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDeviceOrientationOverride {
            type Response = ();
            const METHOD: &'static str = "Page.clearDeviceOrientationOverride";
        }

        /// Clears the overridden Geolocation Position and Error.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearGeolocationOverride {}

        impl ClearGeolocationOverride {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearGeolocationOverride {
            type Response = ();
            const METHOD: &'static str = "Page.clearGeolocationOverride";
        }

        /// Creates an isolated world for the given frame.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateIsolatedWorld {
            /// Id of the frame in which the isolated world should be created.
            pub frame_id: types::FrameId,
            /// An optional name which is reported in the Execution Context.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub world_name: Option<String>,
            /// Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub grant_univeral_access: Option<bool>,
        }

        impl CreateIsolatedWorld {
            pub fn new(frame_id: types::FrameId) -> Self {
                Self {
                    frame_id,
                    world_name: None,
                    grant_univeral_access: None,
                }
            }

            pub fn with_world_name(mut self, world_name: impl Into<String>) -> Self {
                self.world_name = Some(world_name.into());
                self
            }

            pub fn with_grant_univeral_access(mut self, grant_univeral_access: bool) -> Self {
                self.grant_univeral_access = Some(grant_univeral_access);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CreateIsolatedWorldResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CreateIsolatedWorld {
            type Response = responses::CreateIsolatedWorldResponse;
            const METHOD: &'static str = "Page.createIsolatedWorld";
        }

        /// Deletes browser cookie with given name, domain and path.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteCookie {
            /// Name of the cookie to remove.
            pub cookie_name: String,
            /// URL to match cooke domain and path.
            pub url: String,
        }

        impl DeleteCookie {
            pub fn new(cookie_name: impl Into<String>, url: impl Into<String>) -> Self {
                Self {
                    cookie_name: cookie_name.into(),
                    url: url.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteCookie {
            type Response = ();
            const METHOD: &'static str = "Page.deleteCookie";
        }

        /// Disables page domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Page.disable";
        }

        /// Enables page domain notifications.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// If true, the `Page.fileChooserOpened` event will be emitted regardless of the state set by `Page.setInterceptFileChooserDialog` command (default: false).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enable_file_chooser_opened_event: Option<bool>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self {
                    enable_file_chooser_opened_event: None,
                }
            }

            pub fn with_enable_file_chooser_opened_event(
                mut self,
                enable_file_chooser_opened_event: bool,
            ) -> Self {
                self.enable_file_chooser_opened_event = Some(enable_file_chooser_opened_event);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Page.enable";
        }

        /// Gets the processed manifest for this current document.  This API always waits for the manifest to be loaded.  If manifestId is provided, and it does not match the manifest of the   current document, this API errors out.  If there is not a loaded page, this API errors out immediately.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAppManifest {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub manifest_id: Option<String>,
        }

        impl GetAppManifest {
            pub fn new() -> Self {
                Self { manifest_id: None }
            }

            pub fn with_manifest_id(mut self, manifest_id: impl Into<String>) -> Self {
                self.manifest_id = Some(manifest_id.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAppManifestResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAppManifest {
            type Response = responses::GetAppManifestResponse;
            const METHOD: &'static str = "Page.getAppManifest";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInstallabilityErrors {}

        impl GetInstallabilityErrors {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetInstallabilityErrorsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetInstallabilityErrors {
            type Response = responses::GetInstallabilityErrorsResponse;
            const METHOD: &'static str = "Page.getInstallabilityErrors";
        }

        /// Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetManifestIcons {}

        impl GetManifestIcons {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetManifestIconsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetManifestIcons {
            type Response = responses::GetManifestIconsResponse;
            const METHOD: &'static str = "Page.getManifestIcons";
        }

        /// Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAppId {}

        impl GetAppId {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAppIdResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAppId {
            type Response = responses::GetAppIdResponse;
            const METHOD: &'static str = "Page.getAppId";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAdScriptAncestry {
            pub frame_id: types::FrameId,
        }

        impl GetAdScriptAncestry {
            pub fn new(frame_id: types::FrameId) -> Self {
                Self { frame_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAdScriptAncestryResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAdScriptAncestry {
            type Response = responses::GetAdScriptAncestryResponse;
            const METHOD: &'static str = "Page.getAdScriptAncestry";
        }

        /// Returns present frame tree structure.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFrameTree {}

        impl GetFrameTree {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetFrameTreeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetFrameTree {
            type Response = responses::GetFrameTreeResponse;
            const METHOD: &'static str = "Page.getFrameTree";
        }

        /// Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetLayoutMetrics {}

        impl GetLayoutMetrics {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetLayoutMetricsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetLayoutMetrics {
            type Response = responses::GetLayoutMetricsResponse;
            const METHOD: &'static str = "Page.getLayoutMetrics";
        }

        /// Returns navigation history for the current page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetNavigationHistory {}

        impl GetNavigationHistory {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetNavigationHistoryResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetNavigationHistory {
            type Response = responses::GetNavigationHistoryResponse;
            const METHOD: &'static str = "Page.getNavigationHistory";
        }

        /// Resets navigation history for the current page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResetNavigationHistory {}

        impl ResetNavigationHistory {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResetNavigationHistory {
            type Response = ();
            const METHOD: &'static str = "Page.resetNavigationHistory";
        }

        /// Returns content of the given resource.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResourceContent {
            /// Frame id to get resource for.
            pub frame_id: types::FrameId,
            /// URL of the resource to get content for.
            pub url: String,
        }

        impl GetResourceContent {
            pub fn new(frame_id: types::FrameId, url: impl Into<String>) -> Self {
                Self {
                    frame_id,
                    url: url.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetResourceContentResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetResourceContent {
            type Response = responses::GetResourceContentResponse;
            const METHOD: &'static str = "Page.getResourceContent";
        }

        /// Returns present frame / resource tree structure.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetResourceTree {}

        impl GetResourceTree {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetResourceTreeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetResourceTree {
            type Response = responses::GetResourceTreeResponse;
            const METHOD: &'static str = "Page.getResourceTree";
        }

        /// Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HandleJavaScriptDialog {
            /// Whether to accept or dismiss the dialog.
            pub accept: bool,
            /// The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub prompt_text: Option<String>,
        }

        impl HandleJavaScriptDialog {
            pub fn new(accept: bool) -> Self {
                Self {
                    accept,
                    prompt_text: None,
                }
            }

            pub fn with_prompt_text(mut self, prompt_text: impl Into<String>) -> Self {
                self.prompt_text = Some(prompt_text.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HandleJavaScriptDialog {
            type Response = ();
            const METHOD: &'static str = "Page.handleJavaScriptDialog";
        }

        /// Navigates current page to the given URL.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Navigate {
            /// URL to navigate the page to.
            pub url: String,
            /// Referrer URL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub referrer: Option<String>,
            /// Intended transition type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub transition_type: Option<types::TransitionType>,
            /// Frame id to navigate, if not specified navigates the top frame.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<types::FrameId>,
            /// Referrer-policy used for the navigation.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub referrer_policy: Option<types::ReferrerPolicy>,
        }

        impl Navigate {
            pub fn new(url: impl Into<String>) -> Self {
                Self {
                    url: url.into(),
                    referrer: None,
                    transition_type: None,
                    frame_id: None,
                    referrer_policy: None,
                }
            }

            pub fn with_referrer(mut self, referrer: impl Into<String>) -> Self {
                self.referrer = Some(referrer.into());
                self
            }

            pub fn with_transition_type(mut self, transition_type: types::TransitionType) -> Self {
                self.transition_type = Some(transition_type);
                self
            }

            pub fn with_frame_id(mut self, frame_id: types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }

            pub fn with_referrer_policy(mut self, referrer_policy: types::ReferrerPolicy) -> Self {
                self.referrer_policy = Some(referrer_policy);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::NavigateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Navigate {
            type Response = responses::NavigateResponse;
            const METHOD: &'static str = "Page.navigate";
        }

        /// Navigates current page to the given history entry.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NavigateToHistoryEntry {
            /// Unique id of the entry to navigate to.
            pub entry_id: i64,
        }

        impl NavigateToHistoryEntry {
            pub fn new(entry_id: i64) -> Self {
                Self { entry_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for NavigateToHistoryEntry {
            type Response = ();
            const METHOD: &'static str = "Page.navigateToHistoryEntry";
        }

        /// Print page as PDF.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PrintToPdf {
            /// Paper orientation. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub landscape: Option<bool>,
            /// Display header and footer. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub display_header_footer: Option<bool>,
            /// Print background graphics. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub print_background: Option<bool>,
            /// Scale of the webpage rendering. Defaults to 1.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scale: Option<f64>,
            /// Paper width in inches. Defaults to 8.5 inches.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub paper_width: Option<f64>,
            /// Paper height in inches. Defaults to 11 inches.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub paper_height: Option<f64>,
            /// Top margin in inches. Defaults to 1cm (~0.4 inches).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub margin_top: Option<f64>,
            /// Bottom margin in inches. Defaults to 1cm (~0.4 inches).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub margin_bottom: Option<f64>,
            /// Left margin in inches. Defaults to 1cm (~0.4 inches).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub margin_left: Option<f64>,
            /// Right margin in inches. Defaults to 1cm (~0.4 inches).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub margin_right: Option<f64>,
            /// Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub page_ranges: Option<String>,
            /// HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document For example, `<span class=title></span>` would generate span containing the title.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub header_template: Option<String>,
            /// HTML template for the print footer. Should use the same format as the `headerTemplate`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub footer_template: Option<String>,
            /// Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "preferCSSPageSize")]
            pub prefer_css_page_size: Option<bool>,
            /// return as stream
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub transfer_mode: Option<String>,
            /// Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "generateTaggedPDF")]
            pub generate_tagged_pdf: Option<bool>,
            /// Whether or not to embed the document outline into the PDF.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generate_document_outline: Option<bool>,
        }

        impl PrintToPdf {
            pub fn new() -> Self {
                Self {
                    landscape: None,
                    display_header_footer: None,
                    print_background: None,
                    scale: None,
                    paper_width: None,
                    paper_height: None,
                    margin_top: None,
                    margin_bottom: None,
                    margin_left: None,
                    margin_right: None,
                    page_ranges: None,
                    header_template: None,
                    footer_template: None,
                    prefer_css_page_size: None,
                    transfer_mode: None,
                    generate_tagged_pdf: None,
                    generate_document_outline: None,
                }
            }

            pub fn with_landscape(mut self, landscape: bool) -> Self {
                self.landscape = Some(landscape);
                self
            }

            pub fn with_display_header_footer(mut self, display_header_footer: bool) -> Self {
                self.display_header_footer = Some(display_header_footer);
                self
            }

            pub fn with_print_background(mut self, print_background: bool) -> Self {
                self.print_background = Some(print_background);
                self
            }

            pub fn with_scale(mut self, scale: f64) -> Self {
                self.scale = Some(scale);
                self
            }

            pub fn with_paper_width(mut self, paper_width: f64) -> Self {
                self.paper_width = Some(paper_width);
                self
            }

            pub fn with_paper_height(mut self, paper_height: f64) -> Self {
                self.paper_height = Some(paper_height);
                self
            }

            pub fn with_margin_top(mut self, margin_top: f64) -> Self {
                self.margin_top = Some(margin_top);
                self
            }

            pub fn with_margin_bottom(mut self, margin_bottom: f64) -> Self {
                self.margin_bottom = Some(margin_bottom);
                self
            }

            pub fn with_margin_left(mut self, margin_left: f64) -> Self {
                self.margin_left = Some(margin_left);
                self
            }

            pub fn with_margin_right(mut self, margin_right: f64) -> Self {
                self.margin_right = Some(margin_right);
                self
            }

            pub fn with_page_ranges(mut self, page_ranges: impl Into<String>) -> Self {
                self.page_ranges = Some(page_ranges.into());
                self
            }

            pub fn with_header_template(mut self, header_template: impl Into<String>) -> Self {
                self.header_template = Some(header_template.into());
                self
            }

            pub fn with_footer_template(mut self, footer_template: impl Into<String>) -> Self {
                self.footer_template = Some(footer_template.into());
                self
            }

            pub fn with_prefer_css_page_size(mut self, prefer_css_page_size: bool) -> Self {
                self.prefer_css_page_size = Some(prefer_css_page_size);
                self
            }

            pub fn with_transfer_mode(mut self, transfer_mode: impl Into<String>) -> Self {
                self.transfer_mode = Some(transfer_mode.into());
                self
            }

            pub fn with_generate_tagged_pdf(mut self, generate_tagged_pdf: bool) -> Self {
                self.generate_tagged_pdf = Some(generate_tagged_pdf);
                self
            }

            pub fn with_generate_document_outline(
                mut self,
                generate_document_outline: bool,
            ) -> Self {
                self.generate_document_outline = Some(generate_document_outline);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::PrintToPdfResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for PrintToPdf {
            type Response = responses::PrintToPdfResponse;
            const METHOD: &'static str = "Page.printToPDF";
        }

        /// Reloads given page optionally ignoring the cache.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Reload {
            /// If true, browser cache is ignored (as if the user pressed Shift+refresh).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ignore_cache: Option<bool>,
            /// If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub script_to_evaluate_on_load: Option<String>,
            /// If set, an error will be thrown if the target page's main frame's loader id does not match the provided id. This prevents accidentally reloading an unintended target in case there's a racing navigation.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub loader_id: Option<network::types::LoaderId>,
        }

        impl Reload {
            pub fn new() -> Self {
                Self {
                    ignore_cache: None,
                    script_to_evaluate_on_load: None,
                    loader_id: None,
                }
            }

            pub fn with_ignore_cache(mut self, ignore_cache: bool) -> Self {
                self.ignore_cache = Some(ignore_cache);
                self
            }

            pub fn with_script_to_evaluate_on_load(
                mut self,
                script_to_evaluate_on_load: impl Into<String>,
            ) -> Self {
                self.script_to_evaluate_on_load = Some(script_to_evaluate_on_load.into());
                self
            }

            pub fn with_loader_id(mut self, loader_id: network::types::LoaderId) -> Self {
                self.loader_id = Some(loader_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Reload {
            type Response = ();
            const METHOD: &'static str = "Page.reload";
        }

        /// Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveScriptToEvaluateOnLoad {
            pub identifier: types::ScriptIdentifier,
        }

        impl RemoveScriptToEvaluateOnLoad {
            pub fn new(identifier: types::ScriptIdentifier) -> Self {
                Self { identifier }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveScriptToEvaluateOnLoad {
            type Response = ();
            const METHOD: &'static str = "Page.removeScriptToEvaluateOnLoad";
        }

        /// Removes given script from the list.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveScriptToEvaluateOnNewDocument {
            pub identifier: types::ScriptIdentifier,
        }

        impl RemoveScriptToEvaluateOnNewDocument {
            pub fn new(identifier: types::ScriptIdentifier) -> Self {
                Self { identifier }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveScriptToEvaluateOnNewDocument {
            type Response = ();
            const METHOD: &'static str = "Page.removeScriptToEvaluateOnNewDocument";
        }

        /// Acknowledges that a screencast frame has been received by the frontend.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreencastFrameAck {
            /// Frame number.
            pub session_id: i64,
        }

        impl ScreencastFrameAck {
            pub fn new(session_id: i64) -> Self {
                Self { session_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ScreencastFrameAck {
            type Response = ();
            const METHOD: &'static str = "Page.screencastFrameAck";
        }

        /// Searches for given string in resource content.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SearchInResource {
            /// Frame id for resource to search in.
            pub frame_id: types::FrameId,
            /// URL of the resource to search in.
            pub url: String,
            /// String to search for.
            pub query: String,
            /// If true, search is case sensitive.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub case_sensitive: Option<bool>,
            /// If true, treats string parameter as regex.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_regex: Option<bool>,
        }

        impl SearchInResource {
            pub fn new(
                frame_id: types::FrameId,
                url: impl Into<String>,
                query: impl Into<String>,
            ) -> Self {
                Self {
                    frame_id,
                    url: url.into(),
                    query: query.into(),
                    case_sensitive: None,
                    is_regex: None,
                }
            }

            pub fn with_case_sensitive(mut self, case_sensitive: bool) -> Self {
                self.case_sensitive = Some(case_sensitive);
                self
            }

            pub fn with_is_regex(mut self, is_regex: bool) -> Self {
                self.is_regex = Some(is_regex);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SearchInResourceResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SearchInResource {
            type Response = responses::SearchInResourceResponse;
            const METHOD: &'static str = "Page.searchInResource";
        }

        /// Enable Chrome's experimental ad filter on all sites.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAdBlockingEnabled {
            /// Whether to block ads.
            pub enabled: bool,
        }

        impl SetAdBlockingEnabled {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAdBlockingEnabled {
            type Response = ();
            const METHOD: &'static str = "Page.setAdBlockingEnabled";
        }

        /// Enable page Content Security Policy by-passing.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBypassCsp {
            /// Whether to bypass page CSP.
            pub enabled: bool,
        }

        impl SetBypassCsp {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBypassCsp {
            type Response = ();
            const METHOD: &'static str = "Page.setBypassCSP";
        }

        /// Get Permissions Policy state on given frame.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPermissionsPolicyState {
            pub frame_id: types::FrameId,
        }

        impl GetPermissionsPolicyState {
            pub fn new(frame_id: types::FrameId) -> Self {
                Self { frame_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetPermissionsPolicyStateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetPermissionsPolicyState {
            type Response = responses::GetPermissionsPolicyStateResponse;
            const METHOD: &'static str = "Page.getPermissionsPolicyState";
        }

        /// Get Origin Trials on given frame.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetOriginTrials {
            pub frame_id: types::FrameId,
        }

        impl GetOriginTrials {
            pub fn new(frame_id: types::FrameId) -> Self {
                Self { frame_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetOriginTrialsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetOriginTrials {
            type Response = responses::GetOriginTrialsResponse;
            const METHOD: &'static str = "Page.getOriginTrials";
        }

        /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDeviceMetricsOverride {
            /// Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
            pub width: i64,
            /// Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
            pub height: i64,
            /// Overriding device scale factor value. 0 disables the override.
            pub device_scale_factor: f64,
            /// Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
            pub mobile: bool,
            /// Scale to apply to resulting view image.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scale: Option<f64>,
            /// Overriding screen width value in pixels (minimum 0, maximum 10000000).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screen_width: Option<i64>,
            /// Overriding screen height value in pixels (minimum 0, maximum 10000000).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screen_height: Option<i64>,
            /// Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub position_x: Option<i64>,
            /// Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub position_y: Option<i64>,
            /// Do not set visible view size, rely upon explicit setVisibleSize call.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dont_set_visible_size: Option<bool>,
            /// Screen orientation override.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub screen_orientation: Option<emulation::types::ScreenOrientation>,
            /// The viewport dimensions and scale. If not set, the override is cleared.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub viewport: Option<types::Viewport>,
        }

        impl SetDeviceMetricsOverride {
            pub fn new(width: i64, height: i64, device_scale_factor: f64, mobile: bool) -> Self {
                Self {
                    width,
                    height,
                    device_scale_factor,
                    mobile,
                    scale: None,
                    screen_width: None,
                    screen_height: None,
                    position_x: None,
                    position_y: None,
                    dont_set_visible_size: None,
                    screen_orientation: None,
                    viewport: None,
                }
            }

            pub fn with_scale(mut self, scale: f64) -> Self {
                self.scale = Some(scale);
                self
            }

            pub fn with_screen_width(mut self, screen_width: i64) -> Self {
                self.screen_width = Some(screen_width);
                self
            }

            pub fn with_screen_height(mut self, screen_height: i64) -> Self {
                self.screen_height = Some(screen_height);
                self
            }

            pub fn with_position_x(mut self, position_x: i64) -> Self {
                self.position_x = Some(position_x);
                self
            }

            pub fn with_position_y(mut self, position_y: i64) -> Self {
                self.position_y = Some(position_y);
                self
            }

            pub fn with_dont_set_visible_size(mut self, dont_set_visible_size: bool) -> Self {
                self.dont_set_visible_size = Some(dont_set_visible_size);
                self
            }

            pub fn with_screen_orientation(
                mut self,
                screen_orientation: emulation::types::ScreenOrientation,
            ) -> Self {
                self.screen_orientation = Some(screen_orientation);
                self
            }

            pub fn with_viewport(mut self, viewport: types::Viewport) -> Self {
                self.viewport = Some(viewport);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDeviceMetricsOverride {
            type Response = ();
            const METHOD: &'static str = "Page.setDeviceMetricsOverride";
        }

        /// Overrides the Device Orientation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDeviceOrientationOverride {
            /// Mock alpha
            pub alpha: f64,
            /// Mock beta
            pub beta: f64,
            /// Mock gamma
            pub gamma: f64,
        }

        impl SetDeviceOrientationOverride {
            pub fn new(alpha: f64, beta: f64, gamma: f64) -> Self {
                Self { alpha, beta, gamma }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDeviceOrientationOverride {
            type Response = ();
            const METHOD: &'static str = "Page.setDeviceOrientationOverride";
        }

        /// Set generic font families.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetFontFamilies {
            /// Specifies font families to set. If a font family is not specified, it won't be changed.
            pub font_families: types::FontFamilies,
            /// Specifies font families to set for individual scripts.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub for_scripts: Option<Vec<types::ScriptFontFamilies>>,
        }

        impl SetFontFamilies {
            pub fn new(font_families: types::FontFamilies) -> Self {
                Self {
                    font_families,
                    for_scripts: None,
                }
            }

            pub fn with_for_scripts(mut self, for_scripts: Vec<types::ScriptFontFamilies>) -> Self {
                self.for_scripts = Some(for_scripts);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetFontFamilies {
            type Response = ();
            const METHOD: &'static str = "Page.setFontFamilies";
        }

        /// Set default font sizes.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetFontSizes {
            /// Specifies font sizes to set. If a font size is not specified, it won't be changed.
            pub font_sizes: types::FontSizes,
        }

        impl SetFontSizes {
            pub fn new(font_sizes: types::FontSizes) -> Self {
                Self { font_sizes }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetFontSizes {
            type Response = ();
            const METHOD: &'static str = "Page.setFontSizes";
        }

        /// Sets given markup as the document's HTML.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDocumentContent {
            /// Frame id to set HTML for.
            pub frame_id: types::FrameId,
            /// HTML content to set.
            pub html: String,
        }

        impl SetDocumentContent {
            pub fn new(frame_id: types::FrameId, html: impl Into<String>) -> Self {
                Self {
                    frame_id,
                    html: html.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDocumentContent {
            type Response = ();
            const METHOD: &'static str = "Page.setDocumentContent";
        }

        /// Set the behavior when downloading a file.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDownloadBehavior {
            /// Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
            pub behavior: String,
            /// The default path to save downloaded files to. This is required if behavior is set to 'allow'
            #[serde(skip_serializing_if = "Option::is_none")]
            pub download_path: Option<String>,
        }

        impl SetDownloadBehavior {
            pub fn new(behavior: impl Into<String>) -> Self {
                Self {
                    behavior: behavior.into(),
                    download_path: None,
                }
            }

            pub fn with_download_path(mut self, download_path: impl Into<String>) -> Self {
                self.download_path = Some(download_path.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDownloadBehavior {
            type Response = ();
            const METHOD: &'static str = "Page.setDownloadBehavior";
        }

        /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
        #[deprecated]
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetGeolocationOverride {
            /// Mock latitude
            #[serde(skip_serializing_if = "Option::is_none")]
            pub latitude: Option<f64>,
            /// Mock longitude
            #[serde(skip_serializing_if = "Option::is_none")]
            pub longitude: Option<f64>,
            /// Mock accuracy
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accuracy: Option<f64>,
        }

        impl SetGeolocationOverride {
            pub fn new() -> Self {
                Self {
                    latitude: None,
                    longitude: None,
                    accuracy: None,
                }
            }

            pub fn with_latitude(mut self, latitude: f64) -> Self {
                self.latitude = Some(latitude);
                self
            }

            pub fn with_longitude(mut self, longitude: f64) -> Self {
                self.longitude = Some(longitude);
                self
            }

            pub fn with_accuracy(mut self, accuracy: f64) -> Self {
                self.accuracy = Some(accuracy);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetGeolocationOverride {
            type Response = ();
            const METHOD: &'static str = "Page.setGeolocationOverride";
        }

        /// Controls whether page will emit lifecycle events.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetLifecycleEventsEnabled {
            /// If true, starts emitting lifecycle events.
            pub enabled: bool,
        }

        impl SetLifecycleEventsEnabled {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetLifecycleEventsEnabled {
            type Response = ();
            const METHOD: &'static str = "Page.setLifecycleEventsEnabled";
        }

        /// Toggles mouse event-based touch event emulation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetTouchEmulationEnabled {
            /// Whether the touch event emulation should be enabled.
            pub enabled: bool,
            /// Touch/gesture events configuration. Default: current platform.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub configuration: Option<String>,
        }

        impl SetTouchEmulationEnabled {
            pub fn new(enabled: bool) -> Self {
                Self {
                    enabled,
                    configuration: None,
                }
            }

            pub fn with_configuration(mut self, configuration: impl Into<String>) -> Self {
                self.configuration = Some(configuration.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetTouchEmulationEnabled {
            type Response = ();
            const METHOD: &'static str = "Page.setTouchEmulationEnabled";
        }

        /// Starts sending each frame using the `screencastFrame` event.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartScreencast {
            /// Image compression format.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub format: Option<String>,
            /// Compression quality from range [0..100].
            #[serde(skip_serializing_if = "Option::is_none")]
            pub quality: Option<i64>,
            /// Maximum screenshot width.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_width: Option<i64>,
            /// Maximum screenshot height.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_height: Option<i64>,
            /// Send every n-th frame.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub every_nth_frame: Option<i64>,
        }

        impl StartScreencast {
            pub fn new() -> Self {
                Self {
                    format: None,
                    quality: None,
                    max_width: None,
                    max_height: None,
                    every_nth_frame: None,
                }
            }

            pub fn with_format(mut self, format: impl Into<String>) -> Self {
                self.format = Some(format.into());
                self
            }

            pub fn with_quality(mut self, quality: i64) -> Self {
                self.quality = Some(quality);
                self
            }

            pub fn with_max_width(mut self, max_width: i64) -> Self {
                self.max_width = Some(max_width);
                self
            }

            pub fn with_max_height(mut self, max_height: i64) -> Self {
                self.max_height = Some(max_height);
                self
            }

            pub fn with_every_nth_frame(mut self, every_nth_frame: i64) -> Self {
                self.every_nth_frame = Some(every_nth_frame);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartScreencast {
            type Response = ();
            const METHOD: &'static str = "Page.startScreencast";
        }

        /// Force the page stop all navigations and pending resource fetches.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopLoading {}

        impl StopLoading {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopLoading {
            type Response = ();
            const METHOD: &'static str = "Page.stopLoading";
        }

        /// Crashes renderer on the IO thread, generates minidumps.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Crash {}

        impl Crash {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Crash {
            type Response = ();
            const METHOD: &'static str = "Page.crash";
        }

        /// Tries to close page, running its beforeunload hooks, if any.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Close {}

        impl Close {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Close {
            type Response = ();
            const METHOD: &'static str = "Page.close";
        }

        /// Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetWebLifecycleState {
            /// Target lifecycle state
            pub state: String,
        }

        impl SetWebLifecycleState {
            pub fn new(state: impl Into<String>) -> Self {
                Self {
                    state: state.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetWebLifecycleState {
            type Response = ();
            const METHOD: &'static str = "Page.setWebLifecycleState";
        }

        /// Stops sending each frame in the `screencastFrame`.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopScreencast {}

        impl StopScreencast {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopScreencast {
            type Response = ();
            const METHOD: &'static str = "Page.stopScreencast";
        }

        /// Requests backend to produce compilation cache for the specified scripts. `scripts` are appended to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: `Page.compilationCacheProduced`.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ProduceCompilationCache {
            pub scripts: Vec<types::CompilationCacheParams>,
        }

        impl ProduceCompilationCache {
            pub fn new(scripts: Vec<types::CompilationCacheParams>) -> Self {
                Self { scripts }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ProduceCompilationCache {
            type Response = ();
            const METHOD: &'static str = "Page.produceCompilationCache";
        }

        /// Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddCompilationCache {
            pub url: String,
            /// Base64-encoded data (Encoded as a base64 string when passed over JSON)
            pub data: String,
        }

        impl AddCompilationCache {
            pub fn new(url: impl Into<String>, data: impl Into<String>) -> Self {
                Self {
                    url: url.into(),
                    data: data.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddCompilationCache {
            type Response = ();
            const METHOD: &'static str = "Page.addCompilationCache";
        }

        /// Clears seeded compilation cache.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearCompilationCache {}

        impl ClearCompilationCache {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearCompilationCache {
            type Response = ();
            const METHOD: &'static str = "Page.clearCompilationCache";
        }

        /// Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSpcTransactionMode {
            pub mode: String,
        }

        impl SetSpcTransactionMode {
            pub fn new(mode: impl Into<String>) -> Self {
                Self { mode: mode.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSpcTransactionMode {
            type Response = ();
            const METHOD: &'static str = "Page.setSPCTransactionMode";
        }

        /// Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetRphRegistrationMode {
            pub mode: String,
        }

        impl SetRphRegistrationMode {
            pub fn new(mode: impl Into<String>) -> Self {
                Self { mode: mode.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetRphRegistrationMode {
            type Response = ();
            const METHOD: &'static str = "Page.setRPHRegistrationMode";
        }

        /// Generates a report for testing.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GenerateTestReport {
            /// Message to be displayed in the report.
            pub message: String,
            /// Specifies the endpoint group to deliver the report to.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub group: Option<String>,
        }

        impl GenerateTestReport {
            pub fn new(message: impl Into<String>) -> Self {
                Self {
                    message: message.into(),
                    group: None,
                }
            }

            pub fn with_group(mut self, group: impl Into<String>) -> Self {
                self.group = Some(group.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GenerateTestReport {
            type Response = ();
            const METHOD: &'static str = "Page.generateTestReport";
        }

        /// Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WaitForDebugger {}

        impl WaitForDebugger {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for WaitForDebugger {
            type Response = ();
            const METHOD: &'static str = "Page.waitForDebugger";
        }

        /// Intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event `Page.fileChooserOpened` is emitted.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInterceptFileChooserDialog {
            pub enabled: bool,
            /// If true, cancels the dialog by emitting relevant events (if any) in addition to not showing it if the interception is enabled (default: false).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub cancel: Option<bool>,
        }

        impl SetInterceptFileChooserDialog {
            pub fn new(enabled: bool) -> Self {
                Self {
                    enabled,
                    cancel: None,
                }
            }

            pub fn with_cancel(mut self, cancel: bool) -> Self {
                self.cancel = Some(cancel);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInterceptFileChooserDialog {
            type Response = ();
            const METHOD: &'static str = "Page.setInterceptFileChooserDialog";
        }

        /// Enable/disable prerendering manually. This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details. TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPrerenderingAllowed {
            pub is_allowed: bool,
        }

        impl SetPrerenderingAllowed {
            pub fn new(is_allowed: bool) -> Self {
                Self { is_allowed }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPrerenderingAllowed {
            type Response = ();
            const METHOD: &'static str = "Page.setPrerenderingAllowed";
        }

        /// Get the annotated page content for the main frame. This is an experimental command that is subject to change.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAnnotatedPageContent {
            /// Whether to include actionable information. Defaults to true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub include_actionable_information: Option<bool>,
        }

        impl GetAnnotatedPageContent {
            pub fn new() -> Self {
                Self {
                    include_actionable_information: None,
                }
            }

            pub fn with_include_actionable_information(
                mut self,
                include_actionable_information: bool,
            ) -> Self {
                self.include_actionable_information = Some(include_actionable_information);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetAnnotatedPageContentResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAnnotatedPageContent {
            type Response = responses::GetAnnotatedPageContentResponse;
            const METHOD: &'static str = "Page.getAnnotatedPageContent";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DomContentEventFired {
            pub timestamp: network::types::MonotonicTime,
        }

        impl DomContentEventFired {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.domContentEventFired")
            }
        }

        /// Emitted only when `page.interceptFileChooser` is enabled.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FileChooserOpened {
            /// Id of the frame containing input node.
            /// **EXPERIMENTAL**
            pub frame_id: types::FrameId,
            /// Input mode.
            pub mode: String,
            /// Input node id. Only present for file choosers opened via an `<input type="file">` element.
            /// **EXPERIMENTAL**
            pub backend_node_id: Option<dom::types::BackendNodeId>,
        }

        impl FileChooserOpened {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.fileChooserOpened")
            }
        }

        /// Fired when frame has been attached to its parent.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameAttached {
            /// Id of the frame that has been attached.
            pub frame_id: types::FrameId,
            /// Parent frame identifier.
            pub parent_frame_id: types::FrameId,
            /// JavaScript stack trace of when frame was attached, only set if frame initiated from script.
            pub stack: Option<runtime::types::StackTrace>,
        }

        impl FrameAttached {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameAttached")
            }
        }

        /// Fired when frame no longer has a scheduled navigation.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameClearedScheduledNavigation {
            /// Id of the frame that has cleared its scheduled navigation.
            pub frame_id: types::FrameId,
        }

        impl FrameClearedScheduledNavigation {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameClearedScheduledNavigation")
            }
        }

        /// Fired when frame has been detached from its parent.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameDetached {
            /// Id of the frame that has been detached.
            pub frame_id: types::FrameId,
            /// **EXPERIMENTAL**
            pub reason: String,
        }

        impl FrameDetached {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameDetached")
            }
        }

        /// Fired before frame subtree is detached. Emitted before any frame of the subtree is actually detached.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameSubtreeWillBeDetached {
            /// Id of the frame that is the root of the subtree that will be detached.
            pub frame_id: types::FrameId,
        }

        impl FrameSubtreeWillBeDetached {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameSubtreeWillBeDetached")
            }
        }

        /// Fired once navigation of the frame has completed. Frame is now associated with the new loader.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameNavigated {
            /// Frame object.
            pub frame: types::Frame,
            /// **EXPERIMENTAL**
            pub type_: types::NavigationType,
        }

        impl FrameNavigated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameNavigated")
            }
        }

        /// Fired when opening document to write to.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DocumentOpened {
            /// Frame object.
            pub frame: types::Frame,
        }

        impl DocumentOpened {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.documentOpened")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameResized {}

        impl FrameResized {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameResized")
            }
        }

        /// Fired when a navigation starts. This event is fired for both renderer-initiated and browser-initiated navigations. For renderer-initiated navigations, the event is fired after `frameRequestedNavigation`. Navigation may still be cancelled after the event is issued. Multiple events can be fired for a single navigation, for example, when a same-document navigation becomes a cross-document navigation (such as in the case of a frameset).
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameStartedNavigating {
            /// ID of the frame that is being navigated.
            pub frame_id: types::FrameId,
            /// The URL the navigation started with. The final URL can be different.
            pub url: String,
            /// Loader identifier. Even though it is present in case of same-document navigation, the previously committed loaderId would not change unless the navigation changes from a same-document to a cross-document navigation.
            pub loader_id: network::types::LoaderId,
            pub navigation_type: String,
        }

        impl FrameStartedNavigating {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameStartedNavigating")
            }
        }

        /// Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameRequestedNavigation {
            /// Id of the frame that is being navigated.
            pub frame_id: types::FrameId,
            /// The reason for the navigation.
            pub reason: types::ClientNavigationReason,
            /// The destination URL for the requested navigation.
            pub url: String,
            /// The disposition for the navigation.
            pub disposition: types::ClientNavigationDisposition,
        }

        impl FrameRequestedNavigation {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameRequestedNavigation")
            }
        }

        /// Fired when frame schedules a potential navigation.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameScheduledNavigation {
            /// Id of the frame that has scheduled a navigation.
            pub frame_id: types::FrameId,
            /// Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
            pub delay: f64,
            /// The reason for the navigation.
            pub reason: types::ClientNavigationReason,
            /// The destination URL for the scheduled navigation.
            pub url: String,
        }

        impl FrameScheduledNavigation {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameScheduledNavigation")
            }
        }

        /// Fired when frame has started loading.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameStartedLoading {
            /// Id of the frame that has started loading.
            pub frame_id: types::FrameId,
        }

        impl FrameStartedLoading {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameStartedLoading")
            }
        }

        /// Fired when frame has stopped loading.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FrameStoppedLoading {
            /// Id of the frame that has stopped loading.
            pub frame_id: types::FrameId,
        }

        impl FrameStoppedLoading {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.frameStoppedLoading")
            }
        }

        /// Fired when page is about to start a download. Deprecated. Use Browser.downloadWillBegin instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DownloadWillBegin {
            /// Id of the frame that caused download to begin.
            pub frame_id: types::FrameId,
            /// Global unique identifier of the download.
            pub guid: String,
            /// URL of the resource being downloaded.
            pub url: String,
            /// Suggested file name of the resource (the actual name of the file saved on disk may differ).
            pub suggested_filename: String,
        }

        impl DownloadWillBegin {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.downloadWillBegin")
            }
        }

        /// Fired when download makes progress. Last call has |done| == true. Deprecated. Use Browser.downloadProgress instead.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DownloadProgress {
            /// Global unique identifier of the download.
            pub guid: String,
            /// Total expected bytes to download.
            pub total_bytes: f64,
            /// Total bytes received.
            pub received_bytes: f64,
            /// Download status.
            pub state: String,
        }

        impl DownloadProgress {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.downloadProgress")
            }
        }

        /// Fired when interstitial page was hidden
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InterstitialHidden {}

        impl InterstitialHidden {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.interstitialHidden")
            }
        }

        /// Fired when interstitial page was shown
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InterstitialShown {}

        impl InterstitialShown {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.interstitialShown")
            }
        }

        /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct JavascriptDialogClosed {
            /// Frame id.
            /// **EXPERIMENTAL**
            pub frame_id: types::FrameId,
            /// Whether dialog was confirmed.
            pub result: bool,
            /// User input in case of prompt.
            pub user_input: String,
        }

        impl JavascriptDialogClosed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.javascriptDialogClosed")
            }
        }

        /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct JavascriptDialogOpening {
            /// Frame url.
            pub url: String,
            /// Frame id.
            /// **EXPERIMENTAL**
            pub frame_id: types::FrameId,
            /// Message that will be displayed by the dialog.
            pub message: String,
            /// Dialog type.
            pub type_: types::DialogType,
            /// True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
            pub has_browser_handler: bool,
            /// Default dialog prompt.
            pub default_prompt: Option<String>,
        }

        impl JavascriptDialogOpening {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.javascriptDialogOpening")
            }
        }

        /// Fired for lifecycle events (navigation, load, paint, etc) in the current target (including local frames).
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LifecycleEvent {
            /// Id of the frame.
            pub frame_id: types::FrameId,
            /// Loader identifier. Empty string if the request is fetched from worker.
            pub loader_id: network::types::LoaderId,
            pub name: String,
            pub timestamp: network::types::MonotonicTime,
        }

        impl LifecycleEvent {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.lifecycleEvent")
            }
        }

        /// Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BackForwardCacheNotUsed {
            /// The loader id for the associated navigation.
            pub loader_id: network::types::LoaderId,
            /// The frame id of the associated frame.
            pub frame_id: types::FrameId,
            /// Array of reasons why the page could not be cached. This must not be empty.
            pub not_restored_explanations: Vec<types::BackForwardCacheNotRestoredExplanation>,
            /// Tree structure of reasons why the page could not be cached for each frame.
            pub not_restored_explanations_tree:
                Option<types::BackForwardCacheNotRestoredExplanationTree>,
        }

        impl BackForwardCacheNotUsed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.backForwardCacheNotUsed")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LoadEventFired {
            pub timestamp: network::types::MonotonicTime,
        }

        impl LoadEventFired {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.loadEventFired")
            }
        }

        /// Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NavigatedWithinDocument {
            /// Id of the frame.
            pub frame_id: types::FrameId,
            /// Frame's new url.
            pub url: String,
            /// Navigation type
            pub navigation_type: String,
        }

        impl NavigatedWithinDocument {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.navigatedWithinDocument")
            }
        }

        /// Compressed image data requested by the `startScreencast`.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreencastFrame {
            /// Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON)
            pub data: String,
            /// Screencast frame metadata.
            pub metadata: types::ScreencastFrameMetadata,
            /// Frame number.
            pub session_id: i64,
        }

        impl ScreencastFrame {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.screencastFrame")
            }
        }

        /// Fired when the page with currently enabled screencast was shown or hidden `.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScreencastVisibilityChanged {
            /// True if the page is visible.
            pub visible: bool,
        }

        impl ScreencastVisibilityChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.screencastVisibilityChanged")
            }
        }

        /// Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WindowOpen {
            /// The URL for the new window.
            pub url: String,
            /// Window name.
            pub window_name: String,
            /// An array of enabled window features.
            pub window_features: Vec<String>,
            /// Whether or not it was triggered by user gesture.
            pub user_gesture: bool,
        }

        impl WindowOpen {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.windowOpen")
            }
        }

        /// Issued for every compilation cache generated.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CompilationCacheProduced {
            pub url: String,
            /// Base64-encoded data (Encoded as a base64 string when passed over JSON)
            pub data: String,
        }

        impl CompilationCacheProduced {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Page.compilationCacheProduced")
            }
        }
    }
}

pub mod performance {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Run-time execution metric.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Metric {
            /// Metric name.
            pub name: String,
            /// Metric value.
            pub value: f64,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMetricsResponse {
            /// Current values for run-time metrics.
            pub metrics: Vec<types::Metric>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Disable collecting and reporting metrics.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Performance.disable";
        }

        /// Enable collecting and reporting metrics.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// Time domain to use for collecting and reporting duration metrics.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub time_domain: Option<String>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self { time_domain: None }
            }

            pub fn with_time_domain(mut self, time_domain: impl Into<String>) -> Self {
                self.time_domain = Some(time_domain.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Performance.enable";
        }

        /// Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetTimeDomain {
            /// Time domain
            pub time_domain: String,
        }

        impl SetTimeDomain {
            pub fn new(time_domain: impl Into<String>) -> Self {
                Self {
                    time_domain: time_domain.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetTimeDomain {
            type Response = ();
            const METHOD: &'static str = "Performance.setTimeDomain";
        }

        /// Retrieve current values of run-time metrics.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetMetrics {}

        impl GetMetrics {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetMetricsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetMetrics {
            type Response = responses::GetMetricsResponse;
            const METHOD: &'static str = "Performance.getMetrics";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Current values of the metrics.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Metrics {
            /// Current values of the metrics.
            pub metrics: Vec<types::Metric>,
            /// Timestamp title.
            pub title: String,
        }

        impl Metrics {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Performance.metrics")
            }
        }
    }
}

pub mod performance_timeline {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LargestContentfulPaint {
            pub render_time: network::types::TimeSinceEpoch,
            pub load_time: network::types::TimeSinceEpoch,
            /// The number of pixels being painted.
            pub size: f64,
            /// The id attribute of the element, if available.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub element_id: Option<String>,
            /// The URL of the image (may be trimmed).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::BackendNodeId>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LayoutShiftAttribution {
            pub previous_rect: dom::types::Rect,
            pub current_rect: dom::types::Rect,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub node_id: Option<dom::types::BackendNodeId>,
        }

        /// See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LayoutShift {
            /// Score increment produced by this event.
            pub value: f64,
            pub had_recent_input: bool,
            pub last_input_time: network::types::TimeSinceEpoch,
            pub sources: Vec<LayoutShiftAttribution>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TimelineEvent {
            /// Identifies the frame that this event is related to. Empty for non-frame targets.
            pub frame_id: page::types::FrameId,
            /// The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional "details" fields is present.
            pub type_: String,
            /// Name may be empty depending on the type.
            pub name: String,
            /// Time in seconds since Epoch, monotonically increasing within document lifetime.
            pub time: network::types::TimeSinceEpoch,
            /// Event duration, if applicable.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub duration: Option<f64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub lcp_details: Option<LargestContentfulPaint>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub layout_shift_details: Option<LayoutShift>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Previously buffered events would be reported before method returns. See also: timelineEventAdded
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported.
            pub event_types: Vec<String>,
        }

        impl Enable {
            pub fn new(event_types: Vec<String>) -> Self {
                Self { event_types }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "PerformanceTimeline.enable";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Sent when a performance timeline event is added. See reportPerformanceTimeline method.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TimelineEventAdded {
            pub event: types::TimelineEvent,
        }

        impl TimelineEventAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("PerformanceTimeline.timelineEventAdded")
            }
        }
    }
}

pub mod preload {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique id
        pub type RuleSetId = String;

        /// Corresponds to SpeculationRuleSet
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RuleSet {
            pub id: RuleSetId,
            /// Identifies a document which the rule set is associated with.
            pub loader_id: network::types::LoaderId,
            /// Source text of JSON representing the rule set. If it comes from `<script>` tag, it is the textContent of the node. Note that it is a JSON for valid case. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md
            pub source_text: String,
            /// A speculation rule set is either added through an inline `<script>` tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant `<script>` tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backend_node_id: Option<dom::types::BackendNodeId>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub request_id: Option<network::types::RequestId>,
            /// Error information `errorMessage` is null iff `errorType` is null.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub error_type: Option<RuleSetErrorType>,
            /// TODO(https://crbug.com/1425354): Replace this property with structured error.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub error_message: Option<String>,
            /// For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tag: Option<String>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum RuleSetErrorType {
            #[serde(rename = "SourceIsNotJsonObject")]
            SourceIsNotJsonObject,
            #[serde(rename = "InvalidRulesSkipped")]
            InvalidRulesSkipped,
            #[serde(rename = "InvalidRulesetLevelTag")]
            InvalidRulesetLevelTag,
        }
        impl AsRef<str> for RuleSetErrorType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::SourceIsNotJsonObject => "SourceIsNotJsonObject",
                    Self::InvalidRulesSkipped => "InvalidRulesSkipped",
                    Self::InvalidRulesetLevelTag => "InvalidRulesetLevelTag",
                }
            }
        }
        impl std::str::FromStr for RuleSetErrorType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "SourceIsNotJsonObject" => Ok(Self::SourceIsNotJsonObject),
                    "InvalidRulesSkipped" => Ok(Self::InvalidRulesSkipped),
                    "InvalidRulesetLevelTag" => Ok(Self::InvalidRulesetLevelTag),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for RuleSetErrorType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The type of preloading attempted. It corresponds to mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it isn't being used by clients).
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SpeculationAction {
            #[serde(rename = "Prefetch")]
            Prefetch,
            #[serde(rename = "Prerender")]
            Prerender,
            #[serde(rename = "PrerenderUntilScript")]
            PrerenderUntilScript,
        }
        impl AsRef<str> for SpeculationAction {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Prefetch => "Prefetch",
                    Self::Prerender => "Prerender",
                    Self::PrerenderUntilScript => "PrerenderUntilScript",
                }
            }
        }
        impl std::str::FromStr for SpeculationAction {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Prefetch" => Ok(Self::Prefetch),
                    "Prerender" => Ok(Self::Prerender),
                    "PrerenderUntilScript" => Ok(Self::PrerenderUntilScript),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SpeculationAction {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Corresponds to mojom::SpeculationTargetHint. See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SpeculationTargetHint {
            #[serde(rename = "Blank")]
            Blank,
            #[serde(rename = "Self")]
            Self_,
        }
        impl AsRef<str> for SpeculationTargetHint {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Blank => "Blank",
                    Self::Self_ => "Self",
                }
            }
        }
        impl std::str::FromStr for SpeculationTargetHint {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Blank" => Ok(Self::Blank),
                    "Self" => Ok(Self::Self_),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SpeculationTargetHint {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// A key that identifies a preloading attempt. The url used is the url specified by the trigger (i.e. the initial URL), and not the final url that is navigated to. For example, prerendering allows same-origin main frame navigations during the attempt, but the attempt is still keyed with the initial URL.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PreloadingAttemptKey {
            pub loader_id: network::types::LoaderId,
            pub action: SpeculationAction,
            pub url: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_hint: Option<SpeculationTargetHint>,
        }

        /// Lists sources for a preloading attempt, specifically the ids of rule sets that had a speculation rule that triggered the attempt, and the BackendNodeIds of <a href> or <area href> elements that triggered the attempt (in the case of attempts triggered by a document rule). It is possible for multiple rule sets and links to trigger a single attempt.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PreloadingAttemptSource {
            pub key: PreloadingAttemptKey,
            pub rule_set_ids: Vec<RuleSetId>,
            pub node_ids: Vec<dom::types::BackendNodeId>,
        }

        /// Chrome manages different types of preloads together using a concept of preloading pipeline. For example, if a site uses a SpeculationRules for prerender, Chrome first starts a prefetch and then upgrades it to prerender. CDP events for them are emitted separately but they share `PreloadPipelineId`.
        pub type PreloadPipelineId = String;

        /// List of FinalStatus reasons for Prerender2.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PrerenderFinalStatus {
            #[serde(rename = "Activated")]
            Activated,
            #[serde(rename = "Destroyed")]
            Destroyed,
            #[serde(rename = "LowEndDevice")]
            LowEndDevice,
            #[serde(rename = "InvalidSchemeRedirect")]
            InvalidSchemeRedirect,
            #[serde(rename = "InvalidSchemeNavigation")]
            InvalidSchemeNavigation,
            #[serde(rename = "NavigationRequestBlockedByCsp")]
            NavigationRequestBlockedByCsp,
            #[serde(rename = "MojoBinderPolicy")]
            MojoBinderPolicy,
            #[serde(rename = "RendererProcessCrashed")]
            RendererProcessCrashed,
            #[serde(rename = "RendererProcessKilled")]
            RendererProcessKilled,
            #[serde(rename = "Download")]
            Download,
            #[serde(rename = "TriggerDestroyed")]
            TriggerDestroyed,
            #[serde(rename = "NavigationNotCommitted")]
            NavigationNotCommitted,
            #[serde(rename = "NavigationBadHttpStatus")]
            NavigationBadHttpStatus,
            #[serde(rename = "ClientCertRequested")]
            ClientCertRequested,
            #[serde(rename = "NavigationRequestNetworkError")]
            NavigationRequestNetworkError,
            #[serde(rename = "CancelAllHostsForTesting")]
            CancelAllHostsForTesting,
            #[serde(rename = "DidFailLoad")]
            DidFailLoad,
            #[serde(rename = "Stop")]
            Stop,
            #[serde(rename = "SslCertificateError")]
            SslCertificateError,
            #[serde(rename = "LoginAuthRequested")]
            LoginAuthRequested,
            #[serde(rename = "UaChangeRequiresReload")]
            UaChangeRequiresReload,
            #[serde(rename = "BlockedByClient")]
            BlockedByClient,
            #[serde(rename = "AudioOutputDeviceRequested")]
            AudioOutputDeviceRequested,
            #[serde(rename = "MixedContent")]
            MixedContent,
            #[serde(rename = "TriggerBackgrounded")]
            TriggerBackgrounded,
            #[serde(rename = "MemoryLimitExceeded")]
            MemoryLimitExceeded,
            #[serde(rename = "DataSaverEnabled")]
            DataSaverEnabled,
            #[serde(rename = "TriggerUrlHasEffectiveUrl")]
            TriggerUrlHasEffectiveUrl,
            #[serde(rename = "ActivatedBeforeStarted")]
            ActivatedBeforeStarted,
            #[serde(rename = "InactivePageRestriction")]
            InactivePageRestriction,
            #[serde(rename = "StartFailed")]
            StartFailed,
            #[serde(rename = "TimeoutBackgrounded")]
            TimeoutBackgrounded,
            #[serde(rename = "CrossSiteRedirectInInitialNavigation")]
            CrossSiteRedirectInInitialNavigation,
            #[serde(rename = "CrossSiteNavigationInInitialNavigation")]
            CrossSiteNavigationInInitialNavigation,
            #[serde(rename = "SameSiteCrossOriginRedirectNotOptInInInitialNavigation")]
            SameSiteCrossOriginRedirectNotOptInInInitialNavigation,
            #[serde(rename = "SameSiteCrossOriginNavigationNotOptInInInitialNavigation")]
            SameSiteCrossOriginNavigationNotOptInInInitialNavigation,
            #[serde(rename = "ActivationNavigationParameterMismatch")]
            ActivationNavigationParameterMismatch,
            #[serde(rename = "ActivatedInBackground")]
            ActivatedInBackground,
            #[serde(rename = "EmbedderHostDisallowed")]
            EmbedderHostDisallowed,
            #[serde(rename = "ActivationNavigationDestroyedBeforeSuccess")]
            ActivationNavigationDestroyedBeforeSuccess,
            #[serde(rename = "TabClosedByUserGesture")]
            TabClosedByUserGesture,
            #[serde(rename = "TabClosedWithoutUserGesture")]
            TabClosedWithoutUserGesture,
            #[serde(rename = "PrimaryMainFrameRendererProcessCrashed")]
            PrimaryMainFrameRendererProcessCrashed,
            #[serde(rename = "PrimaryMainFrameRendererProcessKilled")]
            PrimaryMainFrameRendererProcessKilled,
            #[serde(rename = "ActivationFramePolicyNotCompatible")]
            ActivationFramePolicyNotCompatible,
            #[serde(rename = "PreloadingDisabled")]
            PreloadingDisabled,
            #[serde(rename = "BatterySaverEnabled")]
            BatterySaverEnabled,
            #[serde(rename = "ActivatedDuringMainFrameNavigation")]
            ActivatedDuringMainFrameNavigation,
            #[serde(rename = "PreloadingUnsupportedByWebContents")]
            PreloadingUnsupportedByWebContents,
            #[serde(rename = "CrossSiteRedirectInMainFrameNavigation")]
            CrossSiteRedirectInMainFrameNavigation,
            #[serde(rename = "CrossSiteNavigationInMainFrameNavigation")]
            CrossSiteNavigationInMainFrameNavigation,
            #[serde(rename = "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation")]
            SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation,
            #[serde(rename = "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation")]
            SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation,
            #[serde(rename = "MemoryPressureOnTrigger")]
            MemoryPressureOnTrigger,
            #[serde(rename = "MemoryPressureAfterTriggered")]
            MemoryPressureAfterTriggered,
            #[serde(rename = "PrerenderingDisabledByDevTools")]
            PrerenderingDisabledByDevTools,
            #[serde(rename = "SpeculationRuleRemoved")]
            SpeculationRuleRemoved,
            #[serde(rename = "ActivatedWithAuxiliaryBrowsingContexts")]
            ActivatedWithAuxiliaryBrowsingContexts,
            #[serde(rename = "MaxNumOfRunningEagerPrerendersExceeded")]
            MaxNumOfRunningEagerPrerendersExceeded,
            #[serde(rename = "MaxNumOfRunningNonEagerPrerendersExceeded")]
            MaxNumOfRunningNonEagerPrerendersExceeded,
            #[serde(rename = "MaxNumOfRunningEmbedderPrerendersExceeded")]
            MaxNumOfRunningEmbedderPrerendersExceeded,
            #[serde(rename = "PrerenderingUrlHasEffectiveUrl")]
            PrerenderingUrlHasEffectiveUrl,
            #[serde(rename = "RedirectedPrerenderingUrlHasEffectiveUrl")]
            RedirectedPrerenderingUrlHasEffectiveUrl,
            #[serde(rename = "ActivationUrlHasEffectiveUrl")]
            ActivationUrlHasEffectiveUrl,
            #[serde(rename = "JavaScriptInterfaceAdded")]
            JavaScriptInterfaceAdded,
            #[serde(rename = "JavaScriptInterfaceRemoved")]
            JavaScriptInterfaceRemoved,
            #[serde(rename = "AllPrerenderingCanceled")]
            AllPrerenderingCanceled,
            #[serde(rename = "WindowClosed")]
            WindowClosed,
            #[serde(rename = "SlowNetwork")]
            SlowNetwork,
            #[serde(rename = "OtherPrerenderedPageActivated")]
            OtherPrerenderedPageActivated,
            #[serde(rename = "V8OptimizerDisabled")]
            V8OptimizerDisabled,
            #[serde(rename = "PrerenderFailedDuringPrefetch")]
            PrerenderFailedDuringPrefetch,
            #[serde(rename = "BrowsingDataRemoved")]
            BrowsingDataRemoved,
            #[serde(rename = "PrerenderHostReused")]
            PrerenderHostReused,
        }
        impl AsRef<str> for PrerenderFinalStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Activated => "Activated",
                    Self::Destroyed => "Destroyed",
                    Self::LowEndDevice => "LowEndDevice",
                    Self::InvalidSchemeRedirect => "InvalidSchemeRedirect",
                    Self::InvalidSchemeNavigation => "InvalidSchemeNavigation",
                    Self::NavigationRequestBlockedByCsp => "NavigationRequestBlockedByCsp",
                    Self::MojoBinderPolicy => "MojoBinderPolicy",
                    Self::RendererProcessCrashed => "RendererProcessCrashed",
                    Self::RendererProcessKilled => "RendererProcessKilled",
                    Self::Download => "Download",
                    Self::TriggerDestroyed => "TriggerDestroyed",
                    Self::NavigationNotCommitted => "NavigationNotCommitted",
                    Self::NavigationBadHttpStatus => "NavigationBadHttpStatus",
                    Self::ClientCertRequested => "ClientCertRequested",
                    Self::NavigationRequestNetworkError => "NavigationRequestNetworkError",
                    Self::CancelAllHostsForTesting => "CancelAllHostsForTesting",
                    Self::DidFailLoad => "DidFailLoad",
                    Self::Stop => "Stop",
                    Self::SslCertificateError => "SslCertificateError",
                    Self::LoginAuthRequested => "LoginAuthRequested",
                    Self::UaChangeRequiresReload => "UaChangeRequiresReload",
                    Self::BlockedByClient => "BlockedByClient",
                    Self::AudioOutputDeviceRequested => "AudioOutputDeviceRequested",
                    Self::MixedContent => "MixedContent",
                    Self::TriggerBackgrounded => "TriggerBackgrounded",
                    Self::MemoryLimitExceeded => "MemoryLimitExceeded",
                    Self::DataSaverEnabled => "DataSaverEnabled",
                    Self::TriggerUrlHasEffectiveUrl => "TriggerUrlHasEffectiveUrl",
                    Self::ActivatedBeforeStarted => "ActivatedBeforeStarted",
                    Self::InactivePageRestriction => "InactivePageRestriction",
                    Self::StartFailed => "StartFailed",
                    Self::TimeoutBackgrounded => "TimeoutBackgrounded",
                    Self::CrossSiteRedirectInInitialNavigation => {
                        "CrossSiteRedirectInInitialNavigation"
                    }
                    Self::CrossSiteNavigationInInitialNavigation => {
                        "CrossSiteNavigationInInitialNavigation"
                    }
                    Self::SameSiteCrossOriginRedirectNotOptInInInitialNavigation => {
                        "SameSiteCrossOriginRedirectNotOptInInInitialNavigation"
                    }
                    Self::SameSiteCrossOriginNavigationNotOptInInInitialNavigation => {
                        "SameSiteCrossOriginNavigationNotOptInInInitialNavigation"
                    }
                    Self::ActivationNavigationParameterMismatch => {
                        "ActivationNavigationParameterMismatch"
                    }
                    Self::ActivatedInBackground => "ActivatedInBackground",
                    Self::EmbedderHostDisallowed => "EmbedderHostDisallowed",
                    Self::ActivationNavigationDestroyedBeforeSuccess => {
                        "ActivationNavigationDestroyedBeforeSuccess"
                    }
                    Self::TabClosedByUserGesture => "TabClosedByUserGesture",
                    Self::TabClosedWithoutUserGesture => "TabClosedWithoutUserGesture",
                    Self::PrimaryMainFrameRendererProcessCrashed => {
                        "PrimaryMainFrameRendererProcessCrashed"
                    }
                    Self::PrimaryMainFrameRendererProcessKilled => {
                        "PrimaryMainFrameRendererProcessKilled"
                    }
                    Self::ActivationFramePolicyNotCompatible => {
                        "ActivationFramePolicyNotCompatible"
                    }
                    Self::PreloadingDisabled => "PreloadingDisabled",
                    Self::BatterySaverEnabled => "BatterySaverEnabled",
                    Self::ActivatedDuringMainFrameNavigation => {
                        "ActivatedDuringMainFrameNavigation"
                    }
                    Self::PreloadingUnsupportedByWebContents => {
                        "PreloadingUnsupportedByWebContents"
                    }
                    Self::CrossSiteRedirectInMainFrameNavigation => {
                        "CrossSiteRedirectInMainFrameNavigation"
                    }
                    Self::CrossSiteNavigationInMainFrameNavigation => {
                        "CrossSiteNavigationInMainFrameNavigation"
                    }
                    Self::SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation => {
                        "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation"
                    }
                    Self::SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation => {
                        "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation"
                    }
                    Self::MemoryPressureOnTrigger => "MemoryPressureOnTrigger",
                    Self::MemoryPressureAfterTriggered => "MemoryPressureAfterTriggered",
                    Self::PrerenderingDisabledByDevTools => "PrerenderingDisabledByDevTools",
                    Self::SpeculationRuleRemoved => "SpeculationRuleRemoved",
                    Self::ActivatedWithAuxiliaryBrowsingContexts => {
                        "ActivatedWithAuxiliaryBrowsingContexts"
                    }
                    Self::MaxNumOfRunningEagerPrerendersExceeded => {
                        "MaxNumOfRunningEagerPrerendersExceeded"
                    }
                    Self::MaxNumOfRunningNonEagerPrerendersExceeded => {
                        "MaxNumOfRunningNonEagerPrerendersExceeded"
                    }
                    Self::MaxNumOfRunningEmbedderPrerendersExceeded => {
                        "MaxNumOfRunningEmbedderPrerendersExceeded"
                    }
                    Self::PrerenderingUrlHasEffectiveUrl => "PrerenderingUrlHasEffectiveUrl",
                    Self::RedirectedPrerenderingUrlHasEffectiveUrl => {
                        "RedirectedPrerenderingUrlHasEffectiveUrl"
                    }
                    Self::ActivationUrlHasEffectiveUrl => "ActivationUrlHasEffectiveUrl",
                    Self::JavaScriptInterfaceAdded => "JavaScriptInterfaceAdded",
                    Self::JavaScriptInterfaceRemoved => "JavaScriptInterfaceRemoved",
                    Self::AllPrerenderingCanceled => "AllPrerenderingCanceled",
                    Self::WindowClosed => "WindowClosed",
                    Self::SlowNetwork => "SlowNetwork",
                    Self::OtherPrerenderedPageActivated => "OtherPrerenderedPageActivated",
                    Self::V8OptimizerDisabled => "V8OptimizerDisabled",
                    Self::PrerenderFailedDuringPrefetch => "PrerenderFailedDuringPrefetch",
                    Self::BrowsingDataRemoved => "BrowsingDataRemoved",
                    Self::PrerenderHostReused => "PrerenderHostReused",
                }
            }
        }
        impl std::str::FromStr for PrerenderFinalStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Activated" => Ok(Self::Activated),
                    "Destroyed" => Ok(Self::Destroyed),
                    "LowEndDevice" => Ok(Self::LowEndDevice),
                    "InvalidSchemeRedirect" => Ok(Self::InvalidSchemeRedirect),
                    "InvalidSchemeNavigation" => Ok(Self::InvalidSchemeNavigation),
                    "NavigationRequestBlockedByCsp" => Ok(Self::NavigationRequestBlockedByCsp),
                    "MojoBinderPolicy" => Ok(Self::MojoBinderPolicy),
                    "RendererProcessCrashed" => Ok(Self::RendererProcessCrashed),
                    "RendererProcessKilled" => Ok(Self::RendererProcessKilled),
                    "Download" => Ok(Self::Download),
                    "TriggerDestroyed" => Ok(Self::TriggerDestroyed),
                    "NavigationNotCommitted" => Ok(Self::NavigationNotCommitted),
                    "NavigationBadHttpStatus" => Ok(Self::NavigationBadHttpStatus),
                    "ClientCertRequested" => Ok(Self::ClientCertRequested),
                    "NavigationRequestNetworkError" => Ok(Self::NavigationRequestNetworkError),
                    "CancelAllHostsForTesting" => Ok(Self::CancelAllHostsForTesting),
                    "DidFailLoad" => Ok(Self::DidFailLoad),
                    "Stop" => Ok(Self::Stop),
                    "SslCertificateError" => Ok(Self::SslCertificateError),
                    "LoginAuthRequested" => Ok(Self::LoginAuthRequested),
                    "UaChangeRequiresReload" => Ok(Self::UaChangeRequiresReload),
                    "BlockedByClient" => Ok(Self::BlockedByClient),
                    "AudioOutputDeviceRequested" => Ok(Self::AudioOutputDeviceRequested),
                    "MixedContent" => Ok(Self::MixedContent),
                    "TriggerBackgrounded" => Ok(Self::TriggerBackgrounded),
                    "MemoryLimitExceeded" => Ok(Self::MemoryLimitExceeded),
                    "DataSaverEnabled" => Ok(Self::DataSaverEnabled),
                    "TriggerUrlHasEffectiveUrl" => Ok(Self::TriggerUrlHasEffectiveUrl),
                    "ActivatedBeforeStarted" => Ok(Self::ActivatedBeforeStarted),
                    "InactivePageRestriction" => Ok(Self::InactivePageRestriction),
                    "StartFailed" => Ok(Self::StartFailed),
                    "TimeoutBackgrounded" => Ok(Self::TimeoutBackgrounded),
                    "CrossSiteRedirectInInitialNavigation" => {
                        Ok(Self::CrossSiteRedirectInInitialNavigation)
                    }
                    "CrossSiteNavigationInInitialNavigation" => {
                        Ok(Self::CrossSiteNavigationInInitialNavigation)
                    }
                    "SameSiteCrossOriginRedirectNotOptInInInitialNavigation" => {
                        Ok(Self::SameSiteCrossOriginRedirectNotOptInInInitialNavigation)
                    }
                    "SameSiteCrossOriginNavigationNotOptInInInitialNavigation" => {
                        Ok(Self::SameSiteCrossOriginNavigationNotOptInInInitialNavigation)
                    }
                    "ActivationNavigationParameterMismatch" => {
                        Ok(Self::ActivationNavigationParameterMismatch)
                    }
                    "ActivatedInBackground" => Ok(Self::ActivatedInBackground),
                    "EmbedderHostDisallowed" => Ok(Self::EmbedderHostDisallowed),
                    "ActivationNavigationDestroyedBeforeSuccess" => {
                        Ok(Self::ActivationNavigationDestroyedBeforeSuccess)
                    }
                    "TabClosedByUserGesture" => Ok(Self::TabClosedByUserGesture),
                    "TabClosedWithoutUserGesture" => Ok(Self::TabClosedWithoutUserGesture),
                    "PrimaryMainFrameRendererProcessCrashed" => {
                        Ok(Self::PrimaryMainFrameRendererProcessCrashed)
                    }
                    "PrimaryMainFrameRendererProcessKilled" => {
                        Ok(Self::PrimaryMainFrameRendererProcessKilled)
                    }
                    "ActivationFramePolicyNotCompatible" => {
                        Ok(Self::ActivationFramePolicyNotCompatible)
                    }
                    "PreloadingDisabled" => Ok(Self::PreloadingDisabled),
                    "BatterySaverEnabled" => Ok(Self::BatterySaverEnabled),
                    "ActivatedDuringMainFrameNavigation" => {
                        Ok(Self::ActivatedDuringMainFrameNavigation)
                    }
                    "PreloadingUnsupportedByWebContents" => {
                        Ok(Self::PreloadingUnsupportedByWebContents)
                    }
                    "CrossSiteRedirectInMainFrameNavigation" => {
                        Ok(Self::CrossSiteRedirectInMainFrameNavigation)
                    }
                    "CrossSiteNavigationInMainFrameNavigation" => {
                        Ok(Self::CrossSiteNavigationInMainFrameNavigation)
                    }
                    "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation" => {
                        Ok(Self::SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation)
                    }
                    "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation" => {
                        Ok(Self::SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation)
                    }
                    "MemoryPressureOnTrigger" => Ok(Self::MemoryPressureOnTrigger),
                    "MemoryPressureAfterTriggered" => Ok(Self::MemoryPressureAfterTriggered),
                    "PrerenderingDisabledByDevTools" => Ok(Self::PrerenderingDisabledByDevTools),
                    "SpeculationRuleRemoved" => Ok(Self::SpeculationRuleRemoved),
                    "ActivatedWithAuxiliaryBrowsingContexts" => {
                        Ok(Self::ActivatedWithAuxiliaryBrowsingContexts)
                    }
                    "MaxNumOfRunningEagerPrerendersExceeded" => {
                        Ok(Self::MaxNumOfRunningEagerPrerendersExceeded)
                    }
                    "MaxNumOfRunningNonEagerPrerendersExceeded" => {
                        Ok(Self::MaxNumOfRunningNonEagerPrerendersExceeded)
                    }
                    "MaxNumOfRunningEmbedderPrerendersExceeded" => {
                        Ok(Self::MaxNumOfRunningEmbedderPrerendersExceeded)
                    }
                    "PrerenderingUrlHasEffectiveUrl" => Ok(Self::PrerenderingUrlHasEffectiveUrl),
                    "RedirectedPrerenderingUrlHasEffectiveUrl" => {
                        Ok(Self::RedirectedPrerenderingUrlHasEffectiveUrl)
                    }
                    "ActivationUrlHasEffectiveUrl" => Ok(Self::ActivationUrlHasEffectiveUrl),
                    "JavaScriptInterfaceAdded" => Ok(Self::JavaScriptInterfaceAdded),
                    "JavaScriptInterfaceRemoved" => Ok(Self::JavaScriptInterfaceRemoved),
                    "AllPrerenderingCanceled" => Ok(Self::AllPrerenderingCanceled),
                    "WindowClosed" => Ok(Self::WindowClosed),
                    "SlowNetwork" => Ok(Self::SlowNetwork),
                    "OtherPrerenderedPageActivated" => Ok(Self::OtherPrerenderedPageActivated),
                    "V8OptimizerDisabled" => Ok(Self::V8OptimizerDisabled),
                    "PrerenderFailedDuringPrefetch" => Ok(Self::PrerenderFailedDuringPrefetch),
                    "BrowsingDataRemoved" => Ok(Self::BrowsingDataRemoved),
                    "PrerenderHostReused" => Ok(Self::PrerenderHostReused),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PrerenderFinalStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Preloading status values, see also PreloadingTriggeringOutcome. This status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PreloadingStatus {
            #[serde(rename = "Pending")]
            Pending,
            #[serde(rename = "Running")]
            Running,
            #[serde(rename = "Ready")]
            Ready,
            #[serde(rename = "Success")]
            Success,
            #[serde(rename = "Failure")]
            Failure,
            #[serde(rename = "NotSupported")]
            NotSupported,
        }
        impl AsRef<str> for PreloadingStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Pending => "Pending",
                    Self::Running => "Running",
                    Self::Ready => "Ready",
                    Self::Success => "Success",
                    Self::Failure => "Failure",
                    Self::NotSupported => "NotSupported",
                }
            }
        }
        impl std::str::FromStr for PreloadingStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "Pending" => Ok(Self::Pending),
                    "Running" => Ok(Self::Running),
                    "Ready" => Ok(Self::Ready),
                    "Success" => Ok(Self::Success),
                    "Failure" => Ok(Self::Failure),
                    "NotSupported" => Ok(Self::NotSupported),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PreloadingStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and filter out the ones that aren't necessary to the developers.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum PrefetchStatus {
            #[serde(rename = "PrefetchAllowed")]
            PrefetchAllowed,
            #[serde(rename = "PrefetchFailedIneligibleRedirect")]
            PrefetchFailedIneligibleRedirect,
            #[serde(rename = "PrefetchFailedInvalidRedirect")]
            PrefetchFailedInvalidRedirect,
            #[serde(rename = "PrefetchFailedMIMENotSupported")]
            PrefetchFailedMimeNotSupported,
            #[serde(rename = "PrefetchFailedNetError")]
            PrefetchFailedNetError,
            #[serde(rename = "PrefetchFailedNon2XX")]
            PrefetchFailedNon2Xx,
            #[serde(rename = "PrefetchEvictedAfterBrowsingDataRemoved")]
            PrefetchEvictedAfterBrowsingDataRemoved,
            #[serde(rename = "PrefetchEvictedAfterCandidateRemoved")]
            PrefetchEvictedAfterCandidateRemoved,
            #[serde(rename = "PrefetchEvictedForNewerPrefetch")]
            PrefetchEvictedForNewerPrefetch,
            #[serde(rename = "PrefetchHeldback")]
            PrefetchHeldback,
            #[serde(rename = "PrefetchIneligibleRetryAfter")]
            PrefetchIneligibleRetryAfter,
            #[serde(rename = "PrefetchIsPrivacyDecoy")]
            PrefetchIsPrivacyDecoy,
            #[serde(rename = "PrefetchIsStale")]
            PrefetchIsStale,
            #[serde(rename = "PrefetchNotEligibleBrowserContextOffTheRecord")]
            PrefetchNotEligibleBrowserContextOffTheRecord,
            #[serde(rename = "PrefetchNotEligibleDataSaverEnabled")]
            PrefetchNotEligibleDataSaverEnabled,
            #[serde(rename = "PrefetchNotEligibleExistingProxy")]
            PrefetchNotEligibleExistingProxy,
            #[serde(rename = "PrefetchNotEligibleHostIsNonUnique")]
            PrefetchNotEligibleHostIsNonUnique,
            #[serde(rename = "PrefetchNotEligibleNonDefaultStoragePartition")]
            PrefetchNotEligibleNonDefaultStoragePartition,
            #[serde(rename = "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy")]
            PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy,
            #[serde(rename = "PrefetchNotEligibleSchemeIsNotHttps")]
            PrefetchNotEligibleSchemeIsNotHttps,
            #[serde(rename = "PrefetchNotEligibleUserHasCookies")]
            PrefetchNotEligibleUserHasCookies,
            #[serde(rename = "PrefetchNotEligibleUserHasServiceWorker")]
            PrefetchNotEligibleUserHasServiceWorker,
            #[serde(rename = "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler")]
            PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler,
            #[serde(rename = "PrefetchNotEligibleRedirectFromServiceWorker")]
            PrefetchNotEligibleRedirectFromServiceWorker,
            #[serde(rename = "PrefetchNotEligibleRedirectToServiceWorker")]
            PrefetchNotEligibleRedirectToServiceWorker,
            #[serde(rename = "PrefetchNotEligibleBatterySaverEnabled")]
            PrefetchNotEligibleBatterySaverEnabled,
            #[serde(rename = "PrefetchNotEligiblePreloadingDisabled")]
            PrefetchNotEligiblePreloadingDisabled,
            #[serde(rename = "PrefetchNotFinishedInTime")]
            PrefetchNotFinishedInTime,
            #[serde(rename = "PrefetchNotStarted")]
            PrefetchNotStarted,
            #[serde(rename = "PrefetchNotUsedCookiesChanged")]
            PrefetchNotUsedCookiesChanged,
            #[serde(rename = "PrefetchProxyNotAvailable")]
            PrefetchProxyNotAvailable,
            #[serde(rename = "PrefetchResponseUsed")]
            PrefetchResponseUsed,
            #[serde(rename = "PrefetchSuccessfulButNotUsed")]
            PrefetchSuccessfulButNotUsed,
            #[serde(rename = "PrefetchNotUsedProbeFailed")]
            PrefetchNotUsedProbeFailed,
        }
        impl AsRef<str> for PrefetchStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::PrefetchAllowed => "PrefetchAllowed",
                    Self::PrefetchFailedIneligibleRedirect => "PrefetchFailedIneligibleRedirect",
                    Self::PrefetchFailedInvalidRedirect => "PrefetchFailedInvalidRedirect",
                    Self::PrefetchFailedMimeNotSupported => "PrefetchFailedMIMENotSupported",
                    Self::PrefetchFailedNetError => "PrefetchFailedNetError",
                    Self::PrefetchFailedNon2Xx => "PrefetchFailedNon2XX",
                    Self::PrefetchEvictedAfterBrowsingDataRemoved => {
                        "PrefetchEvictedAfterBrowsingDataRemoved"
                    }
                    Self::PrefetchEvictedAfterCandidateRemoved => {
                        "PrefetchEvictedAfterCandidateRemoved"
                    }
                    Self::PrefetchEvictedForNewerPrefetch => "PrefetchEvictedForNewerPrefetch",
                    Self::PrefetchHeldback => "PrefetchHeldback",
                    Self::PrefetchIneligibleRetryAfter => "PrefetchIneligibleRetryAfter",
                    Self::PrefetchIsPrivacyDecoy => "PrefetchIsPrivacyDecoy",
                    Self::PrefetchIsStale => "PrefetchIsStale",
                    Self::PrefetchNotEligibleBrowserContextOffTheRecord => {
                        "PrefetchNotEligibleBrowserContextOffTheRecord"
                    }
                    Self::PrefetchNotEligibleDataSaverEnabled => {
                        "PrefetchNotEligibleDataSaverEnabled"
                    }
                    Self::PrefetchNotEligibleExistingProxy => "PrefetchNotEligibleExistingProxy",
                    Self::PrefetchNotEligibleHostIsNonUnique => {
                        "PrefetchNotEligibleHostIsNonUnique"
                    }
                    Self::PrefetchNotEligibleNonDefaultStoragePartition => {
                        "PrefetchNotEligibleNonDefaultStoragePartition"
                    }
                    Self::PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy => {
                        "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy"
                    }
                    Self::PrefetchNotEligibleSchemeIsNotHttps => {
                        "PrefetchNotEligibleSchemeIsNotHttps"
                    }
                    Self::PrefetchNotEligibleUserHasCookies => "PrefetchNotEligibleUserHasCookies",
                    Self::PrefetchNotEligibleUserHasServiceWorker => {
                        "PrefetchNotEligibleUserHasServiceWorker"
                    }
                    Self::PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler => {
                        "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler"
                    }
                    Self::PrefetchNotEligibleRedirectFromServiceWorker => {
                        "PrefetchNotEligibleRedirectFromServiceWorker"
                    }
                    Self::PrefetchNotEligibleRedirectToServiceWorker => {
                        "PrefetchNotEligibleRedirectToServiceWorker"
                    }
                    Self::PrefetchNotEligibleBatterySaverEnabled => {
                        "PrefetchNotEligibleBatterySaverEnabled"
                    }
                    Self::PrefetchNotEligiblePreloadingDisabled => {
                        "PrefetchNotEligiblePreloadingDisabled"
                    }
                    Self::PrefetchNotFinishedInTime => "PrefetchNotFinishedInTime",
                    Self::PrefetchNotStarted => "PrefetchNotStarted",
                    Self::PrefetchNotUsedCookiesChanged => "PrefetchNotUsedCookiesChanged",
                    Self::PrefetchProxyNotAvailable => "PrefetchProxyNotAvailable",
                    Self::PrefetchResponseUsed => "PrefetchResponseUsed",
                    Self::PrefetchSuccessfulButNotUsed => "PrefetchSuccessfulButNotUsed",
                    Self::PrefetchNotUsedProbeFailed => "PrefetchNotUsedProbeFailed",
                }
            }
        }
        impl std::str::FromStr for PrefetchStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "PrefetchAllowed" => Ok(Self::PrefetchAllowed),
                    "PrefetchFailedIneligibleRedirect" => {
                        Ok(Self::PrefetchFailedIneligibleRedirect)
                    }
                    "PrefetchFailedInvalidRedirect" => Ok(Self::PrefetchFailedInvalidRedirect),
                    "PrefetchFailedMIMENotSupported" => Ok(Self::PrefetchFailedMimeNotSupported),
                    "PrefetchFailedNetError" => Ok(Self::PrefetchFailedNetError),
                    "PrefetchFailedNon2XX" => Ok(Self::PrefetchFailedNon2Xx),
                    "PrefetchEvictedAfterBrowsingDataRemoved" => {
                        Ok(Self::PrefetchEvictedAfterBrowsingDataRemoved)
                    }
                    "PrefetchEvictedAfterCandidateRemoved" => {
                        Ok(Self::PrefetchEvictedAfterCandidateRemoved)
                    }
                    "PrefetchEvictedForNewerPrefetch" => Ok(Self::PrefetchEvictedForNewerPrefetch),
                    "PrefetchHeldback" => Ok(Self::PrefetchHeldback),
                    "PrefetchIneligibleRetryAfter" => Ok(Self::PrefetchIneligibleRetryAfter),
                    "PrefetchIsPrivacyDecoy" => Ok(Self::PrefetchIsPrivacyDecoy),
                    "PrefetchIsStale" => Ok(Self::PrefetchIsStale),
                    "PrefetchNotEligibleBrowserContextOffTheRecord" => {
                        Ok(Self::PrefetchNotEligibleBrowserContextOffTheRecord)
                    }
                    "PrefetchNotEligibleDataSaverEnabled" => {
                        Ok(Self::PrefetchNotEligibleDataSaverEnabled)
                    }
                    "PrefetchNotEligibleExistingProxy" => {
                        Ok(Self::PrefetchNotEligibleExistingProxy)
                    }
                    "PrefetchNotEligibleHostIsNonUnique" => {
                        Ok(Self::PrefetchNotEligibleHostIsNonUnique)
                    }
                    "PrefetchNotEligibleNonDefaultStoragePartition" => {
                        Ok(Self::PrefetchNotEligibleNonDefaultStoragePartition)
                    }
                    "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy" => {
                        Ok(Self::PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy)
                    }
                    "PrefetchNotEligibleSchemeIsNotHttps" => {
                        Ok(Self::PrefetchNotEligibleSchemeIsNotHttps)
                    }
                    "PrefetchNotEligibleUserHasCookies" => {
                        Ok(Self::PrefetchNotEligibleUserHasCookies)
                    }
                    "PrefetchNotEligibleUserHasServiceWorker" => {
                        Ok(Self::PrefetchNotEligibleUserHasServiceWorker)
                    }
                    "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler" => {
                        Ok(Self::PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler)
                    }
                    "PrefetchNotEligibleRedirectFromServiceWorker" => {
                        Ok(Self::PrefetchNotEligibleRedirectFromServiceWorker)
                    }
                    "PrefetchNotEligibleRedirectToServiceWorker" => {
                        Ok(Self::PrefetchNotEligibleRedirectToServiceWorker)
                    }
                    "PrefetchNotEligibleBatterySaverEnabled" => {
                        Ok(Self::PrefetchNotEligibleBatterySaverEnabled)
                    }
                    "PrefetchNotEligiblePreloadingDisabled" => {
                        Ok(Self::PrefetchNotEligiblePreloadingDisabled)
                    }
                    "PrefetchNotFinishedInTime" => Ok(Self::PrefetchNotFinishedInTime),
                    "PrefetchNotStarted" => Ok(Self::PrefetchNotStarted),
                    "PrefetchNotUsedCookiesChanged" => Ok(Self::PrefetchNotUsedCookiesChanged),
                    "PrefetchProxyNotAvailable" => Ok(Self::PrefetchProxyNotAvailable),
                    "PrefetchResponseUsed" => Ok(Self::PrefetchResponseUsed),
                    "PrefetchSuccessfulButNotUsed" => Ok(Self::PrefetchSuccessfulButNotUsed),
                    "PrefetchNotUsedProbeFailed" => Ok(Self::PrefetchNotUsedProbeFailed),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for PrefetchStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Information of headers to be displayed when the header mismatch occurred.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PrerenderMismatchedHeaders {
            pub header_name: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub initial_value: Option<String>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub activation_value: Option<String>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Preload.enable";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Preload.disable";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Upsert. Currently, it is only emitted when a rule set added.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RuleSetUpdated {
            pub rule_set: types::RuleSet,
        }

        impl RuleSetUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Preload.ruleSetUpdated")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RuleSetRemoved {
            pub id: types::RuleSetId,
        }

        impl RuleSetRemoved {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Preload.ruleSetRemoved")
            }
        }

        /// Fired when a preload enabled state is updated.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PreloadEnabledStateUpdated {
            pub disabled_by_preference: bool,
            pub disabled_by_data_saver: bool,
            pub disabled_by_battery_saver: bool,
            pub disabled_by_holdback_prefetch_speculation_rules: bool,
            pub disabled_by_holdback_prerender_speculation_rules: bool,
        }

        impl PreloadEnabledStateUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Preload.preloadEnabledStateUpdated")
            }
        }

        /// Fired when a prefetch attempt is updated.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PrefetchStatusUpdated {
            pub key: types::PreloadingAttemptKey,
            pub pipeline_id: types::PreloadPipelineId,
            /// The frame id of the frame initiating prefetch.
            pub initiating_frame_id: page::types::FrameId,
            pub prefetch_url: String,
            pub status: types::PreloadingStatus,
            pub prefetch_status: types::PrefetchStatus,
            pub request_id: network::types::RequestId,
        }

        impl PrefetchStatusUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Preload.prefetchStatusUpdated")
            }
        }

        /// Fired when a prerender attempt is updated.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PrerenderStatusUpdated {
            pub key: types::PreloadingAttemptKey,
            pub pipeline_id: types::PreloadPipelineId,
            pub status: types::PreloadingStatus,
            pub prerender_status: Option<types::PrerenderFinalStatus>,
            /// This is used to give users more information about the name of Mojo interface that is incompatible with prerender and has caused the cancellation of the attempt.
            pub disallowed_mojo_interface: Option<String>,
            pub mismatched_headers: Option<Vec<types::PrerenderMismatchedHeaders>>,
        }

        impl PrerenderStatusUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Preload.prerenderStatusUpdated")
            }
        }

        /// Send a list of sources for all preloading attempts in a document.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PreloadingAttemptSourcesUpdated {
            pub loader_id: network::types::LoaderId,
            pub preloading_attempt_sources: Vec<types::PreloadingAttemptSource>,
        }

        impl PreloadingAttemptSourcesUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Preload.preloadingAttemptSourcesUpdated")
            }
        }
    }
}

pub mod security {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// An internal certificate ID value.
        pub type CertificateId = i64;

        /// A description of mixed content (HTTP resources on HTTPS pages), as defined by https://www.w3.org/TR/mixed-content/#categories
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum MixedContentType {
            #[serde(rename = "blockable")]
            Blockable,
            #[serde(rename = "optionally-blockable")]
            OptionallyBlockable,
            #[serde(rename = "none")]
            None,
        }
        impl AsRef<str> for MixedContentType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Blockable => "blockable",
                    Self::OptionallyBlockable => "optionally-blockable",
                    Self::None => "none",
                }
            }
        }
        impl std::str::FromStr for MixedContentType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "blockable" => Ok(Self::Blockable),
                    "optionally-blockable" => Ok(Self::OptionallyBlockable),
                    "none" => Ok(Self::None),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for MixedContentType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// The security level of a page or resource.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SecurityState {
            #[serde(rename = "unknown")]
            Unknown,
            #[serde(rename = "neutral")]
            Neutral,
            #[serde(rename = "insecure")]
            Insecure,
            #[serde(rename = "secure")]
            Secure,
            #[serde(rename = "info")]
            Info,
            #[serde(rename = "insecure-broken")]
            InsecureBroken,
        }
        impl AsRef<str> for SecurityState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Unknown => "unknown",
                    Self::Neutral => "neutral",
                    Self::Insecure => "insecure",
                    Self::Secure => "secure",
                    Self::Info => "info",
                    Self::InsecureBroken => "insecure-broken",
                }
            }
        }
        impl std::str::FromStr for SecurityState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "unknown" => Ok(Self::Unknown),
                    "neutral" => Ok(Self::Neutral),
                    "insecure" => Ok(Self::Insecure),
                    "secure" => Ok(Self::Secure),
                    "info" => Ok(Self::Info),
                    "insecure-broken" => Ok(Self::InsecureBroken),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SecurityState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Details about the security state of the page certificate.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CertificateSecurityState {
            /// Protocol name (e.g. "TLS 1.2" or "QUIC").
            pub protocol: String,
            /// Key Exchange used by the connection, or the empty string if not applicable.
            pub key_exchange: String,
            /// (EC)DH group used by the connection, if applicable.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub key_exchange_group: Option<String>,
            /// Cipher name.
            pub cipher: String,
            /// TLS MAC. Note that AEAD ciphers do not have separate MACs.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub mac: Option<String>,
            /// Page certificate.
            pub certificate: Vec<String>,
            /// Certificate subject name.
            pub subject_name: String,
            /// Name of the issuing CA.
            pub issuer: String,
            /// Certificate valid from date.
            pub valid_from: network::types::TimeSinceEpoch,
            /// Certificate valid to (expiration) date
            pub valid_to: network::types::TimeSinceEpoch,
            /// The highest priority network error code, if the certificate has an error.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub certificate_network_error: Option<String>,
            /// True if the certificate uses a weak signature algorithm.
            pub certificate_has_weak_signature: bool,
            /// True if the certificate has a SHA1 signature in the chain.
            pub certificate_has_sha1_signature: bool,
            /// True if modern SSL
            #[serde(rename = "modernSSL")]
            pub modern_ssl: bool,
            /// True if the connection is using an obsolete SSL protocol.
            pub obsolete_ssl_protocol: bool,
            /// True if the connection is using an obsolete SSL key exchange.
            pub obsolete_ssl_key_exchange: bool,
            /// True if the connection is using an obsolete SSL cipher.
            pub obsolete_ssl_cipher: bool,
            /// True if the connection is using an obsolete SSL signature.
            pub obsolete_ssl_signature: bool,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SafetyTipStatus {
            #[serde(rename = "badReputation")]
            BadReputation,
            #[serde(rename = "lookalike")]
            Lookalike,
        }
        impl AsRef<str> for SafetyTipStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::BadReputation => "badReputation",
                    Self::Lookalike => "lookalike",
                }
            }
        }
        impl std::str::FromStr for SafetyTipStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "badReputation" => Ok(Self::BadReputation),
                    "lookalike" => Ok(Self::Lookalike),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SafetyTipStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SafetyTipInfo {
            /// Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.
            pub safety_tip_status: SafetyTipStatus,
            /// The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub safe_url: Option<String>,
        }

        /// Security state information about the page.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct VisibleSecurityState {
            /// The security level of the page.
            pub security_state: SecurityState,
            /// Security state details about the page certificate.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub certificate_security_state: Option<CertificateSecurityState>,
            /// The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub safety_tip_info: Option<SafetyTipInfo>,
            /// Array of security state issues ids.
            pub security_state_issue_ids: Vec<String>,
        }

        /// An explanation of an factor contributing to the security state.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SecurityStateExplanation {
            /// Security state representing the severity of the factor being explained.
            pub security_state: SecurityState,
            /// Title describing the type of factor.
            pub title: String,
            /// Short phrase describing the type of factor.
            pub summary: String,
            /// Full text explanation of the factor.
            pub description: String,
            /// The type of mixed content described by the explanation.
            pub mixed_content_type: MixedContentType,
            /// Page certificate.
            pub certificate: Vec<String>,
            /// Recommendations to fix any issues.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub recommendations: Option<Vec<String>>,
        }

        /// Information about insecure content on the page.
        #[deprecated]
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InsecureContentStatus {
            /// Always false.
            pub ran_mixed_content: bool,
            /// Always false.
            pub displayed_mixed_content: bool,
            /// Always false.
            pub contained_mixed_form: bool,
            /// Always false.
            pub ran_content_with_cert_errors: bool,
            /// Always false.
            pub displayed_content_with_cert_errors: bool,
            /// Always set to unknown.
            pub ran_insecure_content_style: SecurityState,
            /// Always set to unknown.
            pub displayed_insecure_content_style: SecurityState,
        }

        /// The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum CertificateErrorAction {
            #[serde(rename = "continue")]
            Continue,
            #[serde(rename = "cancel")]
            Cancel,
        }
        impl AsRef<str> for CertificateErrorAction {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Continue => "continue",
                    Self::Cancel => "cancel",
                }
            }
        }
        impl std::str::FromStr for CertificateErrorAction {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "continue" => Ok(Self::Continue),
                    "cancel" => Ok(Self::Cancel),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for CertificateErrorAction {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Disables tracking security state changes.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Security.disable";
        }

        /// Enables tracking security state changes.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Security.enable";
        }

        /// Enable/disable whether all certificate errors should be ignored.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetIgnoreCertificateErrors {
            /// If true, all certificate errors will be ignored.
            pub ignore: bool,
        }

        impl SetIgnoreCertificateErrors {
            pub fn new(ignore: bool) -> Self {
                Self { ignore }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetIgnoreCertificateErrors {
            type Response = ();
            const METHOD: &'static str = "Security.setIgnoreCertificateErrors";
        }

        /// Handles a certificate error that fired a certificateError event.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HandleCertificateError {
            /// The ID of the event.
            pub event_id: i64,
            /// The action to take on the certificate error.
            pub action: types::CertificateErrorAction,
        }

        impl HandleCertificateError {
            pub fn new(event_id: i64, action: types::CertificateErrorAction) -> Self {
                Self { event_id, action }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for HandleCertificateError {
            type Response = ();
            const METHOD: &'static str = "Security.handleCertificateError";
        }

        /// Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with `handleCertificateError` commands.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetOverrideCertificateErrors {
            /// If true, certificate errors will be overridden.
            pub override_: bool,
        }

        impl SetOverrideCertificateErrors {
            pub fn new(override_: bool) -> Self {
                Self { override_ }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetOverrideCertificateErrors {
            type Response = ();
            const METHOD: &'static str = "Security.setOverrideCertificateErrors";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the `handleCertificateError` command. Note: this event does not fire if the certificate error has been allowed internally. Only one client per target should override certificate errors at the same time.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CertificateError {
            /// The ID of the event.
            pub event_id: i64,
            /// The type of the error.
            pub error_type: String,
            /// The url that was requested.
            #[serde(rename = "requestURL")]
            pub request_url: String,
        }

        impl CertificateError {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Security.certificateError")
            }
        }

        /// The security state of the page changed.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct VisibleSecurityStateChanged {
            /// Security state information about the page.
            pub visible_security_state: types::VisibleSecurityState,
        }

        impl VisibleSecurityStateChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Security.visibleSecurityStateChanged")
            }
        }

        /// The security state of the page changed. No longer being sent.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SecurityStateChanged {
            /// Security state.
            pub security_state: types::SecurityState,
            /// True if the page was loaded over cryptographic transport such as HTTPS.
            #[deprecated]
            pub scheme_is_cryptographic: bool,
            /// Previously a list of explanations for the security state. Now always empty.
            #[deprecated]
            pub explanations: Vec<types::SecurityStateExplanation>,
            /// Information about insecure content on the page.
            #[deprecated]
            pub insecure_content_status: types::InsecureContentStatus,
            /// Overrides user-visible description of the state. Always omitted.
            #[deprecated]
            pub summary: Option<String>,
        }

        impl SecurityStateChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Security.securityStateChanged")
            }
        }
    }
}

pub mod serviceworker {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        pub type RegistrationID = String;

        /// ServiceWorker registration.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ServiceWorkerRegistration {
            pub registration_id: RegistrationID,
            #[serde(rename = "scopeURL")]
            pub scope_url: String,
            pub is_deleted: bool,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ServiceWorkerVersionRunningStatus {
            #[serde(rename = "stopped")]
            Stopped,
            #[serde(rename = "starting")]
            Starting,
            #[serde(rename = "running")]
            Running,
            #[serde(rename = "stopping")]
            Stopping,
        }
        impl AsRef<str> for ServiceWorkerVersionRunningStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Stopped => "stopped",
                    Self::Starting => "starting",
                    Self::Running => "running",
                    Self::Stopping => "stopping",
                }
            }
        }
        impl std::str::FromStr for ServiceWorkerVersionRunningStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "stopped" => Ok(Self::Stopped),
                    "starting" => Ok(Self::Starting),
                    "running" => Ok(Self::Running),
                    "stopping" => Ok(Self::Stopping),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ServiceWorkerVersionRunningStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ServiceWorkerVersionStatus {
            #[serde(rename = "new")]
            New,
            #[serde(rename = "installing")]
            Installing,
            #[serde(rename = "installed")]
            Installed,
            #[serde(rename = "activating")]
            Activating,
            #[serde(rename = "activated")]
            Activated,
            #[serde(rename = "redundant")]
            Redundant,
        }
        impl AsRef<str> for ServiceWorkerVersionStatus {
            fn as_ref(&self) -> &str {
                match self {
                    Self::New => "new",
                    Self::Installing => "installing",
                    Self::Installed => "installed",
                    Self::Activating => "activating",
                    Self::Activated => "activated",
                    Self::Redundant => "redundant",
                }
            }
        }
        impl std::str::FromStr for ServiceWorkerVersionStatus {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "new" => Ok(Self::New),
                    "installing" => Ok(Self::Installing),
                    "installed" => Ok(Self::Installed),
                    "activating" => Ok(Self::Activating),
                    "activated" => Ok(Self::Activated),
                    "redundant" => Ok(Self::Redundant),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ServiceWorkerVersionStatus {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// ServiceWorker version.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ServiceWorkerVersion {
            pub version_id: String,
            pub registration_id: RegistrationID,
            #[serde(rename = "scriptURL")]
            pub script_url: String,
            pub running_status: ServiceWorkerVersionRunningStatus,
            pub status: ServiceWorkerVersionStatus,
            /// The Last-Modified header value of the main script.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub script_last_modified: Option<f64>,
            /// The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub script_response_time: Option<f64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub controlled_clients: Option<Vec<target::types::TargetID>>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_id: Option<target::types::TargetID>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub router_rules: Option<String>,
        }

        /// ServiceWorker error message.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ServiceWorkerErrorMessage {
            pub error_message: String,
            pub registration_id: RegistrationID,
            pub version_id: String,
            #[serde(rename = "sourceURL")]
            pub source_url: String,
            pub line_number: i64,
            pub column_number: i64,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeliverPushMessage {
            pub origin: String,
            pub registration_id: types::RegistrationID,
            pub data: String,
        }

        impl DeliverPushMessage {
            pub fn new(
                origin: impl Into<String>,
                registration_id: types::RegistrationID,
                data: impl Into<String>,
            ) -> Self {
                Self {
                    origin: origin.into(),
                    registration_id,
                    data: data.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeliverPushMessage {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.deliverPushMessage";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.disable";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DispatchSyncEvent {
            pub origin: String,
            pub registration_id: types::RegistrationID,
            pub tag: String,
            pub last_chance: bool,
        }

        impl DispatchSyncEvent {
            pub fn new(
                origin: impl Into<String>,
                registration_id: types::RegistrationID,
                tag: impl Into<String>,
                last_chance: bool,
            ) -> Self {
                Self {
                    origin: origin.into(),
                    registration_id,
                    tag: tag.into(),
                    last_chance,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DispatchSyncEvent {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.dispatchSyncEvent";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DispatchPeriodicSyncEvent {
            pub origin: String,
            pub registration_id: types::RegistrationID,
            pub tag: String,
        }

        impl DispatchPeriodicSyncEvent {
            pub fn new(
                origin: impl Into<String>,
                registration_id: types::RegistrationID,
                tag: impl Into<String>,
            ) -> Self {
                Self {
                    origin: origin.into(),
                    registration_id,
                    tag: tag.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DispatchPeriodicSyncEvent {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.dispatchPeriodicSyncEvent";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.enable";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetForceUpdateOnPageLoad {
            pub force_update_on_page_load: bool,
        }

        impl SetForceUpdateOnPageLoad {
            pub fn new(force_update_on_page_load: bool) -> Self {
                Self {
                    force_update_on_page_load,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetForceUpdateOnPageLoad {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.setForceUpdateOnPageLoad";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SkipWaiting {
            #[serde(rename = "scopeURL")]
            pub scope_url: String,
        }

        impl SkipWaiting {
            pub fn new(scope_url: impl Into<String>) -> Self {
                Self {
                    scope_url: scope_url.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SkipWaiting {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.skipWaiting";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartWorker {
            #[serde(rename = "scopeURL")]
            pub scope_url: String,
        }

        impl StartWorker {
            pub fn new(scope_url: impl Into<String>) -> Self {
                Self {
                    scope_url: scope_url.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartWorker {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.startWorker";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopAllWorkers {}

        impl StopAllWorkers {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopAllWorkers {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.stopAllWorkers";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopWorker {
            pub version_id: String,
        }

        impl StopWorker {
            pub fn new(version_id: impl Into<String>) -> Self {
                Self {
                    version_id: version_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopWorker {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.stopWorker";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Unregister {
            #[serde(rename = "scopeURL")]
            pub scope_url: String,
        }

        impl Unregister {
            pub fn new(scope_url: impl Into<String>) -> Self {
                Self {
                    scope_url: scope_url.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Unregister {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.unregister";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UpdateRegistration {
            #[serde(rename = "scopeURL")]
            pub scope_url: String,
        }

        impl UpdateRegistration {
            pub fn new(scope_url: impl Into<String>) -> Self {
                Self {
                    scope_url: scope_url.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for UpdateRegistration {
            type Response = ();
            const METHOD: &'static str = "ServiceWorker.updateRegistration";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WorkerErrorReported {
            pub error_message: types::ServiceWorkerErrorMessage,
        }

        impl WorkerErrorReported {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("ServiceWorker.workerErrorReported")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WorkerRegistrationUpdated {
            pub registrations: Vec<types::ServiceWorkerRegistration>,
        }

        impl WorkerRegistrationUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("ServiceWorker.workerRegistrationUpdated")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WorkerVersionUpdated {
            pub versions: Vec<types::ServiceWorkerVersion>,
        }

        impl WorkerVersionUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("ServiceWorker.workerVersionUpdated")
            }
        }
    }
}

pub mod smart_card_emulation {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Indicates the PC/SC error code. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__ErrorCodes.html Microsoft: https://learn.microsoft.com/en-us/windows/win32/secauthn/authentication-return-values
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ResultCode {
            #[serde(rename = "success")]
            Success,
            #[serde(rename = "removed-card")]
            RemovedCard,
            #[serde(rename = "reset-card")]
            ResetCard,
            #[serde(rename = "unpowered-card")]
            UnpoweredCard,
            #[serde(rename = "unresponsive-card")]
            UnresponsiveCard,
            #[serde(rename = "unsupported-card")]
            UnsupportedCard,
            #[serde(rename = "reader-unavailable")]
            ReaderUnavailable,
            #[serde(rename = "sharing-violation")]
            SharingViolation,
            #[serde(rename = "not-transacted")]
            NotTransacted,
            #[serde(rename = "no-smartcard")]
            NoSmartcard,
            #[serde(rename = "proto-mismatch")]
            ProtoMismatch,
            #[serde(rename = "system-cancelled")]
            SystemCancelled,
            #[serde(rename = "not-ready")]
            NotReady,
            #[serde(rename = "cancelled")]
            Cancelled,
            #[serde(rename = "insufficient-buffer")]
            InsufficientBuffer,
            #[serde(rename = "invalid-handle")]
            InvalidHandle,
            #[serde(rename = "invalid-parameter")]
            InvalidParameter,
            #[serde(rename = "invalid-value")]
            InvalidValue,
            #[serde(rename = "no-memory")]
            NoMemory,
            #[serde(rename = "timeout")]
            Timeout,
            #[serde(rename = "unknown-reader")]
            UnknownReader,
            #[serde(rename = "unsupported-feature")]
            UnsupportedFeature,
            #[serde(rename = "no-readers-available")]
            NoReadersAvailable,
            #[serde(rename = "service-stopped")]
            ServiceStopped,
            #[serde(rename = "no-service")]
            NoService,
            #[serde(rename = "comm-error")]
            CommError,
            #[serde(rename = "internal-error")]
            InternalError,
            #[serde(rename = "server-too-busy")]
            ServerTooBusy,
            #[serde(rename = "unexpected")]
            Unexpected,
            #[serde(rename = "shutdown")]
            Shutdown,
            #[serde(rename = "unknown-card")]
            UnknownCard,
            #[serde(rename = "unknown")]
            Unknown,
        }
        impl AsRef<str> for ResultCode {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Success => "success",
                    Self::RemovedCard => "removed-card",
                    Self::ResetCard => "reset-card",
                    Self::UnpoweredCard => "unpowered-card",
                    Self::UnresponsiveCard => "unresponsive-card",
                    Self::UnsupportedCard => "unsupported-card",
                    Self::ReaderUnavailable => "reader-unavailable",
                    Self::SharingViolation => "sharing-violation",
                    Self::NotTransacted => "not-transacted",
                    Self::NoSmartcard => "no-smartcard",
                    Self::ProtoMismatch => "proto-mismatch",
                    Self::SystemCancelled => "system-cancelled",
                    Self::NotReady => "not-ready",
                    Self::Cancelled => "cancelled",
                    Self::InsufficientBuffer => "insufficient-buffer",
                    Self::InvalidHandle => "invalid-handle",
                    Self::InvalidParameter => "invalid-parameter",
                    Self::InvalidValue => "invalid-value",
                    Self::NoMemory => "no-memory",
                    Self::Timeout => "timeout",
                    Self::UnknownReader => "unknown-reader",
                    Self::UnsupportedFeature => "unsupported-feature",
                    Self::NoReadersAvailable => "no-readers-available",
                    Self::ServiceStopped => "service-stopped",
                    Self::NoService => "no-service",
                    Self::CommError => "comm-error",
                    Self::InternalError => "internal-error",
                    Self::ServerTooBusy => "server-too-busy",
                    Self::Unexpected => "unexpected",
                    Self::Shutdown => "shutdown",
                    Self::UnknownCard => "unknown-card",
                    Self::Unknown => "unknown",
                }
            }
        }
        impl std::str::FromStr for ResultCode {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "success" => Ok(Self::Success),
                    "removed-card" => Ok(Self::RemovedCard),
                    "reset-card" => Ok(Self::ResetCard),
                    "unpowered-card" => Ok(Self::UnpoweredCard),
                    "unresponsive-card" => Ok(Self::UnresponsiveCard),
                    "unsupported-card" => Ok(Self::UnsupportedCard),
                    "reader-unavailable" => Ok(Self::ReaderUnavailable),
                    "sharing-violation" => Ok(Self::SharingViolation),
                    "not-transacted" => Ok(Self::NotTransacted),
                    "no-smartcard" => Ok(Self::NoSmartcard),
                    "proto-mismatch" => Ok(Self::ProtoMismatch),
                    "system-cancelled" => Ok(Self::SystemCancelled),
                    "not-ready" => Ok(Self::NotReady),
                    "cancelled" => Ok(Self::Cancelled),
                    "insufficient-buffer" => Ok(Self::InsufficientBuffer),
                    "invalid-handle" => Ok(Self::InvalidHandle),
                    "invalid-parameter" => Ok(Self::InvalidParameter),
                    "invalid-value" => Ok(Self::InvalidValue),
                    "no-memory" => Ok(Self::NoMemory),
                    "timeout" => Ok(Self::Timeout),
                    "unknown-reader" => Ok(Self::UnknownReader),
                    "unsupported-feature" => Ok(Self::UnsupportedFeature),
                    "no-readers-available" => Ok(Self::NoReadersAvailable),
                    "service-stopped" => Ok(Self::ServiceStopped),
                    "no-service" => Ok(Self::NoService),
                    "comm-error" => Ok(Self::CommError),
                    "internal-error" => Ok(Self::InternalError),
                    "server-too-busy" => Ok(Self::ServerTooBusy),
                    "unexpected" => Ok(Self::Unexpected),
                    "shutdown" => Ok(Self::Shutdown),
                    "unknown-card" => Ok(Self::UnknownCard),
                    "unknown" => Ok(Self::Unknown),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ResultCode {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Maps to the |SCARD_SHARE_*| values.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ShareMode {
            #[serde(rename = "shared")]
            Shared,
            #[serde(rename = "exclusive")]
            Exclusive,
            #[serde(rename = "direct")]
            Direct,
        }
        impl AsRef<str> for ShareMode {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Shared => "shared",
                    Self::Exclusive => "exclusive",
                    Self::Direct => "direct",
                }
            }
        }
        impl std::str::FromStr for ShareMode {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "shared" => Ok(Self::Shared),
                    "exclusive" => Ok(Self::Exclusive),
                    "direct" => Ok(Self::Direct),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ShareMode {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Indicates what the reader should do with the card.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum Disposition {
            #[serde(rename = "leave-card")]
            LeaveCard,
            #[serde(rename = "reset-card")]
            ResetCard,
            #[serde(rename = "unpower-card")]
            UnpowerCard,
            #[serde(rename = "eject-card")]
            EjectCard,
        }
        impl AsRef<str> for Disposition {
            fn as_ref(&self) -> &str {
                match self {
                    Self::LeaveCard => "leave-card",
                    Self::ResetCard => "reset-card",
                    Self::UnpowerCard => "unpower-card",
                    Self::EjectCard => "eject-card",
                }
            }
        }
        impl std::str::FromStr for Disposition {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "leave-card" => Ok(Self::LeaveCard),
                    "reset-card" => Ok(Self::ResetCard),
                    "unpower-card" => Ok(Self::UnpowerCard),
                    "eject-card" => Ok(Self::EjectCard),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for Disposition {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Maps to |SCARD_*| connection state values.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ConnectionState {
            #[serde(rename = "absent")]
            Absent,
            #[serde(rename = "present")]
            Present,
            #[serde(rename = "swallowed")]
            Swallowed,
            #[serde(rename = "powered")]
            Powered,
            #[serde(rename = "negotiable")]
            Negotiable,
            #[serde(rename = "specific")]
            Specific,
        }
        impl AsRef<str> for ConnectionState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Absent => "absent",
                    Self::Present => "present",
                    Self::Swallowed => "swallowed",
                    Self::Powered => "powered",
                    Self::Negotiable => "negotiable",
                    Self::Specific => "specific",
                }
            }
        }
        impl std::str::FromStr for ConnectionState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "absent" => Ok(Self::Absent),
                    "present" => Ok(Self::Present),
                    "swallowed" => Ok(Self::Swallowed),
                    "powered" => Ok(Self::Powered),
                    "negotiable" => Ok(Self::Negotiable),
                    "specific" => Ok(Self::Specific),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ConnectionState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Maps to the |SCARD_STATE_*| flags.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReaderStateFlags {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unaware: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ignore: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub changed: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unknown: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unavailable: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub empty: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub present: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub exclusive: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub inuse: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub mute: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unpowered: Option<bool>,
        }

        /// Maps to the |SCARD_PROTOCOL_*| flags.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ProtocolSet {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub t0: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub t1: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub raw: Option<bool>,
        }

        /// Maps to the |SCARD_PROTOCOL_*| values.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum Protocol {
            #[serde(rename = "t0")]
            T0,
            #[serde(rename = "t1")]
            T1,
            #[serde(rename = "raw")]
            Raw,
        }
        impl AsRef<str> for Protocol {
            fn as_ref(&self) -> &str {
                match self {
                    Self::T0 => "t0",
                    Self::T1 => "t1",
                    Self::Raw => "raw",
                }
            }
        }
        impl std::str::FromStr for Protocol {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "t0" => Ok(Self::T0),
                    "t1" => Ok(Self::T1),
                    "raw" => Ok(Self::Raw),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for Protocol {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReaderStateIn {
            pub reader: String,
            pub current_state: ReaderStateFlags,
            pub current_insertion_count: i64,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReaderStateOut {
            pub reader: String,
            pub event_state: ReaderStateFlags,
            pub event_count: i64,
            pub atr: String,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Enables the |SmartCardEmulation| domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.enable";
        }

        /// Disables the |SmartCardEmulation| domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.disable";
        }

        /// Reports the successful result of a |SCardEstablishContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportEstablishContextResult {
            pub request_id: String,
            pub context_id: i64,
        }

        impl ReportEstablishContextResult {
            pub fn new(request_id: impl Into<String>, context_id: i64) -> Self {
                Self {
                    request_id: request_id.into(),
                    context_id,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportEstablishContextResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportEstablishContextResult";
        }

        /// Reports the successful result of a |SCardReleaseContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportReleaseContextResult {
            pub request_id: String,
        }

        impl ReportReleaseContextResult {
            pub fn new(request_id: impl Into<String>) -> Self {
                Self {
                    request_id: request_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportReleaseContextResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportReleaseContextResult";
        }

        /// Reports the successful result of a |SCardListReaders| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportListReadersResult {
            pub request_id: String,
            pub readers: Vec<String>,
        }

        impl ReportListReadersResult {
            pub fn new(request_id: impl Into<String>, readers: Vec<String>) -> Self {
                Self {
                    request_id: request_id.into(),
                    readers,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportListReadersResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportListReadersResult";
        }

        /// Reports the successful result of a |SCardGetStatusChange| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportGetStatusChangeResult {
            pub request_id: String,
            pub reader_states: Vec<types::ReaderStateOut>,
        }

        impl ReportGetStatusChangeResult {
            pub fn new(
                request_id: impl Into<String>,
                reader_states: Vec<types::ReaderStateOut>,
            ) -> Self {
                Self {
                    request_id: request_id.into(),
                    reader_states,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportGetStatusChangeResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportGetStatusChangeResult";
        }

        /// Reports the result of a |SCardBeginTransaction| call. On success, this creates a new transaction object. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportBeginTransactionResult {
            pub request_id: String,
            pub handle: i64,
        }

        impl ReportBeginTransactionResult {
            pub fn new(request_id: impl Into<String>, handle: i64) -> Self {
                Self {
                    request_id: request_id.into(),
                    handle,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportBeginTransactionResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportBeginTransactionResult";
        }

        /// Reports the successful result of a call that returns only a result code. Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|. This maps to: 1. SCardCancel  PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6  Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel 2. SCardDisconnect  PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a  Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect 3. SCardSetAttrib  PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f  Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib 4. SCardEndTransaction  PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b  Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportPlainResult {
            pub request_id: String,
        }

        impl ReportPlainResult {
            pub fn new(request_id: impl Into<String>) -> Self {
                Self {
                    request_id: request_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportPlainResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportPlainResult";
        }

        /// Reports the successful result of a |SCardConnect| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportConnectResult {
            pub request_id: String,
            pub handle: i64,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub active_protocol: Option<types::Protocol>,
        }

        impl ReportConnectResult {
            pub fn new(request_id: impl Into<String>, handle: i64) -> Self {
                Self {
                    request_id: request_id.into(),
                    handle,
                    active_protocol: None,
                }
            }

            pub fn with_active_protocol(mut self, active_protocol: types::Protocol) -> Self {
                self.active_protocol = Some(active_protocol);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportConnectResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportConnectResult";
        }

        /// Reports the successful result of a call that sends back data on success. Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|. This maps to: 1. SCardTransmit  PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99  Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit 2. SCardControl  PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f  Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol 3. SCardGetAttrib  PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602  Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportDataResult {
            pub request_id: String,
            pub data: String,
        }

        impl ReportDataResult {
            pub fn new(request_id: impl Into<String>, data: impl Into<String>) -> Self {
                Self {
                    request_id: request_id.into(),
                    data: data.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportDataResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportDataResult";
        }

        /// Reports the successful result of a |SCardStatus| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportStatusResult {
            pub request_id: String,
            pub reader_name: String,
            pub state: types::ConnectionState,
            pub atr: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub protocol: Option<types::Protocol>,
        }

        impl ReportStatusResult {
            pub fn new(
                request_id: impl Into<String>,
                reader_name: impl Into<String>,
                state: types::ConnectionState,
                atr: impl Into<String>,
            ) -> Self {
                Self {
                    request_id: request_id.into(),
                    reader_name: reader_name.into(),
                    state,
                    atr: atr.into(),
                    protocol: None,
                }
            }

            pub fn with_protocol(mut self, protocol: types::Protocol) -> Self {
                self.protocol = Some(protocol);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportStatusResult {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportStatusResult";
        }

        /// Reports an error result for the given request.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportError {
            pub request_id: String,
            pub result_code: types::ResultCode,
        }

        impl ReportError {
            pub fn new(request_id: impl Into<String>, result_code: types::ResultCode) -> Self {
                Self {
                    request_id: request_id.into(),
                    result_code,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReportError {
            type Response = ();
            const METHOD: &'static str = "SmartCardEmulation.reportError";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Fired when |SCardEstablishContext| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EstablishContextRequested {
            pub request_id: String,
        }

        impl EstablishContextRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.establishContextRequested")
            }
        }

        /// Fired when |SCardReleaseContext| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReleaseContextRequested {
            pub request_id: String,
            pub context_id: i64,
        }

        impl ReleaseContextRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.releaseContextRequested")
            }
        }

        /// Fired when |SCardListReaders| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ListReadersRequested {
            pub request_id: String,
            pub context_id: i64,
        }

        impl ListReadersRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.listReadersRequested")
            }
        }

        /// Fired when |SCardGetStatusChange| is called. Timeout is specified in milliseconds. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStatusChangeRequested {
            pub request_id: String,
            pub context_id: i64,
            pub reader_states: Vec<types::ReaderStateIn>,
            /// in milliseconds, if absent, it means "infinite"
            pub timeout: Option<i64>,
        }

        impl GetStatusChangeRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.getStatusChangeRequested")
            }
        }

        /// Fired when |SCardCancel| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CancelRequested {
            pub request_id: String,
            pub context_id: i64,
        }

        impl CancelRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.cancelRequested")
            }
        }

        /// Fired when |SCardConnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ConnectRequested {
            pub request_id: String,
            pub context_id: i64,
            pub reader: String,
            pub share_mode: types::ShareMode,
            pub preferred_protocols: types::ProtocolSet,
        }

        impl ConnectRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.connectRequested")
            }
        }

        /// Fired when |SCardDisconnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DisconnectRequested {
            pub request_id: String,
            pub handle: i64,
            pub disposition: types::Disposition,
        }

        impl DisconnectRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.disconnectRequested")
            }
        }

        /// Fired when |SCardTransmit| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TransmitRequested {
            pub request_id: String,
            pub handle: i64,
            pub data: String,
            pub protocol: Option<types::Protocol>,
        }

        impl TransmitRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.transmitRequested")
            }
        }

        /// Fired when |SCardControl| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ControlRequested {
            pub request_id: String,
            pub handle: i64,
            pub control_code: i64,
            pub data: String,
        }

        impl ControlRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.controlRequested")
            }
        }

        /// Fired when |SCardGetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAttribRequested {
            pub request_id: String,
            pub handle: i64,
            pub attrib_id: i64,
        }

        impl GetAttribRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.getAttribRequested")
            }
        }

        /// Fired when |SCardSetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAttribRequested {
            pub request_id: String,
            pub handle: i64,
            pub attrib_id: i64,
            pub data: String,
        }

        impl SetAttribRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.setAttribRequested")
            }
        }

        /// Fired when |SCardStatus| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StatusRequested {
            pub request_id: String,
            pub handle: i64,
        }

        impl StatusRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.statusRequested")
            }
        }

        /// Fired when |SCardBeginTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BeginTransactionRequested {
            pub request_id: String,
            pub handle: i64,
        }

        impl BeginTransactionRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.beginTransactionRequested")
            }
        }

        /// Fired when |SCardEndTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EndTransactionRequested {
            pub request_id: String,
            pub handle: i64,
            pub disposition: types::Disposition,
        }

        impl EndTransactionRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("SmartCardEmulation.endTransactionRequested")
            }
        }
    }
}

pub mod storage {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        pub type SerializedStorageKey = String;

        /// Enum of possible storage types.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum StorageType {
            #[serde(rename = "cookies")]
            Cookies,
            #[serde(rename = "file_systems")]
            FileSystems,
            #[serde(rename = "indexeddb")]
            Indexeddb,
            #[serde(rename = "local_storage")]
            LocalStorage,
            #[serde(rename = "shader_cache")]
            ShaderCache,
            #[serde(rename = "websql")]
            Websql,
            #[serde(rename = "service_workers")]
            ServiceWorkers,
            #[serde(rename = "cache_storage")]
            CacheStorage,
            #[serde(rename = "interest_groups")]
            InterestGroups,
            #[serde(rename = "shared_storage")]
            SharedStorage,
            #[serde(rename = "storage_buckets")]
            StorageBuckets,
            #[serde(rename = "all")]
            All,
            #[serde(rename = "other")]
            Other,
        }
        impl AsRef<str> for StorageType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Cookies => "cookies",
                    Self::FileSystems => "file_systems",
                    Self::Indexeddb => "indexeddb",
                    Self::LocalStorage => "local_storage",
                    Self::ShaderCache => "shader_cache",
                    Self::Websql => "websql",
                    Self::ServiceWorkers => "service_workers",
                    Self::CacheStorage => "cache_storage",
                    Self::InterestGroups => "interest_groups",
                    Self::SharedStorage => "shared_storage",
                    Self::StorageBuckets => "storage_buckets",
                    Self::All => "all",
                    Self::Other => "other",
                }
            }
        }
        impl std::str::FromStr for StorageType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "cookies" => Ok(Self::Cookies),
                    "file_systems" => Ok(Self::FileSystems),
                    "indexeddb" => Ok(Self::Indexeddb),
                    "local_storage" => Ok(Self::LocalStorage),
                    "shader_cache" => Ok(Self::ShaderCache),
                    "websql" => Ok(Self::Websql),
                    "service_workers" => Ok(Self::ServiceWorkers),
                    "cache_storage" => Ok(Self::CacheStorage),
                    "interest_groups" => Ok(Self::InterestGroups),
                    "shared_storage" => Ok(Self::SharedStorage),
                    "storage_buckets" => Ok(Self::StorageBuckets),
                    "all" => Ok(Self::All),
                    "other" => Ok(Self::Other),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for StorageType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Usage for a storage type.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UsageForType {
            /// Name of storage type.
            pub storage_type: StorageType,
            /// Storage usage (bytes).
            pub usage: f64,
        }

        /// Pair of issuer origin and number of available (signed, but not used) Trust Tokens from that issuer.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrustTokens {
            pub issuer_origin: String,
            pub count: f64,
        }

        /// Protected audience interest group auction identifier.
        pub type InterestGroupAuctionId = String;

        /// Enum of interest group access types.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum InterestGroupAccessType {
            #[serde(rename = "join")]
            Join,
            #[serde(rename = "leave")]
            Leave,
            #[serde(rename = "update")]
            Update,
            #[serde(rename = "loaded")]
            Loaded,
            #[serde(rename = "bid")]
            Bid,
            #[serde(rename = "win")]
            Win,
            #[serde(rename = "additionalBid")]
            AdditionalBid,
            #[serde(rename = "additionalBidWin")]
            AdditionalBidWin,
            #[serde(rename = "topLevelBid")]
            TopLevelBid,
            #[serde(rename = "topLevelAdditionalBid")]
            TopLevelAdditionalBid,
            #[serde(rename = "clear")]
            Clear,
        }
        impl AsRef<str> for InterestGroupAccessType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Join => "join",
                    Self::Leave => "leave",
                    Self::Update => "update",
                    Self::Loaded => "loaded",
                    Self::Bid => "bid",
                    Self::Win => "win",
                    Self::AdditionalBid => "additionalBid",
                    Self::AdditionalBidWin => "additionalBidWin",
                    Self::TopLevelBid => "topLevelBid",
                    Self::TopLevelAdditionalBid => "topLevelAdditionalBid",
                    Self::Clear => "clear",
                }
            }
        }
        impl std::str::FromStr for InterestGroupAccessType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "join" => Ok(Self::Join),
                    "leave" => Ok(Self::Leave),
                    "update" => Ok(Self::Update),
                    "loaded" => Ok(Self::Loaded),
                    "bid" => Ok(Self::Bid),
                    "win" => Ok(Self::Win),
                    "additionalBid" => Ok(Self::AdditionalBid),
                    "additionalBidWin" => Ok(Self::AdditionalBidWin),
                    "topLevelBid" => Ok(Self::TopLevelBid),
                    "topLevelAdditionalBid" => Ok(Self::TopLevelAdditionalBid),
                    "clear" => Ok(Self::Clear),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for InterestGroupAccessType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of auction events.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum InterestGroupAuctionEventType {
            #[serde(rename = "started")]
            Started,
            #[serde(rename = "configResolved")]
            ConfigResolved,
        }
        impl AsRef<str> for InterestGroupAuctionEventType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Started => "started",
                    Self::ConfigResolved => "configResolved",
                }
            }
        }
        impl std::str::FromStr for InterestGroupAuctionEventType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "started" => Ok(Self::Started),
                    "configResolved" => Ok(Self::ConfigResolved),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for InterestGroupAuctionEventType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of network fetches auctions can do.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum InterestGroupAuctionFetchType {
            #[serde(rename = "bidderJs")]
            BidderJs,
            #[serde(rename = "bidderWasm")]
            BidderWasm,
            #[serde(rename = "sellerJs")]
            SellerJs,
            #[serde(rename = "bidderTrustedSignals")]
            BidderTrustedSignals,
            #[serde(rename = "sellerTrustedSignals")]
            SellerTrustedSignals,
        }
        impl AsRef<str> for InterestGroupAuctionFetchType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::BidderJs => "bidderJs",
                    Self::BidderWasm => "bidderWasm",
                    Self::SellerJs => "sellerJs",
                    Self::BidderTrustedSignals => "bidderTrustedSignals",
                    Self::SellerTrustedSignals => "sellerTrustedSignals",
                }
            }
        }
        impl std::str::FromStr for InterestGroupAuctionFetchType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "bidderJs" => Ok(Self::BidderJs),
                    "bidderWasm" => Ok(Self::BidderWasm),
                    "sellerJs" => Ok(Self::SellerJs),
                    "bidderTrustedSignals" => Ok(Self::BidderTrustedSignals),
                    "sellerTrustedSignals" => Ok(Self::SellerTrustedSignals),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for InterestGroupAuctionFetchType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of shared storage access scopes.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SharedStorageAccessScope {
            #[serde(rename = "window")]
            Window,
            #[serde(rename = "sharedStorageWorklet")]
            SharedStorageWorklet,
            #[serde(rename = "protectedAudienceWorklet")]
            ProtectedAudienceWorklet,
            #[serde(rename = "header")]
            Header,
        }
        impl AsRef<str> for SharedStorageAccessScope {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Window => "window",
                    Self::SharedStorageWorklet => "sharedStorageWorklet",
                    Self::ProtectedAudienceWorklet => "protectedAudienceWorklet",
                    Self::Header => "header",
                }
            }
        }
        impl std::str::FromStr for SharedStorageAccessScope {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "window" => Ok(Self::Window),
                    "sharedStorageWorklet" => Ok(Self::SharedStorageWorklet),
                    "protectedAudienceWorklet" => Ok(Self::ProtectedAudienceWorklet),
                    "header" => Ok(Self::Header),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SharedStorageAccessScope {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of shared storage access methods.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SharedStorageAccessMethod {
            #[serde(rename = "addModule")]
            AddModule,
            #[serde(rename = "createWorklet")]
            CreateWorklet,
            #[serde(rename = "selectURL")]
            SelectUrl,
            #[serde(rename = "run")]
            Run,
            #[serde(rename = "batchUpdate")]
            BatchUpdate,
            #[serde(rename = "set")]
            Set,
            #[serde(rename = "append")]
            Append,
            #[serde(rename = "delete")]
            Delete,
            #[serde(rename = "clear")]
            Clear,
            #[serde(rename = "get")]
            Get,
            #[serde(rename = "keys")]
            Keys,
            #[serde(rename = "values")]
            Values,
            #[serde(rename = "entries")]
            Entries,
            #[serde(rename = "length")]
            Length,
            #[serde(rename = "remainingBudget")]
            RemainingBudget,
        }
        impl AsRef<str> for SharedStorageAccessMethod {
            fn as_ref(&self) -> &str {
                match self {
                    Self::AddModule => "addModule",
                    Self::CreateWorklet => "createWorklet",
                    Self::SelectUrl => "selectURL",
                    Self::Run => "run",
                    Self::BatchUpdate => "batchUpdate",
                    Self::Set => "set",
                    Self::Append => "append",
                    Self::Delete => "delete",
                    Self::Clear => "clear",
                    Self::Get => "get",
                    Self::Keys => "keys",
                    Self::Values => "values",
                    Self::Entries => "entries",
                    Self::Length => "length",
                    Self::RemainingBudget => "remainingBudget",
                }
            }
        }
        impl std::str::FromStr for SharedStorageAccessMethod {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "addModule" => Ok(Self::AddModule),
                    "createWorklet" => Ok(Self::CreateWorklet),
                    "selectURL" => Ok(Self::SelectUrl),
                    "run" => Ok(Self::Run),
                    "batchUpdate" => Ok(Self::BatchUpdate),
                    "set" => Ok(Self::Set),
                    "append" => Ok(Self::Append),
                    "delete" => Ok(Self::Delete),
                    "clear" => Ok(Self::Clear),
                    "get" => Ok(Self::Get),
                    "keys" => Ok(Self::Keys),
                    "values" => Ok(Self::Values),
                    "entries" => Ok(Self::Entries),
                    "length" => Ok(Self::Length),
                    "remainingBudget" => Ok(Self::RemainingBudget),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SharedStorageAccessMethod {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Struct for a single key-value pair in an origin's shared storage.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStorageEntry {
            pub key: String,
            pub value: String,
        }

        /// Details for an origin's shared storage.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStorageMetadata {
            /// Time when the origin's shared storage was last created.
            pub creation_time: network::types::TimeSinceEpoch,
            /// Number of key-value pairs stored in origin's shared storage.
            pub length: i64,
            /// Current amount of bits of entropy remaining in the navigation budget.
            pub remaining_budget: f64,
            /// Total number of bytes stored as key-value pairs in origin's shared storage.
            pub bytes_used: i64,
        }

        /// Represents a dictionary object passed in as privateAggregationConfig to run or selectURL.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStoragePrivateAggregationConfig {
            /// The chosen aggregation service deployment.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub aggregation_coordinator_origin: Option<String>,
            /// The context ID provided.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub context_id: Option<String>,
            /// Configures the maximum size allowed for filtering IDs.
            pub filtering_id_max_bytes: i64,
            /// The limit on the number of contributions in the final report.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_contributions: Option<i64>,
        }

        /// Pair of reporting metadata details for a candidate URL for `selectURL()`.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStorageReportingMetadata {
            pub event_type: String,
            pub reporting_url: String,
        }

        /// Bundles a candidate URL with its reporting metadata.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStorageUrlWithMetadata {
            /// Spec of candidate URL.
            pub url: String,
            /// Any associated reporting metadata.
            pub reporting_metadata: Vec<SharedStorageReportingMetadata>,
        }

        /// Bundles the parameters for shared storage access events whose presence/absence can vary according to SharedStorageAccessType.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStorageAccessParams {
            /// Spec of the module script URL. Present only for SharedStorageAccessMethods: addModule and createWorklet.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub script_source_url: Option<String>,
            /// String denoting "context-origin", "script-origin", or a custom origin to be used as the worklet's data origin. Present only for SharedStorageAccessMethod: createWorklet.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub data_origin: Option<String>,
            /// Name of the registered operation to be run. Present only for SharedStorageAccessMethods: run and selectURL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub operation_name: Option<String>,
            /// ID of the operation call. Present only for SharedStorageAccessMethods: run and selectURL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub operation_id: Option<String>,
            /// Whether or not to keep the worket alive for future run or selectURL calls. Present only for SharedStorageAccessMethods: run and selectURL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub keep_alive: Option<bool>,
            /// Configures the private aggregation options. Present only for SharedStorageAccessMethods: run and selectURL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub private_aggregation_config: Option<SharedStoragePrivateAggregationConfig>,
            /// The operation's serialized data in bytes (converted to a string). Present only for SharedStorageAccessMethods: run and selectURL. TODO(crbug.com/401011862): Consider updating this parameter to binary.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub serialized_data: Option<String>,
            /// Array of candidate URLs' specs, along with any associated metadata. Present only for SharedStorageAccessMethod: selectURL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub urls_with_metadata: Option<Vec<SharedStorageUrlWithMetadata>>,
            /// Spec of the URN:UUID generated for a selectURL call. Present only for SharedStorageAccessMethod: selectURL.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub urn_uuid: Option<String>,
            /// Key for a specific entry in an origin's shared storage. Present only for SharedStorageAccessMethods: set, append, delete, and get.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub key: Option<String>,
            /// Value for a specific entry in an origin's shared storage. Present only for SharedStorageAccessMethods: set and append.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<String>,
            /// Whether or not to set an entry for a key if that key is already present. Present only for SharedStorageAccessMethod: set.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ignore_if_present: Option<bool>,
            /// A number denoting the (0-based) order of the worklet's creation relative to all other shared storage worklets created by documents using the current storage partition. Present only for SharedStorageAccessMethods: addModule, createWorklet.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub worklet_ordinal: Option<i64>,
            /// Hex representation of the DevTools token used as the TargetID for the associated shared storage worklet. Present only for SharedStorageAccessMethods: addModule, createWorklet, run, selectURL, and any other SharedStorageAccessMethod when the SharedStorageAccessScope is sharedStorageWorklet.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub worklet_target_id: Option<target::types::TargetID>,
            /// Name of the lock to be acquired, if present. Optionally present only for SharedStorageAccessMethods: batchUpdate, set, append, delete, and clear.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub with_lock: Option<String>,
            /// If the method has been called as part of a batchUpdate, then this number identifies the batch to which it belongs. Optionally present only for SharedStorageAccessMethods: batchUpdate (required), set, append, delete, and clear.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub batch_update_id: Option<String>,
            /// Number of modifier methods sent in batch. Present only for SharedStorageAccessMethod: batchUpdate.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub batch_size: Option<i64>,
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum StorageBucketsDurability {
            #[serde(rename = "relaxed")]
            Relaxed,
            #[serde(rename = "strict")]
            Strict,
        }
        impl AsRef<str> for StorageBucketsDurability {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Relaxed => "relaxed",
                    Self::Strict => "strict",
                }
            }
        }
        impl std::str::FromStr for StorageBucketsDurability {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "relaxed" => Ok(Self::Relaxed),
                    "strict" => Ok(Self::Strict),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for StorageBucketsDurability {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StorageBucket {
            pub storage_key: SerializedStorageKey,
            /// If not specified, it is the default bucket of the storageKey.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StorageBucketInfo {
            pub bucket: StorageBucket,
            pub id: String,
            pub expiration: network::types::TimeSinceEpoch,
            /// Storage quota (bytes).
            pub quota: f64,
            pub persistent: bool,
            pub durability: StorageBucketsDurability,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingSourceType {
            #[serde(rename = "navigation")]
            Navigation,
            #[serde(rename = "event")]
            Event,
        }
        impl AsRef<str> for AttributionReportingSourceType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Navigation => "navigation",
                    Self::Event => "event",
                }
            }
        }
        impl std::str::FromStr for AttributionReportingSourceType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "navigation" => Ok(Self::Navigation),
                    "event" => Ok(Self::Event),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingSourceType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type UnsignedInt64AsBase10 = String;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type UnsignedInt128AsBase16 = String;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type SignedInt64AsBase10 = String;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingFilterDataEntry {
            pub key: String,
            pub values: Vec<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingFilterConfig {
            pub filter_values: Vec<AttributionReportingFilterDataEntry>,
            /// duration in seconds
            #[serde(skip_serializing_if = "Option::is_none")]
            pub lookback_window: Option<i64>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingFilterPair {
            pub filters: Vec<AttributionReportingFilterConfig>,
            pub not_filters: Vec<AttributionReportingFilterConfig>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingAggregationKeysEntry {
            pub key: String,
            pub value: UnsignedInt128AsBase16,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingEventReportWindows {
            /// duration in seconds
            pub start: i64,
            /// duration in seconds
            pub ends: Vec<i64>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingTriggerDataMatching {
            #[serde(rename = "exact")]
            Exact,
            #[serde(rename = "modulus")]
            Modulus,
        }
        impl AsRef<str> for AttributionReportingTriggerDataMatching {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Exact => "exact",
                    Self::Modulus => "modulus",
                }
            }
        }
        impl std::str::FromStr for AttributionReportingTriggerDataMatching {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "exact" => Ok(Self::Exact),
                    "modulus" => Ok(Self::Modulus),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingTriggerDataMatching {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingAggregatableDebugReportingData {
            pub key_piece: UnsignedInt128AsBase16,
            /// number instead of integer because not all uint32 can be represented by int
            pub value: f64,
            pub types: Vec<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingAggregatableDebugReportingConfig {
            /// number instead of integer because not all uint32 can be represented by int, only present for source registrations
            #[serde(skip_serializing_if = "Option::is_none")]
            pub budget: Option<f64>,
            pub key_piece: UnsignedInt128AsBase16,
            pub debug_data: Vec<AttributionReportingAggregatableDebugReportingData>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub aggregation_coordinator_origin: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionScopesData {
            pub values: Vec<String>,
            /// number instead of integer because not all uint32 can be represented by int
            pub limit: f64,
            pub max_event_states: f64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingNamedBudgetDef {
            pub name: String,
            pub budget: i64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingSourceRegistration {
            pub time: network::types::TimeSinceEpoch,
            /// duration in seconds
            pub expiry: i64,
            /// number instead of integer because not all uint32 can be represented by int
            pub trigger_data: Vec<f64>,
            pub event_report_windows: AttributionReportingEventReportWindows,
            /// duration in seconds
            pub aggregatable_report_window: i64,
            pub type_: AttributionReportingSourceType,
            pub source_origin: String,
            pub reporting_origin: String,
            pub destination_sites: Vec<String>,
            pub event_id: UnsignedInt64AsBase10,
            pub priority: SignedInt64AsBase10,
            pub filter_data: Vec<AttributionReportingFilterDataEntry>,
            pub aggregation_keys: Vec<AttributionReportingAggregationKeysEntry>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub debug_key: Option<UnsignedInt64AsBase10>,
            pub trigger_data_matching: AttributionReportingTriggerDataMatching,
            pub destination_limit_priority: SignedInt64AsBase10,
            pub aggregatable_debug_reporting_config:
                AttributionReportingAggregatableDebugReportingConfig,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub scopes_data: Option<AttributionScopesData>,
            pub max_event_level_reports: i64,
            pub named_budgets: Vec<AttributionReportingNamedBudgetDef>,
            pub debug_reporting: bool,
            pub event_level_epsilon: f64,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingSourceRegistrationResult {
            #[serde(rename = "success")]
            Success,
            #[serde(rename = "internalError")]
            InternalError,
            #[serde(rename = "insufficientSourceCapacity")]
            InsufficientSourceCapacity,
            #[serde(rename = "insufficientUniqueDestinationCapacity")]
            InsufficientUniqueDestinationCapacity,
            #[serde(rename = "excessiveReportingOrigins")]
            ExcessiveReportingOrigins,
            #[serde(rename = "prohibitedByBrowserPolicy")]
            ProhibitedByBrowserPolicy,
            #[serde(rename = "successNoised")]
            SuccessNoised,
            #[serde(rename = "destinationReportingLimitReached")]
            DestinationReportingLimitReached,
            #[serde(rename = "destinationGlobalLimitReached")]
            DestinationGlobalLimitReached,
            #[serde(rename = "destinationBothLimitsReached")]
            DestinationBothLimitsReached,
            #[serde(rename = "reportingOriginsPerSiteLimitReached")]
            ReportingOriginsPerSiteLimitReached,
            #[serde(rename = "exceedsMaxChannelCapacity")]
            ExceedsMaxChannelCapacity,
            #[serde(rename = "exceedsMaxScopesChannelCapacity")]
            ExceedsMaxScopesChannelCapacity,
            #[serde(rename = "exceedsMaxTriggerStateCardinality")]
            ExceedsMaxTriggerStateCardinality,
            #[serde(rename = "exceedsMaxEventStatesLimit")]
            ExceedsMaxEventStatesLimit,
            #[serde(rename = "destinationPerDayReportingLimitReached")]
            DestinationPerDayReportingLimitReached,
        }
        impl AsRef<str> for AttributionReportingSourceRegistrationResult {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Success => "success",
                    Self::InternalError => "internalError",
                    Self::InsufficientSourceCapacity => "insufficientSourceCapacity",
                    Self::InsufficientUniqueDestinationCapacity => {
                        "insufficientUniqueDestinationCapacity"
                    }
                    Self::ExcessiveReportingOrigins => "excessiveReportingOrigins",
                    Self::ProhibitedByBrowserPolicy => "prohibitedByBrowserPolicy",
                    Self::SuccessNoised => "successNoised",
                    Self::DestinationReportingLimitReached => "destinationReportingLimitReached",
                    Self::DestinationGlobalLimitReached => "destinationGlobalLimitReached",
                    Self::DestinationBothLimitsReached => "destinationBothLimitsReached",
                    Self::ReportingOriginsPerSiteLimitReached => {
                        "reportingOriginsPerSiteLimitReached"
                    }
                    Self::ExceedsMaxChannelCapacity => "exceedsMaxChannelCapacity",
                    Self::ExceedsMaxScopesChannelCapacity => "exceedsMaxScopesChannelCapacity",
                    Self::ExceedsMaxTriggerStateCardinality => "exceedsMaxTriggerStateCardinality",
                    Self::ExceedsMaxEventStatesLimit => "exceedsMaxEventStatesLimit",
                    Self::DestinationPerDayReportingLimitReached => {
                        "destinationPerDayReportingLimitReached"
                    }
                }
            }
        }
        impl std::str::FromStr for AttributionReportingSourceRegistrationResult {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "success" => Ok(Self::Success),
                    "internalError" => Ok(Self::InternalError),
                    "insufficientSourceCapacity" => Ok(Self::InsufficientSourceCapacity),
                    "insufficientUniqueDestinationCapacity" => {
                        Ok(Self::InsufficientUniqueDestinationCapacity)
                    }
                    "excessiveReportingOrigins" => Ok(Self::ExcessiveReportingOrigins),
                    "prohibitedByBrowserPolicy" => Ok(Self::ProhibitedByBrowserPolicy),
                    "successNoised" => Ok(Self::SuccessNoised),
                    "destinationReportingLimitReached" => {
                        Ok(Self::DestinationReportingLimitReached)
                    }
                    "destinationGlobalLimitReached" => Ok(Self::DestinationGlobalLimitReached),
                    "destinationBothLimitsReached" => Ok(Self::DestinationBothLimitsReached),
                    "reportingOriginsPerSiteLimitReached" => {
                        Ok(Self::ReportingOriginsPerSiteLimitReached)
                    }
                    "exceedsMaxChannelCapacity" => Ok(Self::ExceedsMaxChannelCapacity),
                    "exceedsMaxScopesChannelCapacity" => Ok(Self::ExceedsMaxScopesChannelCapacity),
                    "exceedsMaxTriggerStateCardinality" => {
                        Ok(Self::ExceedsMaxTriggerStateCardinality)
                    }
                    "exceedsMaxEventStatesLimit" => Ok(Self::ExceedsMaxEventStatesLimit),
                    "destinationPerDayReportingLimitReached" => {
                        Ok(Self::DestinationPerDayReportingLimitReached)
                    }
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingSourceRegistrationResult {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingSourceRegistrationTimeConfig {
            #[serde(rename = "include")]
            Include,
            #[serde(rename = "exclude")]
            Exclude,
        }
        impl AsRef<str> for AttributionReportingSourceRegistrationTimeConfig {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Include => "include",
                    Self::Exclude => "exclude",
                }
            }
        }
        impl std::str::FromStr for AttributionReportingSourceRegistrationTimeConfig {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "include" => Ok(Self::Include),
                    "exclude" => Ok(Self::Exclude),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingSourceRegistrationTimeConfig {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingAggregatableValueDictEntry {
            pub key: String,
            /// number instead of integer because not all uint32 can be represented by int
            pub value: f64,
            pub filtering_id: UnsignedInt64AsBase10,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingAggregatableValueEntry {
            pub values: Vec<AttributionReportingAggregatableValueDictEntry>,
            pub filters: AttributionReportingFilterPair,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingEventTriggerData {
            pub data: UnsignedInt64AsBase10,
            pub priority: SignedInt64AsBase10,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dedup_key: Option<UnsignedInt64AsBase10>,
            pub filters: AttributionReportingFilterPair,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingAggregatableTriggerData {
            pub key_piece: UnsignedInt128AsBase16,
            pub source_keys: Vec<String>,
            pub filters: AttributionReportingFilterPair,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingAggregatableDedupKey {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dedup_key: Option<UnsignedInt64AsBase10>,
            pub filters: AttributionReportingFilterPair,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingNamedBudgetCandidate {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            pub filters: AttributionReportingFilterPair,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingTriggerRegistration {
            pub filters: AttributionReportingFilterPair,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub debug_key: Option<UnsignedInt64AsBase10>,
            pub aggregatable_dedup_keys: Vec<AttributionReportingAggregatableDedupKey>,
            pub event_trigger_data: Vec<AttributionReportingEventTriggerData>,
            pub aggregatable_trigger_data: Vec<AttributionReportingAggregatableTriggerData>,
            pub aggregatable_values: Vec<AttributionReportingAggregatableValueEntry>,
            pub aggregatable_filtering_id_max_bytes: i64,
            pub debug_reporting: bool,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub aggregation_coordinator_origin: Option<String>,
            pub source_registration_time_config: AttributionReportingSourceRegistrationTimeConfig,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub trigger_context_id: Option<String>,
            pub aggregatable_debug_reporting_config:
                AttributionReportingAggregatableDebugReportingConfig,
            pub scopes: Vec<String>,
            pub named_budgets: Vec<AttributionReportingNamedBudgetCandidate>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingEventLevelResult {
            #[serde(rename = "success")]
            Success,
            #[serde(rename = "successDroppedLowerPriority")]
            SuccessDroppedLowerPriority,
            #[serde(rename = "internalError")]
            InternalError,
            #[serde(rename = "noCapacityForAttributionDestination")]
            NoCapacityForAttributionDestination,
            #[serde(rename = "noMatchingSources")]
            NoMatchingSources,
            #[serde(rename = "deduplicated")]
            Deduplicated,
            #[serde(rename = "excessiveAttributions")]
            ExcessiveAttributions,
            #[serde(rename = "priorityTooLow")]
            PriorityTooLow,
            #[serde(rename = "neverAttributedSource")]
            NeverAttributedSource,
            #[serde(rename = "excessiveReportingOrigins")]
            ExcessiveReportingOrigins,
            #[serde(rename = "noMatchingSourceFilterData")]
            NoMatchingSourceFilterData,
            #[serde(rename = "prohibitedByBrowserPolicy")]
            ProhibitedByBrowserPolicy,
            #[serde(rename = "noMatchingConfigurations")]
            NoMatchingConfigurations,
            #[serde(rename = "excessiveReports")]
            ExcessiveReports,
            #[serde(rename = "falselyAttributedSource")]
            FalselyAttributedSource,
            #[serde(rename = "reportWindowPassed")]
            ReportWindowPassed,
            #[serde(rename = "notRegistered")]
            NotRegistered,
            #[serde(rename = "reportWindowNotStarted")]
            ReportWindowNotStarted,
            #[serde(rename = "noMatchingTriggerData")]
            NoMatchingTriggerData,
        }
        impl AsRef<str> for AttributionReportingEventLevelResult {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Success => "success",
                    Self::SuccessDroppedLowerPriority => "successDroppedLowerPriority",
                    Self::InternalError => "internalError",
                    Self::NoCapacityForAttributionDestination => {
                        "noCapacityForAttributionDestination"
                    }
                    Self::NoMatchingSources => "noMatchingSources",
                    Self::Deduplicated => "deduplicated",
                    Self::ExcessiveAttributions => "excessiveAttributions",
                    Self::PriorityTooLow => "priorityTooLow",
                    Self::NeverAttributedSource => "neverAttributedSource",
                    Self::ExcessiveReportingOrigins => "excessiveReportingOrigins",
                    Self::NoMatchingSourceFilterData => "noMatchingSourceFilterData",
                    Self::ProhibitedByBrowserPolicy => "prohibitedByBrowserPolicy",
                    Self::NoMatchingConfigurations => "noMatchingConfigurations",
                    Self::ExcessiveReports => "excessiveReports",
                    Self::FalselyAttributedSource => "falselyAttributedSource",
                    Self::ReportWindowPassed => "reportWindowPassed",
                    Self::NotRegistered => "notRegistered",
                    Self::ReportWindowNotStarted => "reportWindowNotStarted",
                    Self::NoMatchingTriggerData => "noMatchingTriggerData",
                }
            }
        }
        impl std::str::FromStr for AttributionReportingEventLevelResult {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "success" => Ok(Self::Success),
                    "successDroppedLowerPriority" => Ok(Self::SuccessDroppedLowerPriority),
                    "internalError" => Ok(Self::InternalError),
                    "noCapacityForAttributionDestination" => {
                        Ok(Self::NoCapacityForAttributionDestination)
                    }
                    "noMatchingSources" => Ok(Self::NoMatchingSources),
                    "deduplicated" => Ok(Self::Deduplicated),
                    "excessiveAttributions" => Ok(Self::ExcessiveAttributions),
                    "priorityTooLow" => Ok(Self::PriorityTooLow),
                    "neverAttributedSource" => Ok(Self::NeverAttributedSource),
                    "excessiveReportingOrigins" => Ok(Self::ExcessiveReportingOrigins),
                    "noMatchingSourceFilterData" => Ok(Self::NoMatchingSourceFilterData),
                    "prohibitedByBrowserPolicy" => Ok(Self::ProhibitedByBrowserPolicy),
                    "noMatchingConfigurations" => Ok(Self::NoMatchingConfigurations),
                    "excessiveReports" => Ok(Self::ExcessiveReports),
                    "falselyAttributedSource" => Ok(Self::FalselyAttributedSource),
                    "reportWindowPassed" => Ok(Self::ReportWindowPassed),
                    "notRegistered" => Ok(Self::NotRegistered),
                    "reportWindowNotStarted" => Ok(Self::ReportWindowNotStarted),
                    "noMatchingTriggerData" => Ok(Self::NoMatchingTriggerData),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingEventLevelResult {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingAggregatableResult {
            #[serde(rename = "success")]
            Success,
            #[serde(rename = "internalError")]
            InternalError,
            #[serde(rename = "noCapacityForAttributionDestination")]
            NoCapacityForAttributionDestination,
            #[serde(rename = "noMatchingSources")]
            NoMatchingSources,
            #[serde(rename = "excessiveAttributions")]
            ExcessiveAttributions,
            #[serde(rename = "excessiveReportingOrigins")]
            ExcessiveReportingOrigins,
            #[serde(rename = "noHistograms")]
            NoHistograms,
            #[serde(rename = "insufficientBudget")]
            InsufficientBudget,
            #[serde(rename = "insufficientNamedBudget")]
            InsufficientNamedBudget,
            #[serde(rename = "noMatchingSourceFilterData")]
            NoMatchingSourceFilterData,
            #[serde(rename = "notRegistered")]
            NotRegistered,
            #[serde(rename = "prohibitedByBrowserPolicy")]
            ProhibitedByBrowserPolicy,
            #[serde(rename = "deduplicated")]
            Deduplicated,
            #[serde(rename = "reportWindowPassed")]
            ReportWindowPassed,
            #[serde(rename = "excessiveReports")]
            ExcessiveReports,
        }
        impl AsRef<str> for AttributionReportingAggregatableResult {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Success => "success",
                    Self::InternalError => "internalError",
                    Self::NoCapacityForAttributionDestination => {
                        "noCapacityForAttributionDestination"
                    }
                    Self::NoMatchingSources => "noMatchingSources",
                    Self::ExcessiveAttributions => "excessiveAttributions",
                    Self::ExcessiveReportingOrigins => "excessiveReportingOrigins",
                    Self::NoHistograms => "noHistograms",
                    Self::InsufficientBudget => "insufficientBudget",
                    Self::InsufficientNamedBudget => "insufficientNamedBudget",
                    Self::NoMatchingSourceFilterData => "noMatchingSourceFilterData",
                    Self::NotRegistered => "notRegistered",
                    Self::ProhibitedByBrowserPolicy => "prohibitedByBrowserPolicy",
                    Self::Deduplicated => "deduplicated",
                    Self::ReportWindowPassed => "reportWindowPassed",
                    Self::ExcessiveReports => "excessiveReports",
                }
            }
        }
        impl std::str::FromStr for AttributionReportingAggregatableResult {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "success" => Ok(Self::Success),
                    "internalError" => Ok(Self::InternalError),
                    "noCapacityForAttributionDestination" => {
                        Ok(Self::NoCapacityForAttributionDestination)
                    }
                    "noMatchingSources" => Ok(Self::NoMatchingSources),
                    "excessiveAttributions" => Ok(Self::ExcessiveAttributions),
                    "excessiveReportingOrigins" => Ok(Self::ExcessiveReportingOrigins),
                    "noHistograms" => Ok(Self::NoHistograms),
                    "insufficientBudget" => Ok(Self::InsufficientBudget),
                    "insufficientNamedBudget" => Ok(Self::InsufficientNamedBudget),
                    "noMatchingSourceFilterData" => Ok(Self::NoMatchingSourceFilterData),
                    "notRegistered" => Ok(Self::NotRegistered),
                    "prohibitedByBrowserPolicy" => Ok(Self::ProhibitedByBrowserPolicy),
                    "deduplicated" => Ok(Self::Deduplicated),
                    "reportWindowPassed" => Ok(Self::ReportWindowPassed),
                    "excessiveReports" => Ok(Self::ExcessiveReports),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingAggregatableResult {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AttributionReportingReportResult {
            #[serde(rename = "sent")]
            Sent,
            #[serde(rename = "prohibited")]
            Prohibited,
            #[serde(rename = "failedToAssemble")]
            FailedToAssemble,
            #[serde(rename = "expired")]
            Expired,
        }
        impl AsRef<str> for AttributionReportingReportResult {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Sent => "sent",
                    Self::Prohibited => "prohibited",
                    Self::FailedToAssemble => "failedToAssemble",
                    Self::Expired => "expired",
                }
            }
        }
        impl std::str::FromStr for AttributionReportingReportResult {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "sent" => Ok(Self::Sent),
                    "prohibited" => Ok(Self::Prohibited),
                    "failedToAssemble" => Ok(Self::FailedToAssemble),
                    "expired" => Ok(Self::Expired),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AttributionReportingReportResult {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// A single Related Website Set object.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RelatedWebsiteSet {
            /// The primary site of this set, along with the ccTLDs if there is any.
            pub primary_sites: Vec<String>,
            /// The associated sites of this set, along with the ccTLDs if there is any.
            pub associated_sites: Vec<String>,
            /// The service sites of this set, along with the ccTLDs if there is any.
            pub service_sites: Vec<String>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStorageKeyForFrameResponse {
            pub storage_key: types::SerializedStorageKey,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStorageKeyResponse {
            pub storage_key: types::SerializedStorageKey,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCookiesResponse {
            /// Array of cookie objects.
            pub cookies: Vec<network::types::Cookie>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetUsageAndQuotaResponse {
            /// Storage usage (bytes).
            pub usage: f64,
            /// Storage quota (bytes).
            pub quota: f64,
            /// Whether or not the origin has an active storage quota override
            pub override_active: bool,
            /// Storage usage per type (bytes).
            pub usage_breakdown: Vec<types::UsageForType>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTrustTokensResponse {
            pub tokens: Vec<types::TrustTokens>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearTrustTokensResponse {
            /// True if any tokens were deleted, false otherwise.
            pub did_delete_tokens: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInterestGroupDetailsResponse {
            /// This largely corresponds to: https://wicg.github.io/turtledove/#dictdef-generatebidinterestgroup but has absolute expirationTime instead of relative lifetimeMs and also adds joiningOrigin.
            pub details: serde_json::Value,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSharedStorageMetadataResponse {
            pub metadata: types::SharedStorageMetadata,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSharedStorageEntriesResponse {
            pub entries: Vec<types::SharedStorageEntry>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RunBounceTrackingMitigationsResponse {
            pub deleted_sites: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SendPendingAttributionReportsResponse {
            /// The number of reports that were sent.
            pub num_sent: i64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRelatedWebsiteSetsResponse {
            pub sets: Vec<types::RelatedWebsiteSet>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAffectedUrlsForThirdPartyCookieMetadataResponse {
            /// Array of matching URLs. If there is a primary pattern match for the first- party URL, only the first-party URL is returned in the array.
            pub matched_urls: Vec<String>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Returns a storage key given a frame id. Deprecated. Please use Storage.getStorageKey instead.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStorageKeyForFrame {
            pub frame_id: page::types::FrameId,
        }

        impl GetStorageKeyForFrame {
            pub fn new(frame_id: page::types::FrameId) -> Self {
                Self { frame_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetStorageKeyForFrameResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetStorageKeyForFrame {
            type Response = responses::GetStorageKeyForFrameResponse;
            const METHOD: &'static str = "Storage.getStorageKeyForFrame";
        }

        /// Returns storage key for the given frame. If no frame ID is provided, the storage key of the target executing this command is returned.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStorageKey {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub frame_id: Option<page::types::FrameId>,
        }

        impl GetStorageKey {
            pub fn new() -> Self {
                Self { frame_id: None }
            }

            pub fn with_frame_id(mut self, frame_id: page::types::FrameId) -> Self {
                self.frame_id = Some(frame_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetStorageKeyResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetStorageKey {
            type Response = responses::GetStorageKeyResponse;
            const METHOD: &'static str = "Storage.getStorageKey";
        }

        /// Clears storage for origin.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDataForOrigin {
            /// Security origin.
            pub origin: String,
            /// Comma separated list of StorageType to clear.
            pub storage_types: String,
        }

        impl ClearDataForOrigin {
            pub fn new(origin: impl Into<String>, storage_types: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                    storage_types: storage_types.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDataForOrigin {
            type Response = ();
            const METHOD: &'static str = "Storage.clearDataForOrigin";
        }

        /// Clears storage for storage key.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearDataForStorageKey {
            /// Storage key.
            pub storage_key: String,
            /// Comma separated list of StorageType to clear.
            pub storage_types: String,
        }

        impl ClearDataForStorageKey {
            pub fn new(storage_key: impl Into<String>, storage_types: impl Into<String>) -> Self {
                Self {
                    storage_key: storage_key.into(),
                    storage_types: storage_types.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearDataForStorageKey {
            type Response = ();
            const METHOD: &'static str = "Storage.clearDataForStorageKey";
        }

        /// Returns all browser cookies.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCookies {
            /// Browser context to use when called on the browser endpoint.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<browser::types::BrowserContextID>,
        }

        impl GetCookies {
            pub fn new() -> Self {
                Self {
                    browser_context_id: None,
                }
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: browser::types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetCookiesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetCookies {
            type Response = responses::GetCookiesResponse;
            const METHOD: &'static str = "Storage.getCookies";
        }

        /// Sets given cookies.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCookies {
            /// Cookies to be set.
            pub cookies: Vec<network::types::CookieParam>,
            /// Browser context to use when called on the browser endpoint.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<browser::types::BrowserContextID>,
        }

        impl SetCookies {
            pub fn new(cookies: Vec<network::types::CookieParam>) -> Self {
                Self {
                    cookies,
                    browser_context_id: None,
                }
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: browser::types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCookies {
            type Response = ();
            const METHOD: &'static str = "Storage.setCookies";
        }

        /// Clears cookies.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearCookies {
            /// Browser context to use when called on the browser endpoint.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<browser::types::BrowserContextID>,
        }

        impl ClearCookies {
            pub fn new() -> Self {
                Self {
                    browser_context_id: None,
                }
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: browser::types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearCookies {
            type Response = ();
            const METHOD: &'static str = "Storage.clearCookies";
        }

        /// Returns usage and quota in bytes.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetUsageAndQuota {
            /// Security origin.
            pub origin: String,
        }

        impl GetUsageAndQuota {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetUsageAndQuotaResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetUsageAndQuota {
            type Response = responses::GetUsageAndQuotaResponse;
            const METHOD: &'static str = "Storage.getUsageAndQuota";
        }

        /// Override quota for the specified origin
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OverrideQuotaForOrigin {
            /// Security origin.
            pub origin: String,
            /// The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub quota_size: Option<f64>,
        }

        impl OverrideQuotaForOrigin {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                    quota_size: None,
                }
            }

            pub fn with_quota_size(mut self, quota_size: f64) -> Self {
                self.quota_size = Some(quota_size);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for OverrideQuotaForOrigin {
            type Response = ();
            const METHOD: &'static str = "Storage.overrideQuotaForOrigin";
        }

        /// Registers origin to be notified when an update occurs to its cache storage list.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrackCacheStorageForOrigin {
            /// Security origin.
            pub origin: String,
        }

        impl TrackCacheStorageForOrigin {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TrackCacheStorageForOrigin {
            type Response = ();
            const METHOD: &'static str = "Storage.trackCacheStorageForOrigin";
        }

        /// Registers storage key to be notified when an update occurs to its cache storage list.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrackCacheStorageForStorageKey {
            /// Storage key.
            pub storage_key: String,
        }

        impl TrackCacheStorageForStorageKey {
            pub fn new(storage_key: impl Into<String>) -> Self {
                Self {
                    storage_key: storage_key.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TrackCacheStorageForStorageKey {
            type Response = ();
            const METHOD: &'static str = "Storage.trackCacheStorageForStorageKey";
        }

        /// Registers origin to be notified when an update occurs to its IndexedDB.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrackIndexedDbForOrigin {
            /// Security origin.
            pub origin: String,
        }

        impl TrackIndexedDbForOrigin {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TrackIndexedDbForOrigin {
            type Response = ();
            const METHOD: &'static str = "Storage.trackIndexedDBForOrigin";
        }

        /// Registers storage key to be notified when an update occurs to its IndexedDB.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TrackIndexedDbForStorageKey {
            /// Storage key.
            pub storage_key: String,
        }

        impl TrackIndexedDbForStorageKey {
            pub fn new(storage_key: impl Into<String>) -> Self {
                Self {
                    storage_key: storage_key.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TrackIndexedDbForStorageKey {
            type Response = ();
            const METHOD: &'static str = "Storage.trackIndexedDBForStorageKey";
        }

        /// Unregisters origin from receiving notifications for cache storage.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UntrackCacheStorageForOrigin {
            /// Security origin.
            pub origin: String,
        }

        impl UntrackCacheStorageForOrigin {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for UntrackCacheStorageForOrigin {
            type Response = ();
            const METHOD: &'static str = "Storage.untrackCacheStorageForOrigin";
        }

        /// Unregisters storage key from receiving notifications for cache storage.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UntrackCacheStorageForStorageKey {
            /// Storage key.
            pub storage_key: String,
        }

        impl UntrackCacheStorageForStorageKey {
            pub fn new(storage_key: impl Into<String>) -> Self {
                Self {
                    storage_key: storage_key.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for UntrackCacheStorageForStorageKey {
            type Response = ();
            const METHOD: &'static str = "Storage.untrackCacheStorageForStorageKey";
        }

        /// Unregisters origin from receiving notifications for IndexedDB.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UntrackIndexedDbForOrigin {
            /// Security origin.
            pub origin: String,
        }

        impl UntrackIndexedDbForOrigin {
            pub fn new(origin: impl Into<String>) -> Self {
                Self {
                    origin: origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for UntrackIndexedDbForOrigin {
            type Response = ();
            const METHOD: &'static str = "Storage.untrackIndexedDBForOrigin";
        }

        /// Unregisters storage key from receiving notifications for IndexedDB.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct UntrackIndexedDbForStorageKey {
            /// Storage key.
            pub storage_key: String,
        }

        impl UntrackIndexedDbForStorageKey {
            pub fn new(storage_key: impl Into<String>) -> Self {
                Self {
                    storage_key: storage_key.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for UntrackIndexedDbForStorageKey {
            type Response = ();
            const METHOD: &'static str = "Storage.untrackIndexedDBForStorageKey";
        }

        /// Returns the number of stored Trust Tokens per issuer for the current browsing context.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTrustTokens {}

        impl GetTrustTokens {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetTrustTokensResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetTrustTokens {
            type Response = responses::GetTrustTokensResponse;
            const METHOD: &'static str = "Storage.getTrustTokens";
        }

        /// Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearTrustTokens {
            pub issuer_origin: String,
        }

        impl ClearTrustTokens {
            pub fn new(issuer_origin: impl Into<String>) -> Self {
                Self {
                    issuer_origin: issuer_origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::ClearTrustTokensResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearTrustTokens {
            type Response = responses::ClearTrustTokensResponse;
            const METHOD: &'static str = "Storage.clearTrustTokens";
        }

        /// Gets details for a named interest group.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInterestGroupDetails {
            pub owner_origin: String,
            pub name: String,
        }

        impl GetInterestGroupDetails {
            pub fn new(owner_origin: impl Into<String>, name: impl Into<String>) -> Self {
                Self {
                    owner_origin: owner_origin.into(),
                    name: name.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetInterestGroupDetailsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetInterestGroupDetails {
            type Response = responses::GetInterestGroupDetailsResponse;
            const METHOD: &'static str = "Storage.getInterestGroupDetails";
        }

        /// Enables/Disables issuing of interestGroupAccessed events.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInterestGroupTracking {
            pub enable: bool,
        }

        impl SetInterestGroupTracking {
            pub fn new(enable: bool) -> Self {
                Self { enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInterestGroupTracking {
            type Response = ();
            const METHOD: &'static str = "Storage.setInterestGroupTracking";
        }

        /// Enables/Disables issuing of interestGroupAuctionEventOccurred and interestGroupAuctionNetworkRequestCreated.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInterestGroupAuctionTracking {
            pub enable: bool,
        }

        impl SetInterestGroupAuctionTracking {
            pub fn new(enable: bool) -> Self {
                Self { enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInterestGroupAuctionTracking {
            type Response = ();
            const METHOD: &'static str = "Storage.setInterestGroupAuctionTracking";
        }

        /// Gets metadata for an origin's shared storage.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSharedStorageMetadata {
            pub owner_origin: String,
        }

        impl GetSharedStorageMetadata {
            pub fn new(owner_origin: impl Into<String>) -> Self {
                Self {
                    owner_origin: owner_origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSharedStorageMetadataResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSharedStorageMetadata {
            type Response = responses::GetSharedStorageMetadataResponse;
            const METHOD: &'static str = "Storage.getSharedStorageMetadata";
        }

        /// Gets the entries in an given origin's shared storage.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSharedStorageEntries {
            pub owner_origin: String,
        }

        impl GetSharedStorageEntries {
            pub fn new(owner_origin: impl Into<String>) -> Self {
                Self {
                    owner_origin: owner_origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSharedStorageEntriesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSharedStorageEntries {
            type Response = responses::GetSharedStorageEntriesResponse;
            const METHOD: &'static str = "Storage.getSharedStorageEntries";
        }

        /// Sets entry with `key` and `value` for a given origin's shared storage.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSharedStorageEntry {
            pub owner_origin: String,
            pub key: String,
            pub value: String,
            /// If `ignoreIfPresent` is included and true, then only sets the entry if `key` doesn't already exist.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ignore_if_present: Option<bool>,
        }

        impl SetSharedStorageEntry {
            pub fn new(
                owner_origin: impl Into<String>,
                key: impl Into<String>,
                value: impl Into<String>,
            ) -> Self {
                Self {
                    owner_origin: owner_origin.into(),
                    key: key.into(),
                    value: value.into(),
                    ignore_if_present: None,
                }
            }

            pub fn with_ignore_if_present(mut self, ignore_if_present: bool) -> Self {
                self.ignore_if_present = Some(ignore_if_present);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSharedStorageEntry {
            type Response = ();
            const METHOD: &'static str = "Storage.setSharedStorageEntry";
        }

        /// Deletes entry for `key` (if it exists) for a given origin's shared storage.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteSharedStorageEntry {
            pub owner_origin: String,
            pub key: String,
        }

        impl DeleteSharedStorageEntry {
            pub fn new(owner_origin: impl Into<String>, key: impl Into<String>) -> Self {
                Self {
                    owner_origin: owner_origin.into(),
                    key: key.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteSharedStorageEntry {
            type Response = ();
            const METHOD: &'static str = "Storage.deleteSharedStorageEntry";
        }

        /// Clears all entries for a given origin's shared storage.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearSharedStorageEntries {
            pub owner_origin: String,
        }

        impl ClearSharedStorageEntries {
            pub fn new(owner_origin: impl Into<String>) -> Self {
                Self {
                    owner_origin: owner_origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearSharedStorageEntries {
            type Response = ();
            const METHOD: &'static str = "Storage.clearSharedStorageEntries";
        }

        /// Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResetSharedStorageBudget {
            pub owner_origin: String,
        }

        impl ResetSharedStorageBudget {
            pub fn new(owner_origin: impl Into<String>) -> Self {
                Self {
                    owner_origin: owner_origin.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ResetSharedStorageBudget {
            type Response = ();
            const METHOD: &'static str = "Storage.resetSharedStorageBudget";
        }

        /// Enables/disables issuing of sharedStorageAccessed events.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSharedStorageTracking {
            pub enable: bool,
        }

        impl SetSharedStorageTracking {
            pub fn new(enable: bool) -> Self {
                Self { enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSharedStorageTracking {
            type Response = ();
            const METHOD: &'static str = "Storage.setSharedStorageTracking";
        }

        /// Set tracking for a storage key's buckets.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetStorageBucketTracking {
            pub storage_key: String,
            pub enable: bool,
        }

        impl SetStorageBucketTracking {
            pub fn new(storage_key: impl Into<String>, enable: bool) -> Self {
                Self {
                    storage_key: storage_key.into(),
                    enable,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetStorageBucketTracking {
            type Response = ();
            const METHOD: &'static str = "Storage.setStorageBucketTracking";
        }

        /// Deletes the Storage Bucket with the given storage key and bucket name.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeleteStorageBucket {
            pub bucket: types::StorageBucket,
        }

        impl DeleteStorageBucket {
            pub fn new(bucket: types::StorageBucket) -> Self {
                Self { bucket }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DeleteStorageBucket {
            type Response = ();
            const METHOD: &'static str = "Storage.deleteStorageBucket";
        }

        /// Deletes state for sites identified as potential bounce trackers, immediately.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RunBounceTrackingMitigations {}

        impl RunBounceTrackingMitigations {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RunBounceTrackingMitigationsResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for RunBounceTrackingMitigations {
            type Response = responses::RunBounceTrackingMitigationsResponse;
            const METHOD: &'static str = "Storage.runBounceTrackingMitigations";
        }

        /// https://wicg.github.io/attribution-reporting-api/
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAttributionReportingLocalTestingMode {
            /// If enabled, noise is suppressed and reports are sent immediately.
            pub enabled: bool,
        }

        impl SetAttributionReportingLocalTestingMode {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAttributionReportingLocalTestingMode {
            type Response = ();
            const METHOD: &'static str = "Storage.setAttributionReportingLocalTestingMode";
        }

        /// Enables/disables issuing of Attribution Reporting events.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAttributionReportingTracking {
            pub enable: bool,
        }

        impl SetAttributionReportingTracking {
            pub fn new(enable: bool) -> Self {
                Self { enable }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAttributionReportingTracking {
            type Response = ();
            const METHOD: &'static str = "Storage.setAttributionReportingTracking";
        }

        /// Sends all pending Attribution Reports immediately, regardless of their scheduled report time.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SendPendingAttributionReports {}

        impl SendPendingAttributionReports {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SendPendingAttributionReportsResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for SendPendingAttributionReports {
            type Response = responses::SendPendingAttributionReportsResponse;
            const METHOD: &'static str = "Storage.sendPendingAttributionReports";
        }

        /// Returns the effective Related Website Sets in use by this profile for the browser session. The effective Related Website Sets will not change during a browser session.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRelatedWebsiteSets {}

        impl GetRelatedWebsiteSets {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetRelatedWebsiteSetsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetRelatedWebsiteSets {
            type Response = responses::GetRelatedWebsiteSetsResponse;
            const METHOD: &'static str = "Storage.getRelatedWebsiteSets";
        }

        /// Returns the list of URLs from a page and its embedded resources that match existing grace period URL pattern rules. https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetAffectedUrlsForThirdPartyCookieMetadata {
            /// The URL of the page currently being visited.
            pub first_party_url: String,
            /// The list of embedded resource URLs from the page.
            pub third_party_urls: Vec<String>,
        }

        impl GetAffectedUrlsForThirdPartyCookieMetadata {
            pub fn new(first_party_url: impl Into<String>, third_party_urls: Vec<String>) -> Self {
                Self {
                    first_party_url: first_party_url.into(),
                    third_party_urls,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<
                responses::GetAffectedUrlsForThirdPartyCookieMetadataResponse,
                crate::CdpError,
            > {
                target.send_cmd(self).await
            }
        }

        impl Method for GetAffectedUrlsForThirdPartyCookieMetadata {
            type Response = responses::GetAffectedUrlsForThirdPartyCookieMetadataResponse;
            const METHOD: &'static str = "Storage.getAffectedUrlsForThirdPartyCookieMetadata";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetProtectedAudienceKAnonymity {
            pub owner: String,
            pub name: String,
            pub hashes: Vec<String>,
        }

        impl SetProtectedAudienceKAnonymity {
            pub fn new(
                owner: impl Into<String>,
                name: impl Into<String>,
                hashes: Vec<String>,
            ) -> Self {
                Self {
                    owner: owner.into(),
                    name: name.into(),
                    hashes,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetProtectedAudienceKAnonymity {
            type Response = ();
            const METHOD: &'static str = "Storage.setProtectedAudienceKAnonymity";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// A cache's contents have been modified.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CacheStorageContentUpdated {
            /// Origin to update.
            pub origin: String,
            /// Storage key to update.
            pub storage_key: String,
            /// Storage bucket to update.
            pub bucket_id: String,
            /// Name of cache in origin.
            pub cache_name: String,
        }

        impl CacheStorageContentUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.cacheStorageContentUpdated")
            }
        }

        /// A cache has been added/deleted.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CacheStorageListUpdated {
            /// Origin to update.
            pub origin: String,
            /// Storage key to update.
            pub storage_key: String,
            /// Storage bucket to update.
            pub bucket_id: String,
        }

        impl CacheStorageListUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.cacheStorageListUpdated")
            }
        }

        /// The origin's IndexedDB object store has been modified.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct IndexedDbContentUpdated {
            /// Origin to update.
            pub origin: String,
            /// Storage key to update.
            pub storage_key: String,
            /// Storage bucket to update.
            pub bucket_id: String,
            /// Database to update.
            pub database_name: String,
            /// ObjectStore to update.
            pub object_store_name: String,
        }

        impl IndexedDbContentUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.indexedDBContentUpdated")
            }
        }

        /// The origin's IndexedDB database list has been modified.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct IndexedDbListUpdated {
            /// Origin to update.
            pub origin: String,
            /// Storage key to update.
            pub storage_key: String,
            /// Storage bucket to update.
            pub bucket_id: String,
        }

        impl IndexedDbListUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.indexedDBListUpdated")
            }
        }

        /// One of the interest groups was accessed. Note that these events are global to all targets sharing an interest group store.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InterestGroupAccessed {
            pub access_time: network::types::TimeSinceEpoch,
            pub type_: types::InterestGroupAccessType,
            pub owner_origin: String,
            pub name: String,
            /// For topLevelBid/topLevelAdditionalBid, and when appropriate, win and additionalBidWin
            pub component_seller_origin: Option<String>,
            /// For bid or somethingBid event, if done locally and not on a server.
            pub bid: Option<f64>,
            pub bid_currency: Option<String>,
            /// For non-global events --- links to interestGroupAuctionEvent
            pub unique_auction_id: Option<types::InterestGroupAuctionId>,
        }

        impl InterestGroupAccessed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.interestGroupAccessed")
            }
        }

        /// An auction involving interest groups is taking place. These events are target-specific.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InterestGroupAuctionEventOccurred {
            pub event_time: network::types::TimeSinceEpoch,
            pub type_: types::InterestGroupAuctionEventType,
            pub unique_auction_id: types::InterestGroupAuctionId,
            /// Set for child auctions.
            pub parent_auction_id: Option<types::InterestGroupAuctionId>,
            /// Set for started and configResolved
            pub auction_config: Option<serde_json::Value>,
        }

        impl InterestGroupAuctionEventOccurred {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.interestGroupAuctionEventOccurred")
            }
        }

        /// Specifies which auctions a particular network fetch may be related to, and in what role. Note that it is not ordered with respect to Network.requestWillBeSent (but will happen before loadingFinished loadingFailed).
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InterestGroupAuctionNetworkRequestCreated {
            pub type_: types::InterestGroupAuctionFetchType,
            pub request_id: network::types::RequestId,
            /// This is the set of the auctions using the worklet that issued this request. In the case of trusted signals, it's possible that only some of them actually care about the keys being queried.
            pub auctions: Vec<types::InterestGroupAuctionId>,
        }

        impl InterestGroupAuctionNetworkRequestCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.interestGroupAuctionNetworkRequestCreated")
            }
        }

        /// Shared storage was accessed by the associated page. The following parameters are included in all events.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStorageAccessed {
            /// Time of the access.
            pub access_time: network::types::TimeSinceEpoch,
            /// Enum value indicating the access scope.
            pub scope: types::SharedStorageAccessScope,
            /// Enum value indicating the Shared Storage API method invoked.
            pub method: types::SharedStorageAccessMethod,
            /// DevTools Frame Token for the primary frame tree's root.
            pub main_frame_id: page::types::FrameId,
            /// Serialization of the origin owning the Shared Storage data.
            pub owner_origin: String,
            /// Serialization of the site owning the Shared Storage data.
            pub owner_site: String,
            /// The sub-parameters wrapped by `params` are all optional and their presence/absence depends on `type`.
            pub params: types::SharedStorageAccessParams,
        }

        impl SharedStorageAccessed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.sharedStorageAccessed")
            }
        }

        /// A shared storage run or selectURL operation finished its execution. The following parameters are included in all events.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SharedStorageWorkletOperationExecutionFinished {
            /// Time that the operation finished.
            pub finished_time: network::types::TimeSinceEpoch,
            /// Time, in microseconds, from start of shared storage JS API call until end of operation execution in the worklet.
            pub execution_time: i64,
            /// Enum value indicating the Shared Storage API method invoked.
            pub method: types::SharedStorageAccessMethod,
            /// ID of the operation call.
            pub operation_id: String,
            /// Hex representation of the DevTools token used as the TargetID for the associated shared storage worklet.
            pub worklet_target_id: target::types::TargetID,
            /// DevTools Frame Token for the primary frame tree's root.
            pub main_frame_id: page::types::FrameId,
            /// Serialization of the origin owning the Shared Storage data.
            pub owner_origin: String,
        }

        impl SharedStorageWorkletOperationExecutionFinished {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.sharedStorageWorkletOperationExecutionFinished")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StorageBucketCreatedOrUpdated {
            pub bucket_info: types::StorageBucketInfo,
        }

        impl StorageBucketCreatedOrUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.storageBucketCreatedOrUpdated")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StorageBucketDeleted {
            pub bucket_id: String,
        }

        impl StorageBucketDeleted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.storageBucketDeleted")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingSourceRegistered {
            pub registration: types::AttributionReportingSourceRegistration,
            pub result: types::AttributionReportingSourceRegistrationResult,
        }

        impl AttributionReportingSourceRegistered {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.attributionReportingSourceRegistered")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingTriggerRegistered {
            pub registration: types::AttributionReportingTriggerRegistration,
            pub event_level: types::AttributionReportingEventLevelResult,
            pub aggregatable: types::AttributionReportingAggregatableResult,
        }

        impl AttributionReportingTriggerRegistered {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.attributionReportingTriggerRegistered")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingReportSent {
            pub url: String,
            pub body: serde_json::Value,
            pub result: types::AttributionReportingReportResult,
            /// If result is `sent`, populated with net/HTTP status.
            pub net_error: Option<i64>,
            pub net_error_name: Option<String>,
            pub http_status_code: Option<i64>,
        }

        impl AttributionReportingReportSent {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.attributionReportingReportSent")
            }
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttributionReportingVerboseDebugReportSent {
            pub url: String,
            pub body: Option<Vec<serde_json::Value>>,
            pub net_error: Option<i64>,
            pub net_error_name: Option<String>,
            pub http_status_code: Option<i64>,
        }

        impl AttributionReportingVerboseDebugReportSent {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Storage.attributionReportingVerboseDebugReportSent")
            }
        }
    }
}

pub mod system_info {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Describes a single graphics processor (GPU).
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GPUDevice {
            /// PCI ID of the GPU vendor, if available; 0 otherwise.
            pub vendor_id: f64,
            /// PCI ID of the GPU device, if available; 0 otherwise.
            pub device_id: f64,
            /// Sub sys ID of the GPU, only available on Windows.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sub_sys_id: Option<f64>,
            /// Revision of the GPU, only available on Windows.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub revision: Option<f64>,
            /// String description of the GPU vendor, if the PCI ID is not available.
            pub vendor_string: String,
            /// String description of the GPU device, if the PCI ID is not available.
            pub device_string: String,
            /// String description of the GPU driver vendor.
            pub driver_vendor: String,
            /// String description of the GPU driver version.
            pub driver_version: String,
        }

        /// Describes the width and height dimensions of an entity.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Size {
            /// Width in pixels.
            pub width: i64,
            /// Height in pixels.
            pub height: i64,
        }

        /// Describes a supported video decoding profile with its associated minimum and maximum resolutions.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct VideoDecodeAcceleratorCapability {
            /// Video codec profile that is supported, e.g. VP9 Profile 2.
            pub profile: String,
            /// Maximum video dimensions in pixels supported for this |profile|.
            pub max_resolution: Size,
            /// Minimum video dimensions in pixels supported for this |profile|.
            pub min_resolution: Size,
        }

        /// Describes a supported video encoding profile with its associated maximum resolution and maximum framerate.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct VideoEncodeAcceleratorCapability {
            /// Video codec profile that is supported, e.g H264 Main.
            pub profile: String,
            /// Maximum video dimensions in pixels supported for this |profile|.
            pub max_resolution: Size,
            /// Maximum encoding framerate in frames per second supported for this |profile|, as fraction's numerator and denominator, e.g. 24/1 fps, 24000/1001 fps, etc.
            pub max_framerate_numerator: i64,
            pub max_framerate_denominator: i64,
        }

        /// YUV subsampling type of the pixels of a given image.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum SubsamplingFormat {
            #[serde(rename = "yuv420")]
            Yuv420,
            #[serde(rename = "yuv422")]
            Yuv422,
            #[serde(rename = "yuv444")]
            Yuv444,
        }
        impl AsRef<str> for SubsamplingFormat {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Yuv420 => "yuv420",
                    Self::Yuv422 => "yuv422",
                    Self::Yuv444 => "yuv444",
                }
            }
        }
        impl std::str::FromStr for SubsamplingFormat {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "yuv420" => Ok(Self::Yuv420),
                    "yuv422" => Ok(Self::Yuv422),
                    "yuv444" => Ok(Self::Yuv444),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for SubsamplingFormat {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Image format of a given image.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ImageType {
            #[serde(rename = "jpeg")]
            Jpeg,
            #[serde(rename = "webp")]
            Webp,
            #[serde(rename = "unknown")]
            Unknown,
        }
        impl AsRef<str> for ImageType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Jpeg => "jpeg",
                    Self::Webp => "webp",
                    Self::Unknown => "unknown",
                }
            }
        }
        impl std::str::FromStr for ImageType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "jpeg" => Ok(Self::Jpeg),
                    "webp" => Ok(Self::Webp),
                    "unknown" => Ok(Self::Unknown),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ImageType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Provides information about the GPU(s) on the system.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GPUInfo {
            /// The graphics devices on the system. Element 0 is the primary GPU.
            pub devices: Vec<GPUDevice>,
            /// An optional dictionary of additional GPU related attributes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub aux_attributes: Option<serde_json::Value>,
            /// An optional dictionary of graphics features and their status.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub feature_status: Option<serde_json::Value>,
            /// An optional array of GPU driver bug workarounds.
            pub driver_bug_workarounds: Vec<String>,
            /// Supported accelerated video decoding capabilities.
            pub video_decoding: Vec<VideoDecodeAcceleratorCapability>,
            /// Supported accelerated video encoding capabilities.
            pub video_encoding: Vec<VideoEncodeAcceleratorCapability>,
        }

        /// Represents process info.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ProcessInfo {
            /// Specifies process type.
            pub type_: String,
            /// Specifies process id.
            pub id: i64,
            /// Specifies cumulative CPU usage in seconds across all threads of the process since the process start.
            pub cpu_time: f64,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInfoResponse {
            /// Information about the GPUs on the system.
            pub gpu: types::GPUInfo,
            /// A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported.
            pub model_name: String,
            /// A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported.
            pub model_version: String,
            /// The command line string used to launch the browser. Will be the empty string if not supported.
            pub command_line: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFeatureStateResponse {
            pub feature_enabled: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetProcessInfoResponse {
            /// An array of process info blocks.
            pub process_info: Vec<types::ProcessInfo>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Returns information about the system.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetInfo {}

        impl GetInfo {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetInfoResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetInfo {
            type Response = responses::GetInfoResponse;
            const METHOD: &'static str = "SystemInfo.getInfo";
        }

        /// Returns information about the feature state.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetFeatureState {
            pub feature_state: String,
        }

        impl GetFeatureState {
            pub fn new(feature_state: impl Into<String>) -> Self {
                Self {
                    feature_state: feature_state.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetFeatureStateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetFeatureState {
            type Response = responses::GetFeatureStateResponse;
            const METHOD: &'static str = "SystemInfo.getFeatureState";
        }

        /// Returns information about all running processes.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetProcessInfo {}

        impl GetProcessInfo {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetProcessInfoResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetProcessInfo {
            type Response = responses::GetProcessInfoResponse;
            const METHOD: &'static str = "SystemInfo.getProcessInfo";
        }
    }
}

pub mod target {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        pub type TargetID = String;

        /// Unique identifier of attached debugging session.
        pub type SessionID = String;

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TargetInfo {
            pub target_id: TargetID,
            /// List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22
            pub type_: String,
            pub title: String,
            pub url: String,
            /// Whether the target has an attached client.
            pub attached: bool,
            /// Opener target Id
            #[serde(skip_serializing_if = "Option::is_none")]
            pub opener_id: Option<TargetID>,
            /// Whether the target has access to the originating window.
            /// **EXPERIMENTAL**
            pub can_access_opener: bool,
            /// Frame id of originating window (is only set if target has an opener).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub opener_frame_id: Option<page::types::FrameId>,
            /// Id of the parent frame, only present for the "iframe" targets.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_frame_id: Option<page::types::FrameId>,
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<browser::types::BrowserContextID>,
            /// Provides additional details for specific target types. For example, for the type of "page", this may be set to "prerender".
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub subtype: Option<String>,
        }

        /// A filter used by target query/discovery/auto-attach operations.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FilterEntry {
            /// If set, causes exclusion of matching targets from the list.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub exclude: Option<bool>,
            /// If not present, matches any type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub type_: Option<String>,
        }

        /// The entries in TargetFilter are matched sequentially against targets and the first entry that matches determines if the target is included or not, depending on the value of `exclude` field in the entry. If filter is not specified, the one assumed is [{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}] (i.e. include everything but `browser` and `tab`).
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type TargetFilter = Vec<FilterEntry>;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoteLocation {
            pub host: String,
            pub port: i64,
        }

        /// The state of the target window.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum WindowState {
            #[serde(rename = "normal")]
            Normal,
            #[serde(rename = "minimized")]
            Minimized,
            #[serde(rename = "maximized")]
            Maximized,
            #[serde(rename = "fullscreen")]
            Fullscreen,
        }
        impl AsRef<str> for WindowState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Normal => "normal",
                    Self::Minimized => "minimized",
                    Self::Maximized => "maximized",
                    Self::Fullscreen => "fullscreen",
                }
            }
        }
        impl std::str::FromStr for WindowState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "normal" => Ok(Self::Normal),
                    "minimized" => Ok(Self::Minimized),
                    "maximized" => Ok(Self::Maximized),
                    "fullscreen" => Ok(Self::Fullscreen),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for WindowState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttachToTargetResponse {
            /// Id assigned to the session.
            pub session_id: types::SessionID,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttachToBrowserTargetResponse {
            /// Id assigned to the session.
            pub session_id: types::SessionID,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CloseTargetResponse {
            /// Always set to true. If an error occurs, the response indicates protocol error.
            #[deprecated]
            pub success: bool,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateBrowserContextResponse {
            /// The id of the context created.
            pub browser_context_id: browser::types::BrowserContextID,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBrowserContextsResponse {
            /// An array of browser context ids.
            pub browser_context_ids: Vec<browser::types::BrowserContextID>,
            /// The id of the default browser context if available.
            /// **EXPERIMENTAL**
            pub default_browser_context_id: Option<browser::types::BrowserContextID>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateTargetResponse {
            /// The id of the page opened.
            pub target_id: types::TargetID,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTargetInfoResponse {
            pub target_info: types::TargetInfo,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTargetsResponse {
            /// The list of targets.
            pub target_infos: Vec<types::TargetInfo>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDevToolsTargetResponse {
            /// The targetId of DevTools page target if exists.
            pub target_id: Option<types::TargetID>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OpenDevToolsResponse {
            /// The targetId of DevTools page target.
            pub target_id: types::TargetID,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Activates (focuses) the target.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ActivateTarget {
            pub target_id: types::TargetID,
        }

        impl ActivateTarget {
            pub fn new(target_id: types::TargetID) -> Self {
                Self { target_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ActivateTarget {
            type Response = ();
            const METHOD: &'static str = "Target.activateTarget";
        }

        /// Attaches to the target with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttachToTarget {
            pub target_id: types::TargetID,
            /// Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub flatten: Option<bool>,
        }

        impl AttachToTarget {
            pub fn new(target_id: types::TargetID) -> Self {
                Self {
                    target_id,
                    flatten: Some(true),
                }
            }

            pub fn with_flatten(mut self, flatten: bool) -> Self {
                self.flatten = Some(flatten);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AttachToTargetResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AttachToTarget {
            type Response = responses::AttachToTargetResponse;
            const METHOD: &'static str = "Target.attachToTarget";
        }

        /// Attaches to the browser target, only uses flat sessionId mode.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttachToBrowserTarget {}

        impl AttachToBrowserTarget {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AttachToBrowserTargetResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AttachToBrowserTarget {
            type Response = responses::AttachToBrowserTargetResponse;
            const METHOD: &'static str = "Target.attachToBrowserTarget";
        }

        /// Closes the target. If the target is a page that gets closed too.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CloseTarget {
            pub target_id: types::TargetID,
        }

        impl CloseTarget {
            pub fn new(target_id: types::TargetID) -> Self {
                Self { target_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CloseTargetResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CloseTarget {
            type Response = responses::CloseTargetResponse;
            const METHOD: &'static str = "Target.closeTarget";
        }

        /// Inject object to the target's main frame that provides a communication channel with browser target. Injected object will be available as `window[bindingName]`. The object has the following API: - `binding.send(json)` - a method to send messages over the remote debugging protocol - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExposeDevToolsProtocol {
            pub target_id: types::TargetID,
            /// Binding name, 'cdp' if not specified.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub binding_name: Option<String>,
            /// If true, inherits the current root session's permissions (default: false).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub inherit_permissions: Option<bool>,
        }

        impl ExposeDevToolsProtocol {
            pub fn new(target_id: types::TargetID) -> Self {
                Self {
                    target_id,
                    binding_name: None,
                    inherit_permissions: None,
                }
            }

            pub fn with_binding_name(mut self, binding_name: impl Into<String>) -> Self {
                self.binding_name = Some(binding_name.into());
                self
            }

            pub fn with_inherit_permissions(mut self, inherit_permissions: bool) -> Self {
                self.inherit_permissions = Some(inherit_permissions);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ExposeDevToolsProtocol {
            type Response = ();
            const METHOD: &'static str = "Target.exposeDevToolsProtocol";
        }

        /// Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateBrowserContext {
            /// If specified, disposes this context when debugging session disconnects.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dispose_on_detach: Option<bool>,
            /// Proxy server, similar to the one passed to --proxy-server
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub proxy_server: Option<String>,
            /// Proxy bypass list, similar to the one passed to --proxy-bypass-list
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub proxy_bypass_list: Option<String>,
            /// An optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub origins_with_universal_network_access: Option<Vec<String>>,
        }

        impl CreateBrowserContext {
            pub fn new() -> Self {
                Self {
                    dispose_on_detach: None,
                    proxy_server: None,
                    proxy_bypass_list: None,
                    origins_with_universal_network_access: None,
                }
            }

            pub fn with_dispose_on_detach(mut self, dispose_on_detach: bool) -> Self {
                self.dispose_on_detach = Some(dispose_on_detach);
                self
            }

            pub fn with_proxy_server(mut self, proxy_server: impl Into<String>) -> Self {
                self.proxy_server = Some(proxy_server.into());
                self
            }

            pub fn with_proxy_bypass_list(mut self, proxy_bypass_list: impl Into<String>) -> Self {
                self.proxy_bypass_list = Some(proxy_bypass_list.into());
                self
            }

            pub fn with_origins_with_universal_network_access(
                mut self,
                origins_with_universal_network_access: Vec<String>,
            ) -> Self {
                self.origins_with_universal_network_access =
                    Some(origins_with_universal_network_access);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CreateBrowserContextResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CreateBrowserContext {
            type Response = responses::CreateBrowserContextResponse;
            const METHOD: &'static str = "Target.createBrowserContext";
        }

        /// Returns all browser contexts created with `Target.createBrowserContext` method.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBrowserContexts {}

        impl GetBrowserContexts {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetBrowserContextsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetBrowserContexts {
            type Response = responses::GetBrowserContextsResponse;
            const METHOD: &'static str = "Target.getBrowserContexts";
        }

        /// Creates a new page.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CreateTarget {
            /// The initial URL the page will be navigated to. An empty string indicates about:blank.
            pub url: String,
            /// Frame left origin in DIP (requires newWindow to be true or headless shell).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub left: Option<i64>,
            /// Frame top origin in DIP (requires newWindow to be true or headless shell).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub top: Option<i64>,
            /// Frame width in DIP (requires newWindow to be true or headless shell).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub width: Option<i64>,
            /// Frame height in DIP (requires newWindow to be true or headless shell).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub height: Option<i64>,
            /// Frame window state (requires newWindow to be true or headless shell). Default is normal.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub window_state: Option<types::WindowState>,
            /// The browser context to create the page in.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub browser_context_id: Option<browser::types::BrowserContextID>,
            /// Whether BeginFrames for this target will be controlled via DevTools (headless shell only, not supported on MacOS yet, false by default).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enable_begin_frame_control: Option<bool>,
            /// Whether to create a new Window or Tab (false by default, not supported by headless shell).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub new_window: Option<bool>,
            /// Whether to create the target in background or foreground (false by default, not supported by headless shell).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub background: Option<bool>,
            /// Whether to create the target of type "tab".
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub for_tab: Option<bool>,
            /// Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with `forTab: true`, `newWindow: true` or `background: false`. The life-time of the tab is limited to the life-time of the session.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub hidden: Option<bool>,
            /// If specified, the option is used to determine if the new target should be focused or not. By default, the focus behavior depends on the value of the background field. For example, background=false and focus=false will result in the target tab being opened but the browser window remain unchanged (if it was in the background, it will remain in the background) and background=false with focus=undefined will result in the window being focused. Using background: true and focus: true is not supported and will result in an error.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub focus: Option<bool>,
        }

        impl CreateTarget {
            pub fn new(url: impl Into<String>) -> Self {
                Self {
                    url: url.into(),
                    left: None,
                    top: None,
                    width: None,
                    height: None,
                    window_state: None,
                    browser_context_id: None,
                    enable_begin_frame_control: None,
                    new_window: None,
                    background: None,
                    for_tab: None,
                    hidden: None,
                    focus: None,
                }
            }

            pub fn with_left(mut self, left: i64) -> Self {
                self.left = Some(left);
                self
            }

            pub fn with_top(mut self, top: i64) -> Self {
                self.top = Some(top);
                self
            }

            pub fn with_width(mut self, width: i64) -> Self {
                self.width = Some(width);
                self
            }

            pub fn with_height(mut self, height: i64) -> Self {
                self.height = Some(height);
                self
            }

            pub fn with_window_state(mut self, window_state: types::WindowState) -> Self {
                self.window_state = Some(window_state);
                self
            }

            pub fn with_browser_context_id(
                mut self,
                browser_context_id: browser::types::BrowserContextID,
            ) -> Self {
                self.browser_context_id = Some(browser_context_id);
                self
            }

            pub fn with_enable_begin_frame_control(
                mut self,
                enable_begin_frame_control: bool,
            ) -> Self {
                self.enable_begin_frame_control = Some(enable_begin_frame_control);
                self
            }

            pub fn with_new_window(mut self, new_window: bool) -> Self {
                self.new_window = Some(new_window);
                self
            }

            pub fn with_background(mut self, background: bool) -> Self {
                self.background = Some(background);
                self
            }

            pub fn with_for_tab(mut self, for_tab: bool) -> Self {
                self.for_tab = Some(for_tab);
                self
            }

            pub fn with_hidden(mut self, hidden: bool) -> Self {
                self.hidden = Some(hidden);
                self
            }

            pub fn with_focus(mut self, focus: bool) -> Self {
                self.focus = Some(focus);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CreateTargetResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CreateTarget {
            type Response = responses::CreateTargetResponse;
            const METHOD: &'static str = "Target.createTarget";
        }

        /// Detaches session with given id.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DetachFromTarget {
            /// Session to detach.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub session_id: Option<types::SessionID>,
            /// Deprecated.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_id: Option<types::TargetID>,
        }

        impl DetachFromTarget {
            pub fn new() -> Self {
                Self {
                    session_id: None,
                    target_id: None,
                }
            }

            pub fn with_session_id(mut self, session_id: types::SessionID) -> Self {
                self.session_id = Some(session_id);
                self
            }

            pub fn with_target_id(mut self, target_id: types::TargetID) -> Self {
                self.target_id = Some(target_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DetachFromTarget {
            type Response = ();
            const METHOD: &'static str = "Target.detachFromTarget";
        }

        /// Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DisposeBrowserContext {
            pub browser_context_id: browser::types::BrowserContextID,
        }

        impl DisposeBrowserContext {
            pub fn new(browser_context_id: browser::types::BrowserContextID) -> Self {
                Self { browser_context_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DisposeBrowserContext {
            type Response = ();
            const METHOD: &'static str = "Target.disposeBrowserContext";
        }

        /// Returns information about a target.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTargetInfo {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_id: Option<types::TargetID>,
        }

        impl GetTargetInfo {
            pub fn new() -> Self {
                Self { target_id: None }
            }

            pub fn with_target_id(mut self, target_id: types::TargetID) -> Self {
                self.target_id = Some(target_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetTargetInfoResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetTargetInfo {
            type Response = responses::GetTargetInfoResponse;
            const METHOD: &'static str = "Target.getTargetInfo";
        }

        /// Retrieves a list of available targets.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTargets {
            /// Only targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub filter: Option<types::TargetFilter>,
        }

        impl GetTargets {
            pub fn new() -> Self {
                Self { filter: None }
            }

            pub fn with_filter(mut self, filter: types::TargetFilter) -> Self {
                self.filter = Some(filter);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetTargetsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetTargets {
            type Response = responses::GetTargetsResponse;
            const METHOD: &'static str = "Target.getTargets";
        }

        /// Sends protocol message over session with given id. Consider using flat mode instead; see commands attachToTarget, setAutoAttach, and crbug.com/991325.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SendMessageToTarget {
            pub message: String,
            /// Identifier of the session.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub session_id: Option<types::SessionID>,
            /// Deprecated.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_id: Option<types::TargetID>,
        }

        impl SendMessageToTarget {
            pub fn new(message: impl Into<String>) -> Self {
                Self {
                    message: message.into(),
                    session_id: None,
                    target_id: None,
                }
            }

            pub fn with_session_id(mut self, session_id: types::SessionID) -> Self {
                self.session_id = Some(session_id);
                self
            }

            pub fn with_target_id(mut self, target_id: types::TargetID) -> Self {
                self.target_id = Some(target_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SendMessageToTarget {
            type Response = ();
            const METHOD: &'static str = "Target.sendMessageToTarget";
        }

        /// Controls whether to automatically attach to new targets which are considered to be directly related to this one (for example, iframes or workers). When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets. You might want to call this recursively for auto-attached targets to attach to all available targets.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAutoAttach {
            /// Whether to auto-attach to related targets.
            pub auto_attach: bool,
            /// Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.
            pub wait_for_debugger_on_start: bool,
            /// Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub flatten: Option<bool>,
            /// Only targets matching filter will be attached.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub filter: Option<types::TargetFilter>,
        }

        impl SetAutoAttach {
            pub fn new(auto_attach: bool, wait_for_debugger_on_start: bool) -> Self {
                Self {
                    auto_attach,
                    wait_for_debugger_on_start,
                    flatten: Some(true),
                    filter: None,
                }
            }

            pub fn with_flatten(mut self, flatten: bool) -> Self {
                self.flatten = Some(flatten);
                self
            }

            pub fn with_filter(mut self, filter: types::TargetFilter) -> Self {
                self.filter = Some(filter);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAutoAttach {
            type Response = ();
            const METHOD: &'static str = "Target.setAutoAttach";
        }

        /// Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. The specified target is also auto-attached. This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AutoAttachRelated {
            pub target_id: types::TargetID,
            /// Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.
            pub wait_for_debugger_on_start: bool,
            /// Only targets matching filter will be attached.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub filter: Option<types::TargetFilter>,
        }

        impl AutoAttachRelated {
            pub fn new(target_id: types::TargetID, wait_for_debugger_on_start: bool) -> Self {
                Self {
                    target_id,
                    wait_for_debugger_on_start,
                    filter: None,
                }
            }

            pub fn with_filter(mut self, filter: types::TargetFilter) -> Self {
                self.filter = Some(filter);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AutoAttachRelated {
            type Response = ();
            const METHOD: &'static str = "Target.autoAttachRelated";
        }

        /// Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetDiscoverTargets {
            /// Whether to discover available targets.
            pub discover: bool,
            /// Only targets matching filter will be attached. If `discover` is false, `filter` must be omitted or empty.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub filter: Option<types::TargetFilter>,
        }

        impl SetDiscoverTargets {
            pub fn new(discover: bool) -> Self {
                Self {
                    discover,
                    filter: None,
                }
            }

            pub fn with_filter(mut self, filter: types::TargetFilter) -> Self {
                self.filter = Some(filter);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetDiscoverTargets {
            type Response = ();
            const METHOD: &'static str = "Target.setDiscoverTargets";
        }

        /// Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetRemoteLocations {
            /// List of remote locations.
            pub locations: Vec<types::RemoteLocation>,
        }

        impl SetRemoteLocations {
            pub fn new(locations: Vec<types::RemoteLocation>) -> Self {
                Self { locations }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetRemoteLocations {
            type Response = ();
            const METHOD: &'static str = "Target.setRemoteLocations";
        }

        /// Gets the targetId of the DevTools page target opened for the given target (if any).
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDevToolsTarget {
            /// Page or tab target ID.
            pub target_id: types::TargetID,
        }

        impl GetDevToolsTarget {
            pub fn new(target_id: types::TargetID) -> Self {
                Self { target_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDevToolsTargetResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDevToolsTarget {
            type Response = responses::GetDevToolsTargetResponse;
            const METHOD: &'static str = "Target.getDevToolsTarget";
        }

        /// Opens a DevTools window for the target.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct OpenDevTools {
            /// This can be the page or tab target ID.
            pub target_id: types::TargetID,
            /// The id of the panel we want DevTools to open initially. Currently supported panels are elements, console, network, sources, resources and performance.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub panel_id: Option<String>,
        }

        impl OpenDevTools {
            pub fn new(target_id: types::TargetID) -> Self {
                Self {
                    target_id,
                    panel_id: None,
                }
            }

            pub fn with_panel_id(mut self, panel_id: impl Into<String>) -> Self {
                self.panel_id = Some(panel_id.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::OpenDevToolsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for OpenDevTools {
            type Response = responses::OpenDevToolsResponse;
            const METHOD: &'static str = "Target.openDevTools";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Issued when attached to target because of auto-attach or `attachToTarget` command.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AttachedToTarget {
            /// Identifier assigned to the session used to send/receive messages.
            pub session_id: types::SessionID,
            pub target_info: types::TargetInfo,
            pub waiting_for_debugger: bool,
        }

        impl AttachedToTarget {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Target.attachedToTarget")
            }
        }

        /// Issued when detached from target for any reason (including `detachFromTarget` command). Can be issued multiple times per target if multiple sessions have been attached to it.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DetachedFromTarget {
            /// Detached session identifier.
            pub session_id: types::SessionID,
            /// Deprecated.
            #[deprecated]
            pub target_id: Option<types::TargetID>,
        }

        impl DetachedFromTarget {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Target.detachedFromTarget")
            }
        }

        /// Notifies about a new protocol message received from the session (as reported in `attachedToTarget` event).
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReceivedMessageFromTarget {
            /// Identifier of a session which sends a message.
            pub session_id: types::SessionID,
            pub message: String,
            /// Deprecated.
            #[deprecated]
            pub target_id: Option<types::TargetID>,
        }

        impl ReceivedMessageFromTarget {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Target.receivedMessageFromTarget")
            }
        }

        /// Issued when a possible inspection target is created.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TargetCreated {
            pub target_info: types::TargetInfo,
        }

        impl TargetCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Target.targetCreated")
            }
        }

        /// Issued when a target is destroyed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TargetDestroyed {
            pub target_id: types::TargetID,
        }

        impl TargetDestroyed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Target.targetDestroyed")
            }
        }

        /// Issued when a target has crashed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TargetCrashed {
            pub target_id: types::TargetID,
            /// Termination status type.
            pub status: String,
            /// Termination error code.
            pub error_code: i64,
        }

        impl TargetCrashed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Target.targetCrashed")
            }
        }

        /// Issued when some information about a target has changed. This only happens between `targetCreated` and `targetDestroyed`.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TargetInfoChanged {
            pub target_info: types::TargetInfo,
        }

        impl TargetInfoChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Target.targetInfoChanged")
            }
        }
    }
}

pub mod tethering {
    use super::*;

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;

        /// Request browser port binding.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Bind {
            /// Port number to bind.
            pub port: i64,
        }

        impl Bind {
            pub fn new(port: i64) -> Self {
                Self { port }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Bind {
            type Response = ();
            const METHOD: &'static str = "Tethering.bind";
        }

        /// Request browser port unbinding.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Unbind {
            /// Port number to unbind.
            pub port: i64,
        }

        impl Unbind {
            pub fn new(port: i64) -> Self {
                Self { port }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Unbind {
            type Response = ();
            const METHOD: &'static str = "Tethering.unbind";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;

        /// Informs that port was successfully bound and got a specified connection id.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Accepted {
            /// Port number that was successfully bound.
            pub port: i64,
            /// Connection id to be used.
            pub connection_id: String,
        }

        impl Accepted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Tethering.accepted")
            }
        }
    }
}

pub mod tracing {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Configuration for memory dump. Used only when "memory-infra" category is enabled.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type MemoryDumpConfig = serde_json::Value;

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TraceConfig {
            /// Controls how the trace buffer stores data. The default is `recordUntilFull`.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub record_mode: Option<String>,
            /// Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value of 200 MB would be used.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub trace_buffer_size_in_kb: Option<f64>,
            /// Turns on JavaScript stack sampling.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enable_sampling: Option<bool>,
            /// Turns on system tracing.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enable_systrace: Option<bool>,
            /// Turns on argument filter.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub enable_argument_filter: Option<bool>,
            /// Included category filters.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub included_categories: Option<Vec<String>>,
            /// Excluded category filters.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub excluded_categories: Option<Vec<String>>,
            /// Configuration to synthesize the delays in tracing.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub synthetic_delays: Option<Vec<String>>,
            /// Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub memory_dump_config: Option<MemoryDumpConfig>,
        }

        /// Data format of a trace. Can be either the legacy JSON format or the protocol buffer format. Note that the JSON format will be deprecated soon.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum StreamFormat {
            #[serde(rename = "json")]
            Json,
            #[serde(rename = "proto")]
            Proto,
        }
        impl AsRef<str> for StreamFormat {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Json => "json",
                    Self::Proto => "proto",
                }
            }
        }
        impl std::str::FromStr for StreamFormat {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "json" => Ok(Self::Json),
                    "proto" => Ok(Self::Proto),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for StreamFormat {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Compression type to use for traces returned via streams.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum StreamCompression {
            #[serde(rename = "none")]
            None,
            #[serde(rename = "gzip")]
            Gzip,
        }
        impl AsRef<str> for StreamCompression {
            fn as_ref(&self) -> &str {
                match self {
                    Self::None => "none",
                    Self::Gzip => "gzip",
                }
            }
        }
        impl std::str::FromStr for StreamCompression {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "none" => Ok(Self::None),
                    "gzip" => Ok(Self::Gzip),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for StreamCompression {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Details exposed when memory request explicitly declared. Keep consistent with memory_dump_request_args.h and memory_instrumentation.mojom
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum MemoryDumpLevelOfDetail {
            #[serde(rename = "background")]
            Background,
            #[serde(rename = "light")]
            Light,
            #[serde(rename = "detailed")]
            Detailed,
        }
        impl AsRef<str> for MemoryDumpLevelOfDetail {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Background => "background",
                    Self::Light => "light",
                    Self::Detailed => "detailed",
                }
            }
        }
        impl std::str::FromStr for MemoryDumpLevelOfDetail {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "background" => Ok(Self::Background),
                    "light" => Ok(Self::Light),
                    "detailed" => Ok(Self::Detailed),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for MemoryDumpLevelOfDetail {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Backend type to use for tracing. `chrome` uses the Chrome-integrated tracing service and is supported on all platforms. `system` is only supported on Chrome OS and uses the Perfetto system tracing service. `auto` chooses `system` when the perfettoConfig provided to Tracing.start specifies at least one non-Chrome data source; otherwise uses `chrome`.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum TracingBackend {
            #[serde(rename = "auto")]
            Auto,
            #[serde(rename = "chrome")]
            Chrome,
            #[serde(rename = "system")]
            System,
        }
        impl AsRef<str> for TracingBackend {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Auto => "auto",
                    Self::Chrome => "chrome",
                    Self::System => "system",
                }
            }
        }
        impl std::str::FromStr for TracingBackend {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "auto" => Ok(Self::Auto),
                    "chrome" => Ok(Self::Chrome),
                    "system" => Ok(Self::System),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for TracingBackend {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCategoriesResponse {
            /// A list of supported tracing categories.
            pub categories: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTrackEventDescriptorResponse {
            /// Base64-encoded serialized perfetto.protos.TrackEventDescriptor protobuf message. (Encoded as a base64 string when passed over JSON)
            pub descriptor: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestMemoryDumpResponse {
            /// GUID of the resulting global memory dump.
            pub dump_guid: String,
            /// True iff the global memory dump succeeded.
            pub success: bool,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Stop trace events collection.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct End {}

        impl End {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for End {
            type Response = ();
            const METHOD: &'static str = "Tracing.end";
        }

        /// Gets supported tracing categories.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCategories {}

        impl GetCategories {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetCategoriesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetCategories {
            type Response = responses::GetCategoriesResponse;
            const METHOD: &'static str = "Tracing.getCategories";
        }

        /// Return a descriptor for all available tracing categories.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetTrackEventDescriptor {}

        impl GetTrackEventDescriptor {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetTrackEventDescriptorResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetTrackEventDescriptor {
            type Response = responses::GetTrackEventDescriptorResponse;
            const METHOD: &'static str = "Tracing.getTrackEventDescriptor";
        }

        /// Record a clock sync marker in the trace.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RecordClockSyncMarker {
            /// The ID of this clock sync marker
            pub sync_id: String,
        }

        impl RecordClockSyncMarker {
            pub fn new(sync_id: impl Into<String>) -> Self {
                Self {
                    sync_id: sync_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RecordClockSyncMarker {
            type Response = ();
            const METHOD: &'static str = "Tracing.recordClockSyncMarker";
        }

        /// Request a global memory dump.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RequestMemoryDump {
            /// Enables more deterministic results by forcing garbage collection
            #[serde(skip_serializing_if = "Option::is_none")]
            pub deterministic: Option<bool>,
            /// Specifies level of details in memory dump. Defaults to "detailed".
            #[serde(skip_serializing_if = "Option::is_none")]
            pub level_of_detail: Option<types::MemoryDumpLevelOfDetail>,
        }

        impl RequestMemoryDump {
            pub fn new() -> Self {
                Self {
                    deterministic: None,
                    level_of_detail: None,
                }
            }

            pub fn with_deterministic(mut self, deterministic: bool) -> Self {
                self.deterministic = Some(deterministic);
                self
            }

            pub fn with_level_of_detail(
                mut self,
                level_of_detail: types::MemoryDumpLevelOfDetail,
            ) -> Self {
                self.level_of_detail = Some(level_of_detail);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RequestMemoryDumpResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RequestMemoryDump {
            type Response = responses::RequestMemoryDumpResponse;
            const METHOD: &'static str = "Tracing.requestMemoryDump";
        }

        /// Start trace events collection.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Start {
            /// Category/tag filter
            /// **EXPERIMENTAL**
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub categories: Option<String>,
            /// Tracing options
            /// **EXPERIMENTAL**
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub options: Option<String>,
            /// If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub buffer_usage_reporting_interval: Option<f64>,
            /// Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to `ReportEvents`).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub transfer_mode: Option<String>,
            /// Trace data format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `json`).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stream_format: Option<types::StreamFormat>,
            /// Compression format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `none`)
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stream_compression: Option<types::StreamCompression>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub trace_config: Option<types::TraceConfig>,
            /// Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters `categories`, `options`, `traceConfig` are ignored. (Encoded as a base64 string when passed over JSON)
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub perfetto_config: Option<String>,
            /// Backend type (defaults to `auto`)
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub tracing_backend: Option<types::TracingBackend>,
        }

        impl Start {
            pub fn new() -> Self {
                Self {
                    categories: None,
                    options: None,
                    buffer_usage_reporting_interval: None,
                    transfer_mode: None,
                    stream_format: None,
                    stream_compression: None,
                    trace_config: None,
                    perfetto_config: None,
                    tracing_backend: None,
                }
            }

            pub fn with_categories(mut self, categories: impl Into<String>) -> Self {
                self.categories = Some(categories.into());
                self
            }

            pub fn with_options(mut self, options: impl Into<String>) -> Self {
                self.options = Some(options.into());
                self
            }

            pub fn with_buffer_usage_reporting_interval(
                mut self,
                buffer_usage_reporting_interval: f64,
            ) -> Self {
                self.buffer_usage_reporting_interval = Some(buffer_usage_reporting_interval);
                self
            }

            pub fn with_transfer_mode(mut self, transfer_mode: impl Into<String>) -> Self {
                self.transfer_mode = Some(transfer_mode.into());
                self
            }

            pub fn with_stream_format(mut self, stream_format: types::StreamFormat) -> Self {
                self.stream_format = Some(stream_format);
                self
            }

            pub fn with_stream_compression(
                mut self,
                stream_compression: types::StreamCompression,
            ) -> Self {
                self.stream_compression = Some(stream_compression);
                self
            }

            pub fn with_trace_config(mut self, trace_config: types::TraceConfig) -> Self {
                self.trace_config = Some(trace_config);
                self
            }

            pub fn with_perfetto_config(mut self, perfetto_config: impl Into<String>) -> Self {
                self.perfetto_config = Some(perfetto_config.into());
                self
            }

            pub fn with_tracing_backend(mut self, tracing_backend: types::TracingBackend) -> Self {
                self.tracing_backend = Some(tracing_backend);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Start {
            type Response = ();
            const METHOD: &'static str = "Tracing.start";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BufferUsage {
            /// A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
            pub percent_full: Option<f64>,
            /// An approximate number of events in the trace log.
            pub event_count: Option<f64>,
            /// A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
            pub value: Option<f64>,
        }

        impl BufferUsage {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Tracing.bufferUsage")
            }
        }

        /// Contains a bucket of collected trace events. When tracing is stopped collected events will be sent as a sequence of dataCollected events followed by tracingComplete event.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DataCollected {
            pub value: Vec<serde_json::Value>,
        }

        impl DataCollected {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Tracing.dataCollected")
            }
        }

        /// Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TracingComplete {
            /// Indicates whether some trace data is known to have been lost, e.g. because the trace ring buffer wrapped around.
            pub data_loss_occurred: bool,
            /// A handle of the stream that holds resulting trace data.
            pub stream: Option<io::types::StreamHandle>,
            /// Trace data format of returned stream.
            pub trace_format: Option<types::StreamFormat>,
            /// Compression format of returned stream.
            pub stream_compression: Option<types::StreamCompression>,
        }

        impl TracingComplete {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Tracing.tracingComplete")
            }
        }
    }
}

pub mod web_audio {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API
        pub type GraphObjectId = String;

        /// Enum of BaseAudioContext types
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ContextType {
            #[serde(rename = "realtime")]
            Realtime,
            #[serde(rename = "offline")]
            Offline,
        }
        impl AsRef<str> for ContextType {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Realtime => "realtime",
                    Self::Offline => "offline",
                }
            }
        }
        impl std::str::FromStr for ContextType {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "realtime" => Ok(Self::Realtime),
                    "offline" => Ok(Self::Offline),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ContextType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of AudioContextState from the spec
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ContextState {
            #[serde(rename = "suspended")]
            Suspended,
            #[serde(rename = "running")]
            Running,
            #[serde(rename = "closed")]
            Closed,
            #[serde(rename = "interrupted")]
            Interrupted,
        }
        impl AsRef<str> for ContextState {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Suspended => "suspended",
                    Self::Running => "running",
                    Self::Closed => "closed",
                    Self::Interrupted => "interrupted",
                }
            }
        }
        impl std::str::FromStr for ContextState {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "suspended" => Ok(Self::Suspended),
                    "running" => Ok(Self::Running),
                    "closed" => Ok(Self::Closed),
                    "interrupted" => Ok(Self::Interrupted),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ContextState {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of AudioNode types
        pub type NodeType = String;

        /// Enum of AudioNode::ChannelCountMode from the spec
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ChannelCountMode {
            #[serde(rename = "clamped-max")]
            ClampedMax,
            #[serde(rename = "explicit")]
            Explicit,
            #[serde(rename = "max")]
            Max,
        }
        impl AsRef<str> for ChannelCountMode {
            fn as_ref(&self) -> &str {
                match self {
                    Self::ClampedMax => "clamped-max",
                    Self::Explicit => "explicit",
                    Self::Max => "max",
                }
            }
        }
        impl std::str::FromStr for ChannelCountMode {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "clamped-max" => Ok(Self::ClampedMax),
                    "explicit" => Ok(Self::Explicit),
                    "max" => Ok(Self::Max),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ChannelCountMode {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of AudioNode::ChannelInterpretation from the spec
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ChannelInterpretation {
            #[serde(rename = "discrete")]
            Discrete,
            #[serde(rename = "speakers")]
            Speakers,
        }
        impl AsRef<str> for ChannelInterpretation {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Discrete => "discrete",
                    Self::Speakers => "speakers",
                }
            }
        }
        impl std::str::FromStr for ChannelInterpretation {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "discrete" => Ok(Self::Discrete),
                    "speakers" => Ok(Self::Speakers),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ChannelInterpretation {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Enum of AudioParam types
        pub type ParamType = String;

        /// Enum of AudioParam::AutomationRate from the spec
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AutomationRate {
            #[serde(rename = "a-rate")]
            ARate,
            #[serde(rename = "k-rate")]
            KRate,
        }
        impl AsRef<str> for AutomationRate {
            fn as_ref(&self) -> &str {
                match self {
                    Self::ARate => "a-rate",
                    Self::KRate => "k-rate",
                }
            }
        }
        impl std::str::FromStr for AutomationRate {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "a-rate" => Ok(Self::ARate),
                    "k-rate" => Ok(Self::KRate),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AutomationRate {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Fields in AudioContext that change in real-time.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContextRealtimeData {
            /// The current context time in second in BaseAudioContext.
            pub current_time: f64,
            /// The time spent on rendering graph divided by render quantum duration, and multiplied by 100. 100 means the audio renderer reached the full capacity and glitch may occur.
            pub render_capacity: f64,
            /// A running mean of callback interval.
            pub callback_interval_mean: f64,
            /// A running variance of callback interval.
            pub callback_interval_variance: f64,
        }

        /// Protocol object for BaseAudioContext
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BaseAudioContext {
            pub context_id: GraphObjectId,
            pub context_type: ContextType,
            pub context_state: ContextState,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub realtime_data: Option<ContextRealtimeData>,
            /// Platform-dependent callback buffer size.
            pub callback_buffer_size: f64,
            /// Number of output channels supported by audio hardware in use.
            pub max_output_channel_count: f64,
            /// Context sample rate.
            pub sample_rate: f64,
        }

        /// Protocol object for AudioListener
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioListener {
            pub listener_id: GraphObjectId,
            pub context_id: GraphObjectId,
        }

        /// Protocol object for AudioNode
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioNode {
            pub node_id: GraphObjectId,
            pub context_id: GraphObjectId,
            pub node_type: NodeType,
            pub number_of_inputs: f64,
            pub number_of_outputs: f64,
            pub channel_count: f64,
            pub channel_count_mode: ChannelCountMode,
            pub channel_interpretation: ChannelInterpretation,
        }

        /// Protocol object for AudioParam
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioParam {
            pub param_id: GraphObjectId,
            pub node_id: GraphObjectId,
            pub context_id: GraphObjectId,
            pub param_type: ParamType,
            pub rate: AutomationRate,
            pub default_value: f64,
            pub min_value: f64,
            pub max_value: f64,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRealtimeDataResponse {
            pub realtime_data: types::ContextRealtimeData,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Enables the WebAudio domain and starts sending context lifetime events.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "WebAudio.enable";
        }

        /// Disables the WebAudio domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "WebAudio.disable";
        }

        /// Fetch the realtime data from the registered contexts.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetRealtimeData {
            pub context_id: types::GraphObjectId,
        }

        impl GetRealtimeData {
            pub fn new(context_id: types::GraphObjectId) -> Self {
                Self { context_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetRealtimeDataResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetRealtimeData {
            type Response = responses::GetRealtimeDataResponse;
            const METHOD: &'static str = "WebAudio.getRealtimeData";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Notifies that a new BaseAudioContext has been created.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContextCreated {
            pub context: types::BaseAudioContext,
        }

        impl ContextCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.contextCreated")
            }
        }

        /// Notifies that an existing BaseAudioContext will be destroyed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContextWillBeDestroyed {
            pub context_id: types::GraphObjectId,
        }

        impl ContextWillBeDestroyed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.contextWillBeDestroyed")
            }
        }

        /// Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContextChanged {
            pub context: types::BaseAudioContext,
        }

        impl ContextChanged {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.contextChanged")
            }
        }

        /// Notifies that the construction of an AudioListener has finished.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioListenerCreated {
            pub listener: types::AudioListener,
        }

        impl AudioListenerCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.audioListenerCreated")
            }
        }

        /// Notifies that a new AudioListener has been created.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioListenerWillBeDestroyed {
            pub context_id: types::GraphObjectId,
            pub listener_id: types::GraphObjectId,
        }

        impl AudioListenerWillBeDestroyed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.audioListenerWillBeDestroyed")
            }
        }

        /// Notifies that a new AudioNode has been created.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioNodeCreated {
            pub node: types::AudioNode,
        }

        impl AudioNodeCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.audioNodeCreated")
            }
        }

        /// Notifies that an existing AudioNode has been destroyed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioNodeWillBeDestroyed {
            pub context_id: types::GraphObjectId,
            pub node_id: types::GraphObjectId,
        }

        impl AudioNodeWillBeDestroyed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.audioNodeWillBeDestroyed")
            }
        }

        /// Notifies that a new AudioParam has been created.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioParamCreated {
            pub param: types::AudioParam,
        }

        impl AudioParamCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.audioParamCreated")
            }
        }

        /// Notifies that an existing AudioParam has been destroyed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AudioParamWillBeDestroyed {
            pub context_id: types::GraphObjectId,
            pub node_id: types::GraphObjectId,
            pub param_id: types::GraphObjectId,
        }

        impl AudioParamWillBeDestroyed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.audioParamWillBeDestroyed")
            }
        }

        /// Notifies that two AudioNodes are connected.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NodesConnected {
            pub context_id: types::GraphObjectId,
            pub source_id: types::GraphObjectId,
            pub destination_id: types::GraphObjectId,
            pub source_output_index: Option<f64>,
            pub destination_input_index: Option<f64>,
        }

        impl NodesConnected {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.nodesConnected")
            }
        }

        /// Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NodesDisconnected {
            pub context_id: types::GraphObjectId,
            pub source_id: types::GraphObjectId,
            pub destination_id: types::GraphObjectId,
            pub source_output_index: Option<f64>,
            pub destination_input_index: Option<f64>,
        }

        impl NodesDisconnected {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.nodesDisconnected")
            }
        }

        /// Notifies that an AudioNode is connected to an AudioParam.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NodeParamConnected {
            pub context_id: types::GraphObjectId,
            pub source_id: types::GraphObjectId,
            pub destination_id: types::GraphObjectId,
            pub source_output_index: Option<f64>,
        }

        impl NodeParamConnected {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.nodeParamConnected")
            }
        }

        /// Notifies that an AudioNode is disconnected to an AudioParam.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NodeParamDisconnected {
            pub context_id: types::GraphObjectId,
            pub source_id: types::GraphObjectId,
            pub destination_id: types::GraphObjectId,
            pub source_output_index: Option<f64>,
        }

        impl NodeParamDisconnected {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAudio.nodeParamDisconnected")
            }
        }
    }
}

pub mod web_authn {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        pub type AuthenticatorId = String;

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AuthenticatorProtocol {
            #[serde(rename = "u2f")]
            U2f,
            #[serde(rename = "ctap2")]
            Ctap2,
        }
        impl AsRef<str> for AuthenticatorProtocol {
            fn as_ref(&self) -> &str {
                match self {
                    Self::U2f => "u2f",
                    Self::Ctap2 => "ctap2",
                }
            }
        }
        impl std::str::FromStr for AuthenticatorProtocol {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "u2f" => Ok(Self::U2f),
                    "ctap2" => Ok(Self::Ctap2),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AuthenticatorProtocol {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum Ctap2Version {
            #[serde(rename = "ctap2_0")]
            Ctap20,
            #[serde(rename = "ctap2_1")]
            Ctap21,
        }
        impl AsRef<str> for Ctap2Version {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Ctap20 => "ctap2_0",
                    Self::Ctap21 => "ctap2_1",
                }
            }
        }
        impl std::str::FromStr for Ctap2Version {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "ctap2_0" => Ok(Self::Ctap20),
                    "ctap2_1" => Ok(Self::Ctap21),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for Ctap2Version {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum AuthenticatorTransport {
            #[serde(rename = "usb")]
            Usb,
            #[serde(rename = "nfc")]
            Nfc,
            #[serde(rename = "ble")]
            Ble,
            #[serde(rename = "cable")]
            Cable,
            #[serde(rename = "internal")]
            Internal,
        }
        impl AsRef<str> for AuthenticatorTransport {
            fn as_ref(&self) -> &str {
                match self {
                    Self::Usb => "usb",
                    Self::Nfc => "nfc",
                    Self::Ble => "ble",
                    Self::Cable => "cable",
                    Self::Internal => "internal",
                }
            }
        }
        impl std::str::FromStr for AuthenticatorTransport {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "usb" => Ok(Self::Usb),
                    "nfc" => Ok(Self::Nfc),
                    "ble" => Ok(Self::Ble),
                    "cable" => Ok(Self::Cable),
                    "internal" => Ok(Self::Internal),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for AuthenticatorTransport {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct VirtualAuthenticatorOptions {
            pub protocol: AuthenticatorProtocol,
            /// Defaults to ctap2_0. Ignored if |protocol| == u2f.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub ctap2_version: Option<Ctap2Version>,
            pub transport: AuthenticatorTransport,
            /// Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub has_resident_key: Option<bool>,
            /// Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub has_user_verification: Option<bool>,
            /// If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub has_large_blob: Option<bool>,
            /// If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub has_cred_blob: Option<bool>,
            /// If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub has_min_pin_length: Option<bool>,
            /// If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub has_prf: Option<bool>,
            /// If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub automatic_presence_simulation: Option<bool>,
            /// Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_user_verified: Option<bool>,
            /// Credentials created by this authenticator will have the backup eligibility (BE) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup
            #[serde(skip_serializing_if = "Option::is_none")]
            pub default_backup_eligibility: Option<bool>,
            /// Credentials created by this authenticator will have the backup state (BS) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup
            #[serde(skip_serializing_if = "Option::is_none")]
            pub default_backup_state: Option<bool>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Credential {
            pub credential_id: String,
            pub is_resident_credential: bool,
            /// Relying Party ID the credential is scoped to. Must be set when adding a credential.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub rp_id: Option<String>,
            /// The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON)
            pub private_key: String,
            /// An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user. (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_handle: Option<String>,
            /// Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter
            pub sign_count: i64,
            /// The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON)
            #[serde(skip_serializing_if = "Option::is_none")]
            pub large_blob: Option<String>,
            /// Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backup_eligibility: Option<bool>,
            /// Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backup_state: Option<bool>,
            /// The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_name: Option<String>,
            /// The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_display_name: Option<String>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddVirtualAuthenticatorResponse {
            pub authenticator_id: types::AuthenticatorId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCredentialResponse {
            pub credential: types::Credential,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCredentialsResponse {
            pub credentials: Vec<types::Credential>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "enableUI")]
            pub enable_ui: Option<bool>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self { enable_ui: None }
            }

            pub fn with_enable_ui(mut self, enable_ui: bool) -> Self {
                self.enable_ui = Some(enable_ui);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.enable";
        }

        /// Disable the WebAuthn domain.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.disable";
        }

        /// Creates and adds a virtual authenticator.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddVirtualAuthenticator {
            pub options: types::VirtualAuthenticatorOptions,
        }

        impl AddVirtualAuthenticator {
            pub fn new(options: types::VirtualAuthenticatorOptions) -> Self {
                Self { options }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AddVirtualAuthenticatorResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddVirtualAuthenticator {
            type Response = responses::AddVirtualAuthenticatorResponse;
            const METHOD: &'static str = "WebAuthn.addVirtualAuthenticator";
        }

        /// Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetResponseOverrideBits {
            pub authenticator_id: types::AuthenticatorId,
            /// If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_bogus_signature: Option<bool>,
            /// If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "isBadUV")]
            pub is_bad_uv: Option<bool>,
            /// If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "isBadUP")]
            pub is_bad_up: Option<bool>,
        }

        impl SetResponseOverrideBits {
            pub fn new(authenticator_id: types::AuthenticatorId) -> Self {
                Self {
                    authenticator_id,
                    is_bogus_signature: None,
                    is_bad_uv: None,
                    is_bad_up: None,
                }
            }

            pub fn with_is_bogus_signature(mut self, is_bogus_signature: bool) -> Self {
                self.is_bogus_signature = Some(is_bogus_signature);
                self
            }

            pub fn with_is_bad_uv(mut self, is_bad_uv: bool) -> Self {
                self.is_bad_uv = Some(is_bad_uv);
                self
            }

            pub fn with_is_bad_up(mut self, is_bad_up: bool) -> Self {
                self.is_bad_up = Some(is_bad_up);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetResponseOverrideBits {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.setResponseOverrideBits";
        }

        /// Removes the given authenticator.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveVirtualAuthenticator {
            pub authenticator_id: types::AuthenticatorId,
        }

        impl RemoveVirtualAuthenticator {
            pub fn new(authenticator_id: types::AuthenticatorId) -> Self {
                Self { authenticator_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveVirtualAuthenticator {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.removeVirtualAuthenticator";
        }

        /// Adds the credential to the specified authenticator.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddCredential {
            pub authenticator_id: types::AuthenticatorId,
            pub credential: types::Credential,
        }

        impl AddCredential {
            pub fn new(
                authenticator_id: types::AuthenticatorId,
                credential: types::Credential,
            ) -> Self {
                Self {
                    authenticator_id,
                    credential,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddCredential {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.addCredential";
        }

        /// Returns a single credential stored in the given virtual authenticator that matches the credential ID.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCredential {
            pub authenticator_id: types::AuthenticatorId,
            pub credential_id: String,
        }

        impl GetCredential {
            pub fn new(
                authenticator_id: types::AuthenticatorId,
                credential_id: impl Into<String>,
            ) -> Self {
                Self {
                    authenticator_id,
                    credential_id: credential_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetCredentialResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetCredential {
            type Response = responses::GetCredentialResponse;
            const METHOD: &'static str = "WebAuthn.getCredential";
        }

        /// Returns all the credentials stored in the given virtual authenticator.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetCredentials {
            pub authenticator_id: types::AuthenticatorId,
        }

        impl GetCredentials {
            pub fn new(authenticator_id: types::AuthenticatorId) -> Self {
                Self { authenticator_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetCredentialsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetCredentials {
            type Response = responses::GetCredentialsResponse;
            const METHOD: &'static str = "WebAuthn.getCredentials";
        }

        /// Removes a credential from the authenticator.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveCredential {
            pub authenticator_id: types::AuthenticatorId,
            pub credential_id: String,
        }

        impl RemoveCredential {
            pub fn new(
                authenticator_id: types::AuthenticatorId,
                credential_id: impl Into<String>,
            ) -> Self {
                Self {
                    authenticator_id,
                    credential_id: credential_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveCredential {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.removeCredential";
        }

        /// Clears all the credentials from the specified device.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearCredentials {
            pub authenticator_id: types::AuthenticatorId,
        }

        impl ClearCredentials {
            pub fn new(authenticator_id: types::AuthenticatorId) -> Self {
                Self { authenticator_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearCredentials {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.clearCredentials";
        }

        /// Sets whether User Verification succeeds or fails for an authenticator. The default is true.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetUserVerified {
            pub authenticator_id: types::AuthenticatorId,
            pub is_user_verified: bool,
        }

        impl SetUserVerified {
            pub fn new(authenticator_id: types::AuthenticatorId, is_user_verified: bool) -> Self {
                Self {
                    authenticator_id,
                    is_user_verified,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetUserVerified {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.setUserVerified";
        }

        /// Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAutomaticPresenceSimulation {
            pub authenticator_id: types::AuthenticatorId,
            pub enabled: bool,
        }

        impl SetAutomaticPresenceSimulation {
            pub fn new(authenticator_id: types::AuthenticatorId, enabled: bool) -> Self {
                Self {
                    authenticator_id,
                    enabled,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAutomaticPresenceSimulation {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.setAutomaticPresenceSimulation";
        }

        /// Allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCredentialProperties {
            pub authenticator_id: types::AuthenticatorId,
            pub credential_id: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backup_eligibility: Option<bool>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub backup_state: Option<bool>,
        }

        impl SetCredentialProperties {
            pub fn new(
                authenticator_id: types::AuthenticatorId,
                credential_id: impl Into<String>,
            ) -> Self {
                Self {
                    authenticator_id,
                    credential_id: credential_id.into(),
                    backup_eligibility: None,
                    backup_state: None,
                }
            }

            pub fn with_backup_eligibility(mut self, backup_eligibility: bool) -> Self {
                self.backup_eligibility = Some(backup_eligibility);
                self
            }

            pub fn with_backup_state(mut self, backup_state: bool) -> Self {
                self.backup_state = Some(backup_state);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCredentialProperties {
            type Response = ();
            const METHOD: &'static str = "WebAuthn.setCredentialProperties";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Triggered when a credential is added to an authenticator.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CredentialAdded {
            pub authenticator_id: types::AuthenticatorId,
            pub credential: types::Credential,
        }

        impl CredentialAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAuthn.credentialAdded")
            }
        }

        /// Triggered when a credential is deleted, e.g. through PublicKeyCredential.signalUnknownCredential().
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CredentialDeleted {
            pub authenticator_id: types::AuthenticatorId,
            pub credential_id: String,
        }

        impl CredentialDeleted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAuthn.credentialDeleted")
            }
        }

        /// Triggered when a credential is updated, e.g. through PublicKeyCredential.signalCurrentUserDetails().
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CredentialUpdated {
            pub authenticator_id: types::AuthenticatorId,
            pub credential: types::Credential,
        }

        impl CredentialUpdated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAuthn.credentialUpdated")
            }
        }

        /// Triggered when a credential is used in a webauthn assertion.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CredentialAsserted {
            pub authenticator_id: types::AuthenticatorId,
            pub credential: types::Credential,
        }

        impl CredentialAsserted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("WebAuthn.credentialAsserted")
            }
        }
    }
}

pub mod console {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Console message.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ConsoleMessage {
            /// Message source.
            pub source: String,
            /// Message severity.
            pub level: String,
            /// Message text.
            pub text: String,
            /// URL of the message origin.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// Line number in the resource that generated this message (1-based).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub line: Option<i64>,
            /// Column number in the resource that generated this message (1-based).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column: Option<i64>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::types;

        /// Does nothing.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ClearMessages {}

        impl ClearMessages {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ClearMessages {
            type Response = ();
            const METHOD: &'static str = "Console.clearMessages";
        }

        /// Disables console domain, prevents further console messages from being reported to the client.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Console.disable";
        }

        /// Enables console domain, sends the messages collected so far to the client by means of the `messageAdded` notification.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Console.enable";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Issued when new console message is added.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct MessageAdded {
            /// Console message that has been added.
            pub message: types::ConsoleMessage,
        }

        impl MessageAdded {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Console.messageAdded")
            }
        }
    }
}

pub mod debugger {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Breakpoint identifier.
        pub type BreakpointId = String;

        /// Call frame identifier.
        pub type CallFrameId = String;

        /// Location in the source code.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Location {
            /// Script identifier as reported in the `Debugger.scriptParsed`.
            pub script_id: runtime::types::ScriptId,
            /// Line number in the script (0-based).
            pub line_number: i64,
            /// Column number in the script (0-based).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_number: Option<i64>,
        }

        /// Location in the source code.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScriptPosition {
            pub line_number: i64,
            pub column_number: i64,
        }

        /// Location range within one script.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LocationRange {
            pub script_id: runtime::types::ScriptId,
            pub start: ScriptPosition,
            pub end: ScriptPosition,
        }

        /// JavaScript call frame. Array of call frames form the call stack.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CallFrame {
            /// Call frame identifier. This identifier is only valid while the virtual machine is paused.
            pub call_frame_id: CallFrameId,
            /// Name of the JavaScript function called on this call frame.
            pub function_name: String,
            /// Location in the source code.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub function_location: Option<Location>,
            /// Location in the source code.
            pub location: Location,
            /// JavaScript script name or url. Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously sent `Debugger.scriptParsed` event.
            #[deprecated]
            pub url: String,
            /// Scope chain for this call frame.
            pub scope_chain: Vec<Scope>,
            /// `this` object for this call frame.
            pub this: runtime::types::RemoteObject,
            /// The value being returned, if the function is at return point.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub return_value: Option<runtime::types::RemoteObject>,
            /// Valid only while the VM is paused and indicates whether this frame can be restarted or not. Note that a `true` value here does not guarantee that Debugger#restartFrame with this CallFrameId will be successful, but it is very likely.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub can_be_restarted: Option<bool>,
        }

        /// Scope description.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Scope {
            /// Scope type.
            pub type_: String,
            /// Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
            pub object: runtime::types::RemoteObject,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub name: Option<String>,
            /// Location in the source code where scope starts
            #[serde(skip_serializing_if = "Option::is_none")]
            pub start_location: Option<Location>,
            /// Location in the source code where scope ends
            #[serde(skip_serializing_if = "Option::is_none")]
            pub end_location: Option<Location>,
        }

        /// Search match for resource.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SearchMatch {
            /// Line number in resource content.
            pub line_number: f64,
            /// Line with match content.
            pub line_content: String,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BreakLocation {
            /// Script identifier as reported in the `Debugger.scriptParsed`.
            pub script_id: runtime::types::ScriptId,
            /// Line number in the script (0-based).
            pub line_number: i64,
            /// Column number in the script (0-based).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_number: Option<i64>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub type_: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct WasmDisassemblyChunk {
            /// The next chunk of disassembled lines.
            pub lines: Vec<String>,
            /// The bytecode offsets describing the start of each line.
            pub bytecode_offsets: Vec<i64>,
        }

        /// Enum of possible script languages.
        #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
        pub enum ScriptLanguage {
            #[serde(rename = "JavaScript")]
            JavaScript,
            #[serde(rename = "WebAssembly")]
            WebAssembly,
        }
        impl AsRef<str> for ScriptLanguage {
            fn as_ref(&self) -> &str {
                match self {
                    Self::JavaScript => "JavaScript",
                    Self::WebAssembly => "WebAssembly",
                }
            }
        }
        impl std::str::FromStr for ScriptLanguage {
            type Err = String;
            fn from_str(s: &str) -> Result<Self, Self::Err> {
                match s {
                    "JavaScript" => Ok(Self::JavaScript),
                    "WebAssembly" => Ok(Self::WebAssembly),
                    _ => Err(s.to_string()),
                }
            }
        }
        impl std::fmt::Display for ScriptLanguage {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str(self.as_ref())
            }
        }

        /// Debug symbols available for a wasm script.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DebugSymbols {
            /// Type of the debug symbols.
            pub type_: String,
            /// URL of the external symbol source.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "externalURL")]
            pub external_url: Option<String>,
        }

        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResolvedBreakpoint {
            /// Breakpoint unique identifier.
            pub breakpoint_id: BreakpointId,
            /// Actual breakpoint location.
            pub location: Location,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EnableResponse {
            /// Unique identifier of the debugger.
            /// **EXPERIMENTAL**
            pub debugger_id: Option<runtime::types::UniqueDebuggerId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EvaluateOnCallFrameResponse {
            /// Object wrapper for the evaluation result.
            pub result: runtime::types::RemoteObject,
            /// Exception details.
            pub exception_details: Option<runtime::types::ExceptionDetails>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPossibleBreakpointsResponse {
            /// List of the possible breakpoint locations.
            pub locations: Vec<types::BreakLocation>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetScriptSourceResponse {
            /// Script source (empty in case of Wasm bytecode).
            pub script_source: String,
            /// Wasm bytecode. (Encoded as a base64 string when passed over JSON)
            pub bytecode: Option<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DisassembleWasmModuleResponse {
            /// For large modules, return a stream from which additional chunks of disassembly can be read successively.
            pub stream_id: Option<String>,
            /// The total number of lines in the disassembly text.
            pub total_number_of_lines: i64,
            /// The offsets of all function bodies, in the format [start1, end1, start2, end2, ...] where all ends are exclusive.
            pub function_body_offsets: Vec<i64>,
            /// The first chunk of disassembly.
            pub chunk: types::WasmDisassemblyChunk,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NextWasmDisassemblyChunkResponse {
            /// The next chunk of disassembly.
            pub chunk: types::WasmDisassemblyChunk,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetWasmBytecodeResponse {
            /// Script source. (Encoded as a base64 string when passed over JSON)
            pub bytecode: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStackTraceResponse {
            pub stack_trace: runtime::types::StackTrace,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RestartFrameResponse {
            /// New stack trace.
            #[deprecated]
            pub call_frames: Vec<types::CallFrame>,
            /// Async stack trace, if any.
            #[deprecated]
            pub async_stack_trace: Option<runtime::types::StackTrace>,
            /// Async stack trace, if any.
            #[deprecated]
            pub async_stack_trace_id: Option<runtime::types::StackTraceId>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SearchInContentResponse {
            /// List of search matches.
            pub result: Vec<types::SearchMatch>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakpointResponse {
            /// Id of the created breakpoint for further reference.
            pub breakpoint_id: types::BreakpointId,
            /// Location this breakpoint resolved into.
            pub actual_location: types::Location,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInstrumentationBreakpointResponse {
            /// Id of the created breakpoint for further reference.
            pub breakpoint_id: types::BreakpointId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakpointByUrlResponse {
            /// Id of the created breakpoint for further reference.
            pub breakpoint_id: types::BreakpointId,
            /// List of the locations this breakpoint resolved into upon addition.
            pub locations: Vec<types::Location>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakpointOnFunctionCallResponse {
            /// Id of the created breakpoint for further reference.
            pub breakpoint_id: types::BreakpointId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetScriptSourceResponse {
            /// New stack trace in case editing has happened while VM was stopped.
            #[deprecated]
            pub call_frames: Option<Vec<types::CallFrame>>,
            /// Whether current call stack was modified after applying the changes.
            #[deprecated]
            pub stack_changed: Option<bool>,
            /// Async stack trace, if any.
            #[deprecated]
            pub async_stack_trace: Option<runtime::types::StackTrace>,
            /// Async stack trace, if any.
            #[deprecated]
            pub async_stack_trace_id: Option<runtime::types::StackTraceId>,
            /// Whether the operation was successful or not. Only `Ok` denotes a successful live edit while the other enum variants denote why the live edit failed.
            /// **EXPERIMENTAL**
            pub status: Option<String>,
            /// Exception details if any. Only present when `status` is `CompileError`.
            pub exception_details: Option<runtime::types::ExceptionDetails>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Continues execution until specific location is reached.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ContinueToLocation {
            /// Location to continue to.
            pub location: types::Location,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub target_call_frames: Option<String>,
        }

        impl ContinueToLocation {
            pub fn new(location: types::Location) -> Self {
                Self {
                    location,
                    target_call_frames: None,
                }
            }

            pub fn with_target_call_frames(
                mut self,
                target_call_frames: impl Into<String>,
            ) -> Self {
                self.target_call_frames = Some(target_call_frames.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ContinueToLocation {
            type Response = ();
            const METHOD: &'static str = "Debugger.continueToLocation";
        }

        /// Disables debugger for given page.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Debugger.disable";
        }

        /// Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {
            /// The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_scripts_cache_size: Option<f64>,
        }

        impl Enable {
            pub fn new() -> Self {
                Self {
                    max_scripts_cache_size: None,
                }
            }

            pub fn with_max_scripts_cache_size(mut self, max_scripts_cache_size: f64) -> Self {
                self.max_scripts_cache_size = Some(max_scripts_cache_size);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::EnableResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = responses::EnableResponse;
            const METHOD: &'static str = "Debugger.enable";
        }

        /// Evaluates expression on a given call frame.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EvaluateOnCallFrame {
            /// Call frame identifier to evaluate on.
            pub call_frame_id: types::CallFrameId,
            /// Expression to evaluate.
            pub expression: String,
            /// String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_group: Option<String>,
            /// Specifies whether command line API should be available to the evaluated expression, defaults to false.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeCommandLineAPI")]
            pub include_command_line_api: Option<bool>,
            /// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub silent: Option<bool>,
            /// Whether the result is expected to be a JSON object that should be sent by value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub return_by_value: Option<bool>,
            /// Whether preview should be generated for the result.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generate_preview: Option<bool>,
            /// Whether to throw an exception if side effect cannot be ruled out during evaluation.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub throw_on_side_effect: Option<bool>,
            /// Terminate execution after timing out (number of milliseconds).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timeout: Option<runtime::types::TimeDelta>,
        }

        impl EvaluateOnCallFrame {
            pub fn new(call_frame_id: types::CallFrameId, expression: impl Into<String>) -> Self {
                Self {
                    call_frame_id,
                    expression: expression.into(),
                    object_group: None,
                    include_command_line_api: None,
                    silent: None,
                    return_by_value: None,
                    generate_preview: None,
                    throw_on_side_effect: None,
                    timeout: None,
                }
            }

            pub fn with_object_group(mut self, object_group: impl Into<String>) -> Self {
                self.object_group = Some(object_group.into());
                self
            }

            pub fn with_include_command_line_api(mut self, include_command_line_api: bool) -> Self {
                self.include_command_line_api = Some(include_command_line_api);
                self
            }

            pub fn with_silent(mut self, silent: bool) -> Self {
                self.silent = Some(silent);
                self
            }

            pub fn with_return_by_value(mut self, return_by_value: bool) -> Self {
                self.return_by_value = Some(return_by_value);
                self
            }

            pub fn with_generate_preview(mut self, generate_preview: bool) -> Self {
                self.generate_preview = Some(generate_preview);
                self
            }

            pub fn with_throw_on_side_effect(mut self, throw_on_side_effect: bool) -> Self {
                self.throw_on_side_effect = Some(throw_on_side_effect);
                self
            }

            pub fn with_timeout(mut self, timeout: runtime::types::TimeDelta) -> Self {
                self.timeout = Some(timeout);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::EvaluateOnCallFrameResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for EvaluateOnCallFrame {
            type Response = responses::EvaluateOnCallFrameResponse;
            const METHOD: &'static str = "Debugger.evaluateOnCallFrame";
        }

        /// Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPossibleBreakpoints {
            /// Start of range to search possible breakpoint locations in.
            pub start: types::Location,
            /// End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub end: Option<types::Location>,
            /// Only consider locations which are in the same (non-nested) function as start.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub restrict_to_function: Option<bool>,
        }

        impl GetPossibleBreakpoints {
            pub fn new(start: types::Location) -> Self {
                Self {
                    start,
                    end: None,
                    restrict_to_function: None,
                }
            }

            pub fn with_end(mut self, end: types::Location) -> Self {
                self.end = Some(end);
                self
            }

            pub fn with_restrict_to_function(mut self, restrict_to_function: bool) -> Self {
                self.restrict_to_function = Some(restrict_to_function);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetPossibleBreakpointsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetPossibleBreakpoints {
            type Response = responses::GetPossibleBreakpointsResponse;
            const METHOD: &'static str = "Debugger.getPossibleBreakpoints";
        }

        /// Returns source for the script with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetScriptSource {
            /// Id of the script to get source for.
            pub script_id: runtime::types::ScriptId,
        }

        impl GetScriptSource {
            pub fn new(script_id: runtime::types::ScriptId) -> Self {
                Self { script_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetScriptSourceResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetScriptSource {
            type Response = responses::GetScriptSourceResponse;
            const METHOD: &'static str = "Debugger.getScriptSource";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DisassembleWasmModule {
            /// Id of the script to disassemble
            pub script_id: runtime::types::ScriptId,
        }

        impl DisassembleWasmModule {
            pub fn new(script_id: runtime::types::ScriptId) -> Self {
                Self { script_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::DisassembleWasmModuleResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DisassembleWasmModule {
            type Response = responses::DisassembleWasmModuleResponse;
            const METHOD: &'static str = "Debugger.disassembleWasmModule";
        }

        /// Disassemble the next chunk of lines for the module corresponding to the stream. If disassembly is complete, this API will invalidate the streamId and return an empty chunk. Any subsequent calls for the now invalid stream will return errors.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct NextWasmDisassemblyChunk {
            pub stream_id: String,
        }

        impl NextWasmDisassemblyChunk {
            pub fn new(stream_id: impl Into<String>) -> Self {
                Self {
                    stream_id: stream_id.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::NextWasmDisassemblyChunkResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for NextWasmDisassemblyChunk {
            type Response = responses::NextWasmDisassemblyChunkResponse;
            const METHOD: &'static str = "Debugger.nextWasmDisassemblyChunk";
        }

        /// This command is deprecated. Use getScriptSource instead.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetWasmBytecode {
            /// Id of the Wasm script to get source for.
            pub script_id: runtime::types::ScriptId,
        }

        impl GetWasmBytecode {
            pub fn new(script_id: runtime::types::ScriptId) -> Self {
                Self { script_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetWasmBytecodeResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetWasmBytecode {
            type Response = responses::GetWasmBytecodeResponse;
            const METHOD: &'static str = "Debugger.getWasmBytecode";
        }

        /// Returns stack trace with given `stackTraceId`.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetStackTrace {
            pub stack_trace_id: runtime::types::StackTraceId,
        }

        impl GetStackTrace {
            pub fn new(stack_trace_id: runtime::types::StackTraceId) -> Self {
                Self { stack_trace_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetStackTraceResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetStackTrace {
            type Response = responses::GetStackTraceResponse;
            const METHOD: &'static str = "Debugger.getStackTrace";
        }

        /// Stops on the next JavaScript statement.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Pause {}

        impl Pause {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Pause {
            type Response = ();
            const METHOD: &'static str = "Debugger.pause";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[deprecated]
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PauseOnAsyncCall {
            /// Debugger will pause when async call with given stack trace is started.
            pub parent_stack_trace_id: runtime::types::StackTraceId,
        }

        impl PauseOnAsyncCall {
            pub fn new(parent_stack_trace_id: runtime::types::StackTraceId) -> Self {
                Self {
                    parent_stack_trace_id,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for PauseOnAsyncCall {
            type Response = ();
            const METHOD: &'static str = "Debugger.pauseOnAsyncCall";
        }

        /// Removes JavaScript breakpoint.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveBreakpoint {
            pub breakpoint_id: types::BreakpointId,
        }

        impl RemoveBreakpoint {
            pub fn new(breakpoint_id: types::BreakpointId) -> Self {
                Self { breakpoint_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveBreakpoint {
            type Response = ();
            const METHOD: &'static str = "Debugger.removeBreakpoint";
        }

        /// Restarts particular call frame from the beginning. The old, deprecated behavior of `restartFrame` is to stay paused and allow further CDP commands after a restart was scheduled. This can cause problems with restarting, so we now continue execution immediatly after it has been scheduled until we reach the beginning of the restarted frame. To stay back-wards compatible, `restartFrame` now expects a `mode` parameter to be present. If the `mode` parameter is missing, `restartFrame` errors out. The various return values are deprecated and `callFrames` is always empty. Use the call frames from the `Debugger#paused` events instead, that fires once V8 pauses at the beginning of the restarted function.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RestartFrame {
            /// Call frame identifier to evaluate on.
            pub call_frame_id: types::CallFrameId,
            /// The `mode` parameter must be present and set to 'StepInto', otherwise `restartFrame` will error out.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub mode: Option<String>,
        }

        impl RestartFrame {
            pub fn new(call_frame_id: types::CallFrameId) -> Self {
                Self {
                    call_frame_id,
                    mode: None,
                }
            }

            pub fn with_mode(mut self, mode: impl Into<String>) -> Self {
                self.mode = Some(mode.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RestartFrameResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RestartFrame {
            type Response = responses::RestartFrameResponse;
            const METHOD: &'static str = "Debugger.restartFrame";
        }

        /// Resumes JavaScript execution.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Resume {
            /// Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub terminate_on_resume: Option<bool>,
        }

        impl Resume {
            pub fn new() -> Self {
                Self {
                    terminate_on_resume: None,
                }
            }

            pub fn with_terminate_on_resume(mut self, terminate_on_resume: bool) -> Self {
                self.terminate_on_resume = Some(terminate_on_resume);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Resume {
            type Response = ();
            const METHOD: &'static str = "Debugger.resume";
        }

        /// Searches for given string in script content.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SearchInContent {
            /// Id of the script to search in.
            pub script_id: runtime::types::ScriptId,
            /// String to search for.
            pub query: String,
            /// If true, search is case sensitive.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub case_sensitive: Option<bool>,
            /// If true, treats string parameter as regex.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_regex: Option<bool>,
        }

        impl SearchInContent {
            pub fn new(script_id: runtime::types::ScriptId, query: impl Into<String>) -> Self {
                Self {
                    script_id,
                    query: query.into(),
                    case_sensitive: None,
                    is_regex: None,
                }
            }

            pub fn with_case_sensitive(mut self, case_sensitive: bool) -> Self {
                self.case_sensitive = Some(case_sensitive);
                self
            }

            pub fn with_is_regex(mut self, is_regex: bool) -> Self {
                self.is_regex = Some(is_regex);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SearchInContentResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SearchInContent {
            type Response = responses::SearchInContentResponse;
            const METHOD: &'static str = "Debugger.searchInContent";
        }

        /// Enables or disables async call stacks tracking.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAsyncCallStackDepth {
            /// Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).
            pub max_depth: i64,
        }

        impl SetAsyncCallStackDepth {
            pub fn new(max_depth: i64) -> Self {
                Self { max_depth }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAsyncCallStackDepth {
            type Response = ();
            const METHOD: &'static str = "Debugger.setAsyncCallStackDepth";
        }

        /// Replace previous blackbox execution contexts with passed ones. Forces backend to skip stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBlackboxExecutionContexts {
            /// Array of execution context unique ids for the debugger to ignore.
            pub unique_ids: Vec<String>,
        }

        impl SetBlackboxExecutionContexts {
            pub fn new(unique_ids: Vec<String>) -> Self {
                Self { unique_ids }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBlackboxExecutionContexts {
            type Response = ();
            const METHOD: &'static str = "Debugger.setBlackboxExecutionContexts";
        }

        /// Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBlackboxPatterns {
            /// Array of regexps that will be used to check script url for blackbox state.
            pub patterns: Vec<String>,
            /// If true, also ignore scripts with no source url.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub skip_anonymous: Option<bool>,
        }

        impl SetBlackboxPatterns {
            pub fn new(patterns: Vec<String>) -> Self {
                Self {
                    patterns,
                    skip_anonymous: None,
                }
            }

            pub fn with_skip_anonymous(mut self, skip_anonymous: bool) -> Self {
                self.skip_anonymous = Some(skip_anonymous);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBlackboxPatterns {
            type Response = ();
            const METHOD: &'static str = "Debugger.setBlackboxPatterns";
        }

        /// Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBlackboxedRanges {
            /// Id of the script.
            pub script_id: runtime::types::ScriptId,
            pub positions: Vec<types::ScriptPosition>,
        }

        impl SetBlackboxedRanges {
            pub fn new(
                script_id: runtime::types::ScriptId,
                positions: Vec<types::ScriptPosition>,
            ) -> Self {
                Self {
                    script_id,
                    positions,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBlackboxedRanges {
            type Response = ();
            const METHOD: &'static str = "Debugger.setBlackboxedRanges";
        }

        /// Sets JavaScript breakpoint at a given location.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakpoint {
            /// Location to set breakpoint in.
            pub location: types::Location,
            /// Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub condition: Option<String>,
        }

        impl SetBreakpoint {
            pub fn new(location: types::Location) -> Self {
                Self {
                    location,
                    condition: None,
                }
            }

            pub fn with_condition(mut self, condition: impl Into<String>) -> Self {
                self.condition = Some(condition.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetBreakpointResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBreakpoint {
            type Response = responses::SetBreakpointResponse;
            const METHOD: &'static str = "Debugger.setBreakpoint";
        }

        /// Sets instrumentation breakpoint.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetInstrumentationBreakpoint {
            /// Instrumentation name.
            pub instrumentation: String,
        }

        impl SetInstrumentationBreakpoint {
            pub fn new(instrumentation: impl Into<String>) -> Self {
                Self {
                    instrumentation: instrumentation.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetInstrumentationBreakpointResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for SetInstrumentationBreakpoint {
            type Response = responses::SetInstrumentationBreakpointResponse;
            const METHOD: &'static str = "Debugger.setInstrumentationBreakpoint";
        }

        /// Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in `locations` property. Further matching script parsing will result in subsequent `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakpointByUrl {
            /// Line number to set breakpoint at.
            pub line_number: i64,
            /// URL of the resources to set breakpoint on.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or `urlRegex` must be specified.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url_regex: Option<String>,
            /// Script hash of the resources to set breakpoint on.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub script_hash: Option<String>,
            /// Offset in the line to set breakpoint at.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub column_number: Option<i64>,
            /// Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub condition: Option<String>,
        }

        impl SetBreakpointByUrl {
            pub fn new(line_number: i64) -> Self {
                Self {
                    line_number,
                    url: None,
                    url_regex: None,
                    script_hash: None,
                    column_number: None,
                    condition: None,
                }
            }

            pub fn with_url(mut self, url: impl Into<String>) -> Self {
                self.url = Some(url.into());
                self
            }

            pub fn with_url_regex(mut self, url_regex: impl Into<String>) -> Self {
                self.url_regex = Some(url_regex.into());
                self
            }

            pub fn with_script_hash(mut self, script_hash: impl Into<String>) -> Self {
                self.script_hash = Some(script_hash.into());
                self
            }

            pub fn with_column_number(mut self, column_number: i64) -> Self {
                self.column_number = Some(column_number);
                self
            }

            pub fn with_condition(mut self, condition: impl Into<String>) -> Self {
                self.condition = Some(condition.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetBreakpointByUrlResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBreakpointByUrl {
            type Response = responses::SetBreakpointByUrlResponse;
            const METHOD: &'static str = "Debugger.setBreakpointByUrl";
        }

        /// Sets JavaScript breakpoint before each call to the given function. If another function was created from the same source as a given one, calling it will also trigger the breakpoint.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakpointOnFunctionCall {
            /// Function object id.
            pub object_id: runtime::types::RemoteObjectId,
            /// Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub condition: Option<String>,
        }

        impl SetBreakpointOnFunctionCall {
            pub fn new(object_id: runtime::types::RemoteObjectId) -> Self {
                Self {
                    object_id,
                    condition: None,
                }
            }

            pub fn with_condition(mut self, condition: impl Into<String>) -> Self {
                self.condition = Some(condition.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetBreakpointOnFunctionCallResponse, crate::CdpError>
            {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBreakpointOnFunctionCall {
            type Response = responses::SetBreakpointOnFunctionCallResponse;
            const METHOD: &'static str = "Debugger.setBreakpointOnFunctionCall";
        }

        /// Activates / deactivates all breakpoints on the page.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetBreakpointsActive {
            /// New value for breakpoints active state.
            pub active: bool,
        }

        impl SetBreakpointsActive {
            pub fn new(active: bool) -> Self {
                Self { active }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetBreakpointsActive {
            type Response = ();
            const METHOD: &'static str = "Debugger.setBreakpointsActive";
        }

        /// Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetPauseOnExceptions {
            /// Pause on exceptions mode.
            pub state: String,
        }

        impl SetPauseOnExceptions {
            pub fn new(state: impl Into<String>) -> Self {
                Self {
                    state: state.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetPauseOnExceptions {
            type Response = ();
            const METHOD: &'static str = "Debugger.setPauseOnExceptions";
        }

        /// Changes return value in top frame. Available only at return break position.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetReturnValue {
            /// New return value.
            pub new_value: runtime::types::CallArgument,
        }

        impl SetReturnValue {
            pub fn new(new_value: runtime::types::CallArgument) -> Self {
                Self { new_value }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetReturnValue {
            type Response = ();
            const METHOD: &'static str = "Debugger.setReturnValue";
        }

        /// Edits JavaScript source live. In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a `Debugger.restartFrame` for the top-most function is automatically triggered.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetScriptSource {
            /// Id of the script to edit.
            pub script_id: runtime::types::ScriptId,
            /// New content of the script.
            pub script_source: String,
            /// If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub dry_run: Option<bool>,
            /// If true, then `scriptSource` is allowed to change the function on top of the stack as long as the top-most stack frame is the only activation of that function.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub allow_top_frame_editing: Option<bool>,
        }

        impl SetScriptSource {
            pub fn new(
                script_id: runtime::types::ScriptId,
                script_source: impl Into<String>,
            ) -> Self {
                Self {
                    script_id,
                    script_source: script_source.into(),
                    dry_run: None,
                    allow_top_frame_editing: None,
                }
            }

            pub fn with_dry_run(mut self, dry_run: bool) -> Self {
                self.dry_run = Some(dry_run);
                self
            }

            pub fn with_allow_top_frame_editing(mut self, allow_top_frame_editing: bool) -> Self {
                self.allow_top_frame_editing = Some(allow_top_frame_editing);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::SetScriptSourceResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetScriptSource {
            type Response = responses::SetScriptSourceResponse;
            const METHOD: &'static str = "Debugger.setScriptSource";
        }

        /// Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSkipAllPauses {
            /// New value for skip pauses state.
            pub skip: bool,
        }

        impl SetSkipAllPauses {
            pub fn new(skip: bool) -> Self {
                Self { skip }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSkipAllPauses {
            type Response = ();
            const METHOD: &'static str = "Debugger.setSkipAllPauses";
        }

        /// Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetVariableValue {
            /// 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
            pub scope_number: i64,
            /// Variable name.
            pub variable_name: String,
            /// New variable value.
            pub new_value: runtime::types::CallArgument,
            /// Id of callframe that holds variable.
            pub call_frame_id: types::CallFrameId,
        }

        impl SetVariableValue {
            pub fn new(
                scope_number: i64,
                variable_name: impl Into<String>,
                new_value: runtime::types::CallArgument,
                call_frame_id: types::CallFrameId,
            ) -> Self {
                Self {
                    scope_number,
                    variable_name: variable_name.into(),
                    new_value,
                    call_frame_id,
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetVariableValue {
            type Response = ();
            const METHOD: &'static str = "Debugger.setVariableValue";
        }

        /// Steps into the function call.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StepInto {
            /// Debugger will pause on the execution of the first async task which was scheduled before next pause.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub break_on_async_call: Option<bool>,
            /// The skipList specifies location ranges that should be skipped on step into.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub skip_list: Option<Vec<types::LocationRange>>,
        }

        impl StepInto {
            pub fn new() -> Self {
                Self {
                    break_on_async_call: None,
                    skip_list: None,
                }
            }

            pub fn with_break_on_async_call(mut self, break_on_async_call: bool) -> Self {
                self.break_on_async_call = Some(break_on_async_call);
                self
            }

            pub fn with_skip_list(mut self, skip_list: Vec<types::LocationRange>) -> Self {
                self.skip_list = Some(skip_list);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StepInto {
            type Response = ();
            const METHOD: &'static str = "Debugger.stepInto";
        }

        /// Steps out of the function call.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StepOut {}

        impl StepOut {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StepOut {
            type Response = ();
            const METHOD: &'static str = "Debugger.stepOut";
        }

        /// Steps over the statement.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StepOver {
            /// The skipList specifies location ranges that should be skipped on step over.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub skip_list: Option<Vec<types::LocationRange>>,
        }

        impl StepOver {
            pub fn new() -> Self {
                Self { skip_list: None }
            }

            pub fn with_skip_list(mut self, skip_list: Vec<types::LocationRange>) -> Self {
                self.skip_list = Some(skip_list);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StepOver {
            type Response = ();
            const METHOD: &'static str = "Debugger.stepOver";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Fired when breakpoint is resolved to an actual script and location. Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event.
        #[deprecated]
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BreakpointResolved {
            /// Breakpoint unique identifier.
            pub breakpoint_id: types::BreakpointId,
            /// Actual breakpoint location.
            pub location: types::Location,
        }

        impl BreakpointResolved {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Debugger.breakpointResolved")
            }
        }

        /// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Paused {
            /// Call stack the virtual machine stopped on.
            pub call_frames: Vec<types::CallFrame>,
            /// Pause reason.
            pub reason: String,
            /// Object containing break-specific auxiliary properties.
            pub data: Option<serde_json::Value>,
            /// Hit breakpoints IDs
            pub hit_breakpoints: Option<Vec<String>>,
            /// Async stack trace, if any.
            pub async_stack_trace: Option<runtime::types::StackTrace>,
            /// Async stack trace, if any.
            /// **EXPERIMENTAL**
            pub async_stack_trace_id: Option<runtime::types::StackTraceId>,
            /// Never present, will be removed.
            /// **EXPERIMENTAL**
            #[deprecated]
            pub async_call_stack_trace_id: Option<runtime::types::StackTraceId>,
        }

        impl Paused {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Debugger.paused")
            }
        }

        /// Fired when the virtual machine resumed execution.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Resumed {}

        impl Resumed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Debugger.resumed")
            }
        }

        /// Fired when virtual machine fails to parse the script.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScriptFailedToParse {
            /// Identifier of the script parsed.
            pub script_id: runtime::types::ScriptId,
            /// URL or name of the script parsed (if any).
            pub url: String,
            /// Line offset of the script within the resource with given URL (for script tags).
            pub start_line: i64,
            /// Column offset of the script within the resource with given URL.
            pub start_column: i64,
            /// Last line of the script.
            pub end_line: i64,
            /// Length of the last line of the script.
            pub end_column: i64,
            /// Specifies script creation context.
            pub execution_context_id: runtime::types::ExecutionContextId,
            /// Content hash of the script, SHA-256.
            pub hash: String,
            /// For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment.
            pub build_id: String,
            /// Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
            pub execution_context_aux_data: Option<serde_json::Value>,
            /// URL of source map associated with script (if any).
            #[serde(rename = "sourceMapURL")]
            pub source_map_url: Option<String>,
            /// True, if this script has sourceURL.
            #[serde(rename = "hasSourceURL")]
            pub has_source_url: Option<bool>,
            /// True, if this script is ES6 module.
            pub is_module: Option<bool>,
            /// This script length.
            pub length: Option<i64>,
            /// JavaScript top stack frame of where the script parsed event was triggered if available.
            /// **EXPERIMENTAL**
            pub stack_trace: Option<runtime::types::StackTrace>,
            /// If the scriptLanguage is WebAssembly, the code section offset in the module.
            /// **EXPERIMENTAL**
            pub code_offset: Option<i64>,
            /// The language of the script.
            /// **EXPERIMENTAL**
            pub script_language: Option<debugger::types::ScriptLanguage>,
            /// The name the embedder supplied for this script.
            /// **EXPERIMENTAL**
            pub embedder_name: Option<String>,
        }

        impl ScriptFailedToParse {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Debugger.scriptFailedToParse")
            }
        }

        /// Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScriptParsed {
            /// Identifier of the script parsed.
            pub script_id: runtime::types::ScriptId,
            /// URL or name of the script parsed (if any).
            pub url: String,
            /// Line offset of the script within the resource with given URL (for script tags).
            pub start_line: i64,
            /// Column offset of the script within the resource with given URL.
            pub start_column: i64,
            /// Last line of the script.
            pub end_line: i64,
            /// Length of the last line of the script.
            pub end_column: i64,
            /// Specifies script creation context.
            pub execution_context_id: runtime::types::ExecutionContextId,
            /// Content hash of the script, SHA-256.
            pub hash: String,
            /// For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment.
            pub build_id: String,
            /// Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
            pub execution_context_aux_data: Option<serde_json::Value>,
            /// True, if this script is generated as a result of the live edit operation.
            /// **EXPERIMENTAL**
            pub is_live_edit: Option<bool>,
            /// URL of source map associated with script (if any).
            #[serde(rename = "sourceMapURL")]
            pub source_map_url: Option<String>,
            /// True, if this script has sourceURL.
            #[serde(rename = "hasSourceURL")]
            pub has_source_url: Option<bool>,
            /// True, if this script is ES6 module.
            pub is_module: Option<bool>,
            /// This script length.
            pub length: Option<i64>,
            /// JavaScript top stack frame of where the script parsed event was triggered if available.
            /// **EXPERIMENTAL**
            pub stack_trace: Option<runtime::types::StackTrace>,
            /// If the scriptLanguage is WebAssembly, the code section offset in the module.
            /// **EXPERIMENTAL**
            pub code_offset: Option<i64>,
            /// The language of the script.
            /// **EXPERIMENTAL**
            pub script_language: Option<debugger::types::ScriptLanguage>,
            /// If the scriptLanguage is WebAssembly, the source of debug symbols for the module.
            /// **EXPERIMENTAL**
            pub debug_symbols: Option<Vec<debugger::types::DebugSymbols>>,
            /// The name the embedder supplied for this script.
            /// **EXPERIMENTAL**
            pub embedder_name: Option<String>,
            /// The list of set breakpoints in this script if calls to `setBreakpointByUrl` matches this script's URL or hash. Clients that use this list can ignore the `breakpointResolved` event. They are equivalent.
            /// **EXPERIMENTAL**
            pub resolved_breakpoints: Option<Vec<types::ResolvedBreakpoint>>,
        }

        impl ScriptParsed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Debugger.scriptParsed")
            }
        }
    }
}

pub mod heap_profiler {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Heap snapshot object id.
        pub type HeapSnapshotObjectId = String;

        /// Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SamplingHeapProfileNode {
            /// Function location.
            pub call_frame: runtime::types::CallFrame,
            /// Allocations size in bytes for the node excluding children.
            pub self_size: f64,
            /// Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
            pub id: i64,
            /// Child nodes.
            pub children: Vec<SamplingHeapProfileNode>,
        }

        /// A single sample from a sampling profile.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SamplingHeapProfileSample {
            /// Allocation size in bytes attributed to the sample.
            pub size: f64,
            /// Id of the corresponding profile tree node.
            pub node_id: i64,
            /// Time-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.
            pub ordinal: f64,
        }

        /// Sampling profile.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SamplingHeapProfile {
            pub head: SamplingHeapProfileNode,
            pub samples: Vec<SamplingHeapProfileSample>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHeapObjectIdResponse {
            /// Id of the heap snapshot object corresponding to the passed remote object id.
            pub heap_snapshot_object_id: types::HeapSnapshotObjectId,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetObjectByHeapObjectIdResponse {
            /// Evaluation result.
            pub result: runtime::types::RemoteObject,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSamplingProfileResponse {
            /// Return the sampling profile being collected.
            pub profile: types::SamplingHeapProfile,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopSamplingResponse {
            /// Recorded sampling heap profile.
            pub profile: types::SamplingHeapProfile,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddInspectedHeapObject {
            /// Heap snapshot object id to be accessible by means of $x command line API.
            pub heap_object_id: types::HeapSnapshotObjectId,
        }

        impl AddInspectedHeapObject {
            pub fn new(heap_object_id: types::HeapSnapshotObjectId) -> Self {
                Self { heap_object_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddInspectedHeapObject {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.addInspectedHeapObject";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CollectGarbage {}

        impl CollectGarbage {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CollectGarbage {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.collectGarbage";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.disable";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.enable";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHeapObjectId {
            /// Identifier of the object to get heap object id for.
            pub object_id: runtime::types::RemoteObjectId,
        }

        impl GetHeapObjectId {
            pub fn new(object_id: runtime::types::RemoteObjectId) -> Self {
                Self { object_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetHeapObjectIdResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetHeapObjectId {
            type Response = responses::GetHeapObjectIdResponse;
            const METHOD: &'static str = "HeapProfiler.getHeapObjectId";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetObjectByHeapObjectId {
            pub object_id: types::HeapSnapshotObjectId,
            /// Symbolic group name that can be used to release multiple objects.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_group: Option<String>,
        }

        impl GetObjectByHeapObjectId {
            pub fn new(object_id: types::HeapSnapshotObjectId) -> Self {
                Self {
                    object_id,
                    object_group: None,
                }
            }

            pub fn with_object_group(mut self, object_group: impl Into<String>) -> Self {
                self.object_group = Some(object_group.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetObjectByHeapObjectIdResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetObjectByHeapObjectId {
            type Response = responses::GetObjectByHeapObjectIdResponse;
            const METHOD: &'static str = "HeapProfiler.getObjectByHeapObjectId";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetSamplingProfile {}

        impl GetSamplingProfile {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetSamplingProfileResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetSamplingProfile {
            type Response = responses::GetSamplingProfileResponse;
            const METHOD: &'static str = "HeapProfiler.getSamplingProfile";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartSampling {
            /// Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub sampling_interval: Option<f64>,
            /// Maximum stack depth. The default value is 128.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stack_depth: Option<f64>,
            /// By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeObjectsCollectedByMajorGC")]
            pub include_objects_collected_by_major_gc: Option<bool>,
            /// By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeObjectsCollectedByMinorGC")]
            pub include_objects_collected_by_minor_gc: Option<bool>,
        }

        impl StartSampling {
            pub fn new() -> Self {
                Self {
                    sampling_interval: None,
                    stack_depth: None,
                    include_objects_collected_by_major_gc: None,
                    include_objects_collected_by_minor_gc: None,
                }
            }

            pub fn with_sampling_interval(mut self, sampling_interval: f64) -> Self {
                self.sampling_interval = Some(sampling_interval);
                self
            }

            pub fn with_stack_depth(mut self, stack_depth: f64) -> Self {
                self.stack_depth = Some(stack_depth);
                self
            }

            pub fn with_include_objects_collected_by_major_gc(
                mut self,
                include_objects_collected_by_major_gc: bool,
            ) -> Self {
                self.include_objects_collected_by_major_gc =
                    Some(include_objects_collected_by_major_gc);
                self
            }

            pub fn with_include_objects_collected_by_minor_gc(
                mut self,
                include_objects_collected_by_minor_gc: bool,
            ) -> Self {
                self.include_objects_collected_by_minor_gc =
                    Some(include_objects_collected_by_minor_gc);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartSampling {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.startSampling";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartTrackingHeapObjects {
            #[serde(skip_serializing_if = "Option::is_none")]
            pub track_allocations: Option<bool>,
        }

        impl StartTrackingHeapObjects {
            pub fn new() -> Self {
                Self {
                    track_allocations: None,
                }
            }

            pub fn with_track_allocations(mut self, track_allocations: bool) -> Self {
                self.track_allocations = Some(track_allocations);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartTrackingHeapObjects {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.startTrackingHeapObjects";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopSampling {}

        impl StopSampling {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::StopSamplingResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopSampling {
            type Response = responses::StopSamplingResponse;
            const METHOD: &'static str = "HeapProfiler.stopSampling";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopTrackingHeapObjects {
            /// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub report_progress: Option<bool>,
            /// Deprecated in favor of `exposeInternals`.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub treat_global_objects_as_roots: Option<bool>,
            /// If true, numerical values are included in the snapshot
            #[serde(skip_serializing_if = "Option::is_none")]
            pub capture_numeric_value: Option<bool>,
            /// If true, exposes internals of the snapshot.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub expose_internals: Option<bool>,
        }

        impl StopTrackingHeapObjects {
            pub fn new() -> Self {
                Self {
                    report_progress: None,
                    treat_global_objects_as_roots: None,
                    capture_numeric_value: None,
                    expose_internals: None,
                }
            }

            pub fn with_report_progress(mut self, report_progress: bool) -> Self {
                self.report_progress = Some(report_progress);
                self
            }

            pub fn with_treat_global_objects_as_roots(
                mut self,
                treat_global_objects_as_roots: bool,
            ) -> Self {
                self.treat_global_objects_as_roots = Some(treat_global_objects_as_roots);
                self
            }

            pub fn with_capture_numeric_value(mut self, capture_numeric_value: bool) -> Self {
                self.capture_numeric_value = Some(capture_numeric_value);
                self
            }

            pub fn with_expose_internals(mut self, expose_internals: bool) -> Self {
                self.expose_internals = Some(expose_internals);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopTrackingHeapObjects {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.stopTrackingHeapObjects";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakeHeapSnapshot {
            /// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub report_progress: Option<bool>,
            /// If true, a raw snapshot without artificial roots will be generated. Deprecated in favor of `exposeInternals`.
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub treat_global_objects_as_roots: Option<bool>,
            /// If true, numerical values are included in the snapshot
            #[serde(skip_serializing_if = "Option::is_none")]
            pub capture_numeric_value: Option<bool>,
            /// If true, exposes internals of the snapshot.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub expose_internals: Option<bool>,
        }

        impl TakeHeapSnapshot {
            pub fn new() -> Self {
                Self {
                    report_progress: None,
                    treat_global_objects_as_roots: None,
                    capture_numeric_value: None,
                    expose_internals: None,
                }
            }

            pub fn with_report_progress(mut self, report_progress: bool) -> Self {
                self.report_progress = Some(report_progress);
                self
            }

            pub fn with_treat_global_objects_as_roots(
                mut self,
                treat_global_objects_as_roots: bool,
            ) -> Self {
                self.treat_global_objects_as_roots = Some(treat_global_objects_as_roots);
                self
            }

            pub fn with_capture_numeric_value(mut self, capture_numeric_value: bool) -> Self {
                self.capture_numeric_value = Some(capture_numeric_value);
                self
            }

            pub fn with_expose_internals(mut self, expose_internals: bool) -> Self {
                self.expose_internals = Some(expose_internals);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TakeHeapSnapshot {
            type Response = ();
            const METHOD: &'static str = "HeapProfiler.takeHeapSnapshot";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddHeapSnapshotChunk {
            pub chunk: String,
        }

        impl AddHeapSnapshotChunk {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("HeapProfiler.addHeapSnapshotChunk")
            }
        }

        /// If heap objects tracking has been started then backend may send update for one or more fragments
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct HeapStatsUpdate {
            /// An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
            pub stats_update: Vec<i64>,
        }

        impl HeapStatsUpdate {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("HeapProfiler.heapStatsUpdate")
            }
        }

        /// If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct LastSeenObjectId {
            pub last_seen_object_id: i64,
            pub timestamp: f64,
        }

        impl LastSeenObjectId {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("HeapProfiler.lastSeenObjectId")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReportHeapSnapshotProgress {
            pub done: i64,
            pub total: i64,
            pub finished: Option<bool>,
        }

        impl ReportHeapSnapshotProgress {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("HeapProfiler.reportHeapSnapshotProgress")
            }
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ResetProfiles {}

        impl ResetProfiles {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("HeapProfiler.resetProfiles")
            }
        }
    }
}

pub mod profiler {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Profile node. Holds callsite information, execution statistics and child nodes.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ProfileNode {
            /// Unique id of the node.
            pub id: i64,
            /// Function location.
            pub call_frame: runtime::types::CallFrame,
            /// Number of samples where this node was on top of the call stack.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub hit_count: Option<i64>,
            /// Child node ids.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub children: Option<Vec<i64>>,
            /// The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub deopt_reason: Option<String>,
            /// An array of source position ticks.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub position_ticks: Option<Vec<PositionTickInfo>>,
        }

        /// Profile.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Profile {
            /// The list of profile nodes. First item is the root node.
            pub nodes: Vec<ProfileNode>,
            /// Profiling start timestamp in microseconds.
            pub start_time: f64,
            /// Profiling end timestamp in microseconds.
            pub end_time: f64,
            /// Ids of samples top nodes.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub samples: Option<Vec<i64>>,
            /// Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub time_deltas: Option<Vec<i64>>,
        }

        /// Specifies a number of samples attributed to a certain source position.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PositionTickInfo {
            /// Source line number (1-based).
            pub line: i64,
            /// Number of samples attributed to the source line.
            pub ticks: i64,
        }

        /// Coverage data for a source range.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CoverageRange {
            /// JavaScript script source offset for the range start.
            pub start_offset: i64,
            /// JavaScript script source offset for the range end.
            pub end_offset: i64,
            /// Collected execution count of the source range.
            pub count: i64,
        }

        /// Coverage data for a JavaScript function.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct FunctionCoverage {
            /// JavaScript function name.
            pub function_name: String,
            /// Source ranges inside the function with coverage data.
            pub ranges: Vec<CoverageRange>,
            /// Whether coverage data for this function has block granularity.
            pub is_block_coverage: bool,
        }

        /// Coverage data for a JavaScript script.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ScriptCoverage {
            /// JavaScript script id.
            pub script_id: runtime::types::ScriptId,
            /// JavaScript script name or url.
            pub url: String,
            /// Functions contained in the script that has coverage data.
            pub functions: Vec<FunctionCoverage>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBestEffortCoverageResponse {
            /// Coverage data for the current isolate.
            pub result: Vec<types::ScriptCoverage>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartPreciseCoverageResponse {
            /// Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
            pub timestamp: f64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopResponse {
            /// Recorded profile.
            pub profile: types::Profile,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakePreciseCoverageResponse {
            /// Coverage data for the current isolate.
            pub result: Vec<types::ScriptCoverage>,
            /// Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
            pub timestamp: f64,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Profiler.disable";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Profiler.enable";
        }

        /// Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetBestEffortCoverage {}

        impl GetBestEffortCoverage {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetBestEffortCoverageResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetBestEffortCoverage {
            type Response = responses::GetBestEffortCoverageResponse;
            const METHOD: &'static str = "Profiler.getBestEffortCoverage";
        }

        /// Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetSamplingInterval {
            /// New sampling interval in microseconds.
            pub interval: i64,
        }

        impl SetSamplingInterval {
            pub fn new(interval: i64) -> Self {
                Self { interval }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetSamplingInterval {
            type Response = ();
            const METHOD: &'static str = "Profiler.setSamplingInterval";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Start {}

        impl Start {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Start {
            type Response = ();
            const METHOD: &'static str = "Profiler.start";
        }

        /// Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StartPreciseCoverage {
            /// Collect accurate call counts beyond simple 'covered' or 'not covered'.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub call_count: Option<bool>,
            /// Collect block-based coverage.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub detailed: Option<bool>,
            /// Allow the backend to send updates on its own initiative
            #[serde(skip_serializing_if = "Option::is_none")]
            pub allow_triggered_updates: Option<bool>,
        }

        impl StartPreciseCoverage {
            pub fn new() -> Self {
                Self {
                    call_count: None,
                    detailed: None,
                    allow_triggered_updates: None,
                }
            }

            pub fn with_call_count(mut self, call_count: bool) -> Self {
                self.call_count = Some(call_count);
                self
            }

            pub fn with_detailed(mut self, detailed: bool) -> Self {
                self.detailed = Some(detailed);
                self
            }

            pub fn with_allow_triggered_updates(mut self, allow_triggered_updates: bool) -> Self {
                self.allow_triggered_updates = Some(allow_triggered_updates);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::StartPreciseCoverageResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StartPreciseCoverage {
            type Response = responses::StartPreciseCoverageResponse;
            const METHOD: &'static str = "Profiler.startPreciseCoverage";
        }

        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Stop {}

        impl Stop {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::StopResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Stop {
            type Response = responses::StopResponse;
            const METHOD: &'static str = "Profiler.stop";
        }

        /// Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StopPreciseCoverage {}

        impl StopPreciseCoverage {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for StopPreciseCoverage {
            type Response = ();
            const METHOD: &'static str = "Profiler.stopPreciseCoverage";
        }

        /// Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TakePreciseCoverage {}

        impl TakePreciseCoverage {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::TakePreciseCoverageResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TakePreciseCoverage {
            type Response = responses::TakePreciseCoverageResponse;
            const METHOD: &'static str = "Profiler.takePreciseCoverage";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ConsoleProfileFinished {
            pub id: String,
            /// Location of console.profileEnd().
            pub location: debugger::types::Location,
            pub profile: types::Profile,
            /// Profile title passed as an argument to console.profile().
            pub title: Option<String>,
        }

        impl ConsoleProfileFinished {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Profiler.consoleProfileFinished")
            }
        }

        /// Sent when new profile recording is started using console.profile() call.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ConsoleProfileStarted {
            pub id: String,
            /// Location of console.profile().
            pub location: debugger::types::Location,
            /// Profile title passed as an argument to console.profile().
            pub title: Option<String>,
        }

        impl ConsoleProfileStarted {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Profiler.consoleProfileStarted")
            }
        }

        /// Reports coverage delta since the last poll (either from an event like this, or from `takePreciseCoverage` for the current isolate. May only be sent if precise code coverage has been started. This event can be trigged by the embedder to, for example, trigger collection of coverage data immediately at a certain point in time.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PreciseCoverageDeltaUpdate {
            /// Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
            pub timestamp: f64,
            /// Identifier for distinguishing coverage events.
            pub occasion: String,
            /// Coverage data for the current isolate.
            pub result: Vec<types::ScriptCoverage>,
        }

        impl PreciseCoverageDeltaUpdate {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Profiler.preciseCoverageDeltaUpdate")
            }
        }
    }
}

pub mod runtime {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Unique script identifier.
        pub type ScriptId = String;

        /// Represents options for serialization. Overrides `generatePreview` and `returnByValue`.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SerializationOptions {
            pub serialization: String,
            /// Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub max_depth: Option<i64>,
            /// Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`. Values can be only of type string or integer.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub additional_parameters: Option<serde_json::Value>,
        }

        /// Represents deep serialized value.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DeepSerializedValue {
            pub type_: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<serde_json::Value>,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<String>,
            /// Set if value reference met more then once during serialization. In such case, value is provided only to one of the serialized values. Unique per value in the scope of one CDP call.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub weak_local_object_reference: Option<i64>,
        }

        /// Unique object identifier.
        pub type RemoteObjectId = String;

        /// Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.
        pub type UnserializableValue = String;

        /// Mirror object referencing original JavaScript object.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoteObject {
            /// Object type.
            pub type_: String,
            /// Object subtype hint. Specified for `object` type values only. NOTE: If you change anything here, make sure to also update `subtype` in `ObjectPreview` and `PropertyPreview` below.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub subtype: Option<String>,
            /// Object class (constructor) name. Specified for `object` type values only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub class_name: Option<String>,
            /// Remote object value in case of primitive values or JSON values (if it was requested).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<serde_json::Value>,
            /// Primitive value which can not be JSON-stringified does not have `value`, but gets this property.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unserializable_value: Option<UnserializableValue>,
            /// String representation of the object.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub description: Option<String>,
            /// Deep serialized value.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub deep_serialized_value: Option<DeepSerializedValue>,
            /// Unique object identifier (for non-primitive values).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<RemoteObjectId>,
            /// Preview containing abbreviated property values. Specified for `object` type values only.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub preview: Option<ObjectPreview>,
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub custom_preview: Option<CustomPreview>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CustomPreview {
            /// The JSON-stringified result of formatter.header(object, config) call. It contains json ML array that represents RemoteObject.
            pub header: String,
            /// If formatter returns true as a result of formatter.hasBody call then bodyGetterId will contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. The result value is json ML array.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub body_getter_id: Option<RemoteObjectId>,
        }

        /// Object containing abbreviated remote object value.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ObjectPreview {
            /// Object type.
            pub type_: String,
            /// Object subtype hint. Specified for `object` type values only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub subtype: Option<String>,
            /// String representation of the object.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub description: Option<String>,
            /// True iff some of the properties or entries of the original object did not fit.
            pub overflow: bool,
            /// List of the properties.
            pub properties: Vec<PropertyPreview>,
            /// List of the entries. Specified for `map` and `set` subtype values only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub entries: Option<Vec<EntryPreview>>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PropertyPreview {
            /// Property name.
            pub name: String,
            /// Object type. Accessor means that the property itself is an accessor property.
            pub type_: String,
            /// User-friendly property value string.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<String>,
            /// Nested value preview.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value_preview: Option<ObjectPreview>,
            /// Object subtype hint. Specified for `object` type values only.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub subtype: Option<String>,
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EntryPreview {
            /// Preview of the key. Specified for map-like collection entries.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub key: Option<ObjectPreview>,
            /// Preview of the value.
            pub value: ObjectPreview,
        }

        /// Object property descriptor.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PropertyDescriptor {
            /// Property name or symbol description.
            pub name: String,
            /// The value associated with the property.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<RemoteObject>,
            /// True if the value associated with the property may be changed (data descriptors only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub writable: Option<bool>,
            /// A function which serves as a getter for the property, or `undefined` if there is no getter (accessor descriptors only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub get: Option<RemoteObject>,
            /// A function which serves as a setter for the property, or `undefined` if there is no setter (accessor descriptors only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub set: Option<RemoteObject>,
            /// True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
            pub configurable: bool,
            /// True if this property shows up during enumeration of the properties on the corresponding object.
            pub enumerable: bool,
            /// True if the result was thrown during the evaluation.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub was_thrown: Option<bool>,
            /// True if the property is owned for the object.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub is_own: Option<bool>,
            /// Property symbol object, if the property is of the `symbol` type.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub symbol: Option<RemoteObject>,
        }

        /// Object internal property descriptor. This property isn't normally visible in JavaScript code.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InternalPropertyDescriptor {
            /// Conventional property name.
            pub name: String,
            /// The value associated with the property.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<RemoteObject>,
        }

        /// Object private field descriptor.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct PrivatePropertyDescriptor {
            /// Private property name.
            pub name: String,
            /// The value associated with the private property.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<RemoteObject>,
            /// A function which serves as a getter for the private property, or `undefined` if there is no getter (accessor descriptors only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub get: Option<RemoteObject>,
            /// A function which serves as a setter for the private property, or `undefined` if there is no setter (accessor descriptors only).
            #[serde(skip_serializing_if = "Option::is_none")]
            pub set: Option<RemoteObject>,
        }

        /// Represents function call argument. Either remote object id `objectId`, primitive `value`, unserializable primitive value or neither of (for undefined) them should be specified.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CallArgument {
            /// Primitive value or serializable javascript object.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub value: Option<serde_json::Value>,
            /// Primitive value which can not be JSON-stringified.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unserializable_value: Option<UnserializableValue>,
            /// Remote object handle.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<RemoteObjectId>,
        }

        /// Id of an execution context.
        pub type ExecutionContextId = i64;

        /// Description of an isolated world.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExecutionContextDescription {
            /// Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
            pub id: ExecutionContextId,
            /// Execution context origin.
            pub origin: String,
            /// Human readable name describing given context.
            pub name: String,
            /// A system-unique execution context identifier. Unlike the id, this is unique across multiple processes, so can be reliably used to identify specific context while backend performs a cross-process navigation.
            /// **EXPERIMENTAL**
            pub unique_id: String,
            /// Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
            #[serde(skip_serializing_if = "Option::is_none")]
            pub aux_data: Option<serde_json::Value>,
        }

        /// Detailed information about exception (or error) that was thrown during script compilation or execution.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExceptionDetails {
            /// Exception id.
            pub exception_id: i64,
            /// Exception text, which should be used together with exception object when available.
            pub text: String,
            /// Line number of the exception location (0-based).
            pub line_number: i64,
            /// Column number of the exception location (0-based).
            pub column_number: i64,
            /// Script ID of the exception location.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub script_id: Option<ScriptId>,
            /// URL of the exception location, to be used when the script was not reported.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub url: Option<String>,
            /// JavaScript stack trace if available.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub stack_trace: Option<StackTrace>,
            /// Exception object if available.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub exception: Option<RemoteObject>,
            /// Identifier of the context where exception happened.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_id: Option<ExecutionContextId>,
            /// Dictionary with entries of meta data that the client associated with this exception, such as information about associated network requests, etc.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub exception_meta_data: Option<serde_json::Value>,
        }

        /// Number of milliseconds since epoch.
        pub type Timestamp = f64;

        /// Number of milliseconds.
        pub type TimeDelta = f64;

        /// Stack entry for runtime errors and assertions.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CallFrame {
            /// JavaScript function name.
            pub function_name: String,
            /// JavaScript script id.
            pub script_id: ScriptId,
            /// JavaScript script name or url.
            pub url: String,
            /// JavaScript script line number (0-based).
            pub line_number: i64,
            /// JavaScript script column number (0-based).
            pub column_number: i64,
        }

        /// Call frames for assertions or error messages.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StackTrace {
            /// String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub description: Option<String>,
            /// JavaScript function name.
            pub call_frames: Vec<CallFrame>,
            /// Asynchronous JavaScript stack trace that preceded this stack, if available.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent: Option<Box<StackTrace>>,
            /// Asynchronous JavaScript stack trace that preceded this stack, if available.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub parent_id: Option<StackTraceId>,
        }

        /// Unique identifier of current debugger.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        pub type UniqueDebuggerId = String;

        /// If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct StackTraceId {
            pub id: String,
            #[serde(skip_serializing_if = "Option::is_none")]
            pub debugger_id: Option<UniqueDebuggerId>,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AwaitPromiseResponse {
            /// Promise result. Will contain rejected value if promise was rejected.
            pub result: types::RemoteObject,
            /// Exception details if stack strace is available.
            pub exception_details: Option<types::ExceptionDetails>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CallFunctionOnResponse {
            /// Call result.
            pub result: types::RemoteObject,
            /// Exception details.
            pub exception_details: Option<types::ExceptionDetails>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CompileScriptResponse {
            /// Id of the script.
            pub script_id: Option<types::ScriptId>,
            /// Exception details.
            pub exception_details: Option<types::ExceptionDetails>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct EvaluateResponse {
            /// Evaluation result.
            pub result: types::RemoteObject,
            /// Exception details.
            pub exception_details: Option<types::ExceptionDetails>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetIsolateIdResponse {
            /// The isolate id.
            pub id: String,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHeapUsageResponse {
            /// Used JavaScript heap size in bytes.
            pub used_size: f64,
            /// Allocated JavaScript heap size in bytes.
            pub total_size: f64,
            /// Used size in bytes in the embedder's garbage-collected heap.
            pub embedder_heap_used_size: f64,
            /// Size in bytes of backing storage for array buffers and external strings.
            pub backing_storage_size: f64,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetPropertiesResponse {
            /// Object properties.
            pub result: Vec<types::PropertyDescriptor>,
            /// Internal object properties (only of the element itself).
            pub internal_properties: Option<Vec<types::InternalPropertyDescriptor>>,
            /// Object private properties.
            /// **EXPERIMENTAL**
            pub private_properties: Option<Vec<types::PrivatePropertyDescriptor>>,
            /// Exception details.
            pub exception_details: Option<types::ExceptionDetails>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GlobalLexicalScopeNamesResponse {
            pub names: Vec<String>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QueryObjectsResponse {
            /// Array with objects.
            pub objects: types::RemoteObject,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RunScriptResponse {
            /// Run result.
            pub result: types::RemoteObject,
            /// Exception details.
            pub exception_details: Option<types::ExceptionDetails>,
        }

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetExceptionDetailsResponse {
            pub exception_details: Option<types::ExceptionDetails>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Add handler to promise with given promise object id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AwaitPromise {
            /// Identifier of the promise.
            pub promise_object_id: types::RemoteObjectId,
            /// Whether the result is expected to be a JSON object that should be sent by value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub return_by_value: Option<bool>,
            /// Whether preview should be generated for the result.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generate_preview: Option<bool>,
        }

        impl AwaitPromise {
            pub fn new(promise_object_id: types::RemoteObjectId) -> Self {
                Self {
                    promise_object_id,
                    return_by_value: None,
                    generate_preview: None,
                }
            }

            pub fn with_return_by_value(mut self, return_by_value: bool) -> Self {
                self.return_by_value = Some(return_by_value);
                self
            }

            pub fn with_generate_preview(mut self, generate_preview: bool) -> Self {
                self.generate_preview = Some(generate_preview);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::AwaitPromiseResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AwaitPromise {
            type Response = responses::AwaitPromiseResponse;
            const METHOD: &'static str = "Runtime.awaitPromise";
        }

        /// Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CallFunctionOn {
            /// Declaration of the function to call.
            pub function_declaration: String,
            /// Identifier of the object to call function on. Either objectId or executionContextId should be specified.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_id: Option<types::RemoteObjectId>,
            /// Call arguments. All call arguments must belong to the same JavaScript world as the target object.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub arguments: Option<Vec<types::CallArgument>>,
            /// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub silent: Option<bool>,
            /// Whether the result is expected to be a JSON object which should be sent by value. Can be overriden by `serializationOptions`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub return_by_value: Option<bool>,
            /// Whether preview should be generated for the result.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generate_preview: Option<bool>,
            /// Whether execution should be treated as initiated by user in the UI.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_gesture: Option<bool>,
            /// Whether execution should `await` for resulting value and return once awaited promise is resolved.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub await_promise: Option<bool>,
            /// Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_id: Option<types::ExecutionContextId>,
            /// Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_group: Option<String>,
            /// Whether to throw an exception if side effect cannot be ruled out during evaluation.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub throw_on_side_effect: Option<bool>,
            /// An alternative way to specify the execution context to call function on. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental function call in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `executionContextId`.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unique_context_id: Option<String>,
            /// Specifies the result serialization. If provided, overrides `generatePreview` and `returnByValue`.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub serialization_options: Option<types::SerializationOptions>,
        }

        impl CallFunctionOn {
            pub fn new(function_declaration: impl Into<String>) -> Self {
                Self {
                    function_declaration: function_declaration.into(),
                    object_id: None,
                    arguments: None,
                    silent: None,
                    return_by_value: None,
                    generate_preview: None,
                    user_gesture: None,
                    await_promise: None,
                    execution_context_id: None,
                    object_group: None,
                    throw_on_side_effect: None,
                    unique_context_id: None,
                    serialization_options: None,
                }
            }

            pub fn with_object_id(mut self, object_id: types::RemoteObjectId) -> Self {
                self.object_id = Some(object_id);
                self
            }

            pub fn with_arguments(mut self, arguments: Vec<types::CallArgument>) -> Self {
                self.arguments = Some(arguments);
                self
            }

            pub fn with_silent(mut self, silent: bool) -> Self {
                self.silent = Some(silent);
                self
            }

            pub fn with_return_by_value(mut self, return_by_value: bool) -> Self {
                self.return_by_value = Some(return_by_value);
                self
            }

            pub fn with_generate_preview(mut self, generate_preview: bool) -> Self {
                self.generate_preview = Some(generate_preview);
                self
            }

            pub fn with_user_gesture(mut self, user_gesture: bool) -> Self {
                self.user_gesture = Some(user_gesture);
                self
            }

            pub fn with_await_promise(mut self, await_promise: bool) -> Self {
                self.await_promise = Some(await_promise);
                self
            }

            pub fn with_execution_context_id(
                mut self,
                execution_context_id: types::ExecutionContextId,
            ) -> Self {
                self.execution_context_id = Some(execution_context_id);
                self
            }

            pub fn with_object_group(mut self, object_group: impl Into<String>) -> Self {
                self.object_group = Some(object_group.into());
                self
            }

            pub fn with_throw_on_side_effect(mut self, throw_on_side_effect: bool) -> Self {
                self.throw_on_side_effect = Some(throw_on_side_effect);
                self
            }

            pub fn with_unique_context_id(mut self, unique_context_id: impl Into<String>) -> Self {
                self.unique_context_id = Some(unique_context_id.into());
                self
            }

            pub fn with_serialization_options(
                mut self,
                serialization_options: types::SerializationOptions,
            ) -> Self {
                self.serialization_options = Some(serialization_options);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CallFunctionOnResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CallFunctionOn {
            type Response = responses::CallFunctionOnResponse;
            const METHOD: &'static str = "Runtime.callFunctionOn";
        }

        /// Compiles expression.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct CompileScript {
            /// Expression to compile.
            pub expression: String,
            /// Source url to be set for the script.
            #[serde(rename = "sourceURL")]
            pub source_url: String,
            /// Specifies whether the compiled script should be persisted.
            pub persist_script: bool,
            /// Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_id: Option<types::ExecutionContextId>,
        }

        impl CompileScript {
            pub fn new(
                expression: impl Into<String>,
                source_url: impl Into<String>,
                persist_script: bool,
            ) -> Self {
                Self {
                    expression: expression.into(),
                    source_url: source_url.into(),
                    persist_script,
                    execution_context_id: None,
                }
            }

            pub fn with_execution_context_id(
                mut self,
                execution_context_id: types::ExecutionContextId,
            ) -> Self {
                self.execution_context_id = Some(execution_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::CompileScriptResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for CompileScript {
            type Response = responses::CompileScriptResponse;
            const METHOD: &'static str = "Runtime.compileScript";
        }

        /// Disables reporting of execution contexts creation.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Disable {}

        impl Disable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Disable {
            type Response = ();
            const METHOD: &'static str = "Runtime.disable";
        }

        /// Discards collected exceptions and console API calls.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct DiscardConsoleEntries {}

        impl DiscardConsoleEntries {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for DiscardConsoleEntries {
            type Response = ();
            const METHOD: &'static str = "Runtime.discardConsoleEntries";
        }

        /// Enables reporting of execution contexts creation by means of `executionContextCreated` event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Enable {}

        impl Enable {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Enable {
            type Response = ();
            const METHOD: &'static str = "Runtime.enable";
        }

        /// Evaluates expression on global object.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Evaluate {
            /// Expression to evaluate.
            pub expression: String,
            /// Symbolic group name that can be used to release multiple objects.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_group: Option<String>,
            /// Determines whether Command Line API should be available during the evaluation.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeCommandLineAPI")]
            pub include_command_line_api: Option<bool>,
            /// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub silent: Option<bool>,
            /// Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with `uniqueContextId`, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub context_id: Option<types::ExecutionContextId>,
            /// Whether the result is expected to be a JSON object that should be sent by value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub return_by_value: Option<bool>,
            /// Whether preview should be generated for the result.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generate_preview: Option<bool>,
            /// Whether execution should be treated as initiated by user in the UI.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub user_gesture: Option<bool>,
            /// Whether execution should `await` for resulting value and return once awaited promise is resolved.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub await_promise: Option<bool>,
            /// Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies `disableBreaks` below.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub throw_on_side_effect: Option<bool>,
            /// Terminate execution after timing out (number of milliseconds).
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub timeout: Option<types::TimeDelta>,
            /// Disable breakpoints during execution.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub disable_breaks: Option<bool>,
            /// Setting this flag to true enables `let` re-declaration and top-level `await`. Note that `let` variables can only be re-declared if they originate from `replMode` themselves.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub repl_mode: Option<bool>,
            /// The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "allowUnsafeEvalBlockedByCSP")]
            pub allow_unsafe_eval_blocked_by_csp: Option<bool>,
            /// An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `contextId`.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub unique_context_id: Option<String>,
            /// Specifies the result serialization. If provided, overrides `generatePreview` and `returnByValue`.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub serialization_options: Option<types::SerializationOptions>,
        }

        impl Evaluate {
            pub fn new(expression: impl Into<String>) -> Self {
                Self {
                    expression: expression.into(),
                    object_group: None,
                    include_command_line_api: None,
                    silent: None,
                    context_id: None,
                    return_by_value: None,
                    generate_preview: None,
                    user_gesture: None,
                    await_promise: None,
                    throw_on_side_effect: None,
                    timeout: None,
                    disable_breaks: None,
                    repl_mode: None,
                    allow_unsafe_eval_blocked_by_csp: None,
                    unique_context_id: None,
                    serialization_options: None,
                }
            }

            pub fn with_object_group(mut self, object_group: impl Into<String>) -> Self {
                self.object_group = Some(object_group.into());
                self
            }

            pub fn with_include_command_line_api(mut self, include_command_line_api: bool) -> Self {
                self.include_command_line_api = Some(include_command_line_api);
                self
            }

            pub fn with_silent(mut self, silent: bool) -> Self {
                self.silent = Some(silent);
                self
            }

            pub fn with_context_id(mut self, context_id: types::ExecutionContextId) -> Self {
                self.context_id = Some(context_id);
                self
            }

            pub fn with_return_by_value(mut self, return_by_value: bool) -> Self {
                self.return_by_value = Some(return_by_value);
                self
            }

            pub fn with_generate_preview(mut self, generate_preview: bool) -> Self {
                self.generate_preview = Some(generate_preview);
                self
            }

            pub fn with_user_gesture(mut self, user_gesture: bool) -> Self {
                self.user_gesture = Some(user_gesture);
                self
            }

            pub fn with_await_promise(mut self, await_promise: bool) -> Self {
                self.await_promise = Some(await_promise);
                self
            }

            pub fn with_throw_on_side_effect(mut self, throw_on_side_effect: bool) -> Self {
                self.throw_on_side_effect = Some(throw_on_side_effect);
                self
            }

            pub fn with_timeout(mut self, timeout: types::TimeDelta) -> Self {
                self.timeout = Some(timeout);
                self
            }

            pub fn with_disable_breaks(mut self, disable_breaks: bool) -> Self {
                self.disable_breaks = Some(disable_breaks);
                self
            }

            pub fn with_repl_mode(mut self, repl_mode: bool) -> Self {
                self.repl_mode = Some(repl_mode);
                self
            }

            pub fn with_allow_unsafe_eval_blocked_by_csp(
                mut self,
                allow_unsafe_eval_blocked_by_csp: bool,
            ) -> Self {
                self.allow_unsafe_eval_blocked_by_csp = Some(allow_unsafe_eval_blocked_by_csp);
                self
            }

            pub fn with_unique_context_id(mut self, unique_context_id: impl Into<String>) -> Self {
                self.unique_context_id = Some(unique_context_id.into());
                self
            }

            pub fn with_serialization_options(
                mut self,
                serialization_options: types::SerializationOptions,
            ) -> Self {
                self.serialization_options = Some(serialization_options);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::EvaluateResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for Evaluate {
            type Response = responses::EvaluateResponse;
            const METHOD: &'static str = "Runtime.evaluate";
        }

        /// Returns the isolate id.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetIsolateId {}

        impl GetIsolateId {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetIsolateIdResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetIsolateId {
            type Response = responses::GetIsolateIdResponse;
            const METHOD: &'static str = "Runtime.getIsolateId";
        }

        /// Returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetHeapUsage {}

        impl GetHeapUsage {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetHeapUsageResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetHeapUsage {
            type Response = responses::GetHeapUsageResponse;
            const METHOD: &'static str = "Runtime.getHeapUsage";
        }

        /// Returns properties of a given object. Object group of the result is inherited from the target object.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetProperties {
            /// Identifier of the object to return properties for.
            pub object_id: types::RemoteObjectId,
            /// If true, returns properties belonging only to the element itself, not to its prototype chain.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub own_properties: Option<bool>,
            /// If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub accessor_properties_only: Option<bool>,
            /// Whether preview should be generated for the results.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generate_preview: Option<bool>,
            /// If true, returns non-indexed properties only.
            /// **EXPERIMENTAL**
            #[serde(skip_serializing_if = "Option::is_none")]
            pub non_indexed_properties_only: Option<bool>,
        }

        impl GetProperties {
            pub fn new(object_id: types::RemoteObjectId) -> Self {
                Self {
                    object_id,
                    own_properties: None,
                    accessor_properties_only: None,
                    generate_preview: None,
                    non_indexed_properties_only: None,
                }
            }

            pub fn with_own_properties(mut self, own_properties: bool) -> Self {
                self.own_properties = Some(own_properties);
                self
            }

            pub fn with_accessor_properties_only(mut self, accessor_properties_only: bool) -> Self {
                self.accessor_properties_only = Some(accessor_properties_only);
                self
            }

            pub fn with_generate_preview(mut self, generate_preview: bool) -> Self {
                self.generate_preview = Some(generate_preview);
                self
            }

            pub fn with_non_indexed_properties_only(
                mut self,
                non_indexed_properties_only: bool,
            ) -> Self {
                self.non_indexed_properties_only = Some(non_indexed_properties_only);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetPropertiesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetProperties {
            type Response = responses::GetPropertiesResponse;
            const METHOD: &'static str = "Runtime.getProperties";
        }

        /// Returns all let, const and class variables from global scope.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GlobalLexicalScopeNames {
            /// Specifies in which execution context to lookup global scope variables.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_id: Option<types::ExecutionContextId>,
        }

        impl GlobalLexicalScopeNames {
            pub fn new() -> Self {
                Self {
                    execution_context_id: None,
                }
            }

            pub fn with_execution_context_id(
                mut self,
                execution_context_id: types::ExecutionContextId,
            ) -> Self {
                self.execution_context_id = Some(execution_context_id);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GlobalLexicalScopeNamesResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GlobalLexicalScopeNames {
            type Response = responses::GlobalLexicalScopeNamesResponse;
            const METHOD: &'static str = "Runtime.globalLexicalScopeNames";
        }

        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct QueryObjects {
            /// Identifier of the prototype to return objects for.
            pub prototype_object_id: types::RemoteObjectId,
            /// Symbolic group name that can be used to release the results.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_group: Option<String>,
        }

        impl QueryObjects {
            pub fn new(prototype_object_id: types::RemoteObjectId) -> Self {
                Self {
                    prototype_object_id,
                    object_group: None,
                }
            }

            pub fn with_object_group(mut self, object_group: impl Into<String>) -> Self {
                self.object_group = Some(object_group.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::QueryObjectsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for QueryObjects {
            type Response = responses::QueryObjectsResponse;
            const METHOD: &'static str = "Runtime.queryObjects";
        }

        /// Releases remote object with given id.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReleaseObject {
            /// Identifier of the object to release.
            pub object_id: types::RemoteObjectId,
        }

        impl ReleaseObject {
            pub fn new(object_id: types::RemoteObjectId) -> Self {
                Self { object_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReleaseObject {
            type Response = ();
            const METHOD: &'static str = "Runtime.releaseObject";
        }

        /// Releases all remote objects that belong to a given group.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ReleaseObjectGroup {
            /// Symbolic object group name.
            pub object_group: String,
        }

        impl ReleaseObjectGroup {
            pub fn new(object_group: impl Into<String>) -> Self {
                Self {
                    object_group: object_group.into(),
                }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for ReleaseObjectGroup {
            type Response = ();
            const METHOD: &'static str = "Runtime.releaseObjectGroup";
        }

        /// Tells inspected instance to run if it was waiting for debugger to attach.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RunIfWaitingForDebugger {}

        impl RunIfWaitingForDebugger {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RunIfWaitingForDebugger {
            type Response = ();
            const METHOD: &'static str = "Runtime.runIfWaitingForDebugger";
        }

        /// Runs script with given id in a given context.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RunScript {
            /// Id of the script to run.
            pub script_id: types::ScriptId,
            /// Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_id: Option<types::ExecutionContextId>,
            /// Symbolic group name that can be used to release multiple objects.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub object_group: Option<String>,
            /// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub silent: Option<bool>,
            /// Determines whether Command Line API should be available during the evaluation.
            #[serde(skip_serializing_if = "Option::is_none")]
            #[serde(rename = "includeCommandLineAPI")]
            pub include_command_line_api: Option<bool>,
            /// Whether the result is expected to be a JSON object which should be sent by value.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub return_by_value: Option<bool>,
            /// Whether preview should be generated for the result.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub generate_preview: Option<bool>,
            /// Whether execution should `await` for resulting value and return once awaited promise is resolved.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub await_promise: Option<bool>,
        }

        impl RunScript {
            pub fn new(script_id: types::ScriptId) -> Self {
                Self {
                    script_id,
                    execution_context_id: None,
                    object_group: None,
                    silent: None,
                    include_command_line_api: None,
                    return_by_value: None,
                    generate_preview: None,
                    await_promise: None,
                }
            }

            pub fn with_execution_context_id(
                mut self,
                execution_context_id: types::ExecutionContextId,
            ) -> Self {
                self.execution_context_id = Some(execution_context_id);
                self
            }

            pub fn with_object_group(mut self, object_group: impl Into<String>) -> Self {
                self.object_group = Some(object_group.into());
                self
            }

            pub fn with_silent(mut self, silent: bool) -> Self {
                self.silent = Some(silent);
                self
            }

            pub fn with_include_command_line_api(mut self, include_command_line_api: bool) -> Self {
                self.include_command_line_api = Some(include_command_line_api);
                self
            }

            pub fn with_return_by_value(mut self, return_by_value: bool) -> Self {
                self.return_by_value = Some(return_by_value);
                self
            }

            pub fn with_generate_preview(mut self, generate_preview: bool) -> Self {
                self.generate_preview = Some(generate_preview);
                self
            }

            pub fn with_await_promise(mut self, await_promise: bool) -> Self {
                self.await_promise = Some(await_promise);
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::RunScriptResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RunScript {
            type Response = responses::RunScriptResponse;
            const METHOD: &'static str = "Runtime.runScript";
        }

        /// Enables or disables async call stacks tracking.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetAsyncCallStackDepth {
            /// Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).
            pub max_depth: i64,
        }

        impl SetAsyncCallStackDepth {
            pub fn new(max_depth: i64) -> Self {
                Self { max_depth }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetAsyncCallStackDepth {
            type Response = ();
            const METHOD: &'static str = "Runtime.setAsyncCallStackDepth";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetCustomObjectFormatterEnabled {
            pub enabled: bool,
        }

        impl SetCustomObjectFormatterEnabled {
            pub fn new(enabled: bool) -> Self {
                Self { enabled }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetCustomObjectFormatterEnabled {
            type Response = ();
            const METHOD: &'static str = "Runtime.setCustomObjectFormatterEnabled";
        }

        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct SetMaxCallStackSizeToCapture {
            pub size: i64,
        }

        impl SetMaxCallStackSizeToCapture {
            pub fn new(size: i64) -> Self {
                Self { size }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for SetMaxCallStackSizeToCapture {
            type Response = ();
            const METHOD: &'static str = "Runtime.setMaxCallStackSizeToCapture";
        }

        /// Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct TerminateExecution {}

        impl TerminateExecution {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for TerminateExecution {
            type Response = ();
            const METHOD: &'static str = "Runtime.terminateExecution";
        }

        /// If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct AddBinding {
            pub name: String,
            /// If specified, the binding would only be exposed to the specified execution context. If omitted and `executionContextName` is not set, the binding is exposed to all execution contexts of the target. This parameter is mutually exclusive with `executionContextName`. Deprecated in favor of `executionContextName` due to an unclear use case and bugs in implementation (crbug.com/1169639). `executionContextId` will be removed in the future.
            /// **EXPERIMENTAL**
            #[deprecated]
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_id: Option<types::ExecutionContextId>,
            /// If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also `ExecutionContext.name` and `worldName` parameter to `Page.addScriptToEvaluateOnNewDocument`. This parameter is mutually exclusive with `executionContextId`.
            #[serde(skip_serializing_if = "Option::is_none")]
            pub execution_context_name: Option<String>,
        }

        impl AddBinding {
            pub fn new(name: impl Into<String>) -> Self {
                Self {
                    name: name.into(),
                    execution_context_id: None,
                    execution_context_name: None,
                }
            }

            pub fn with_execution_context_id(
                mut self,
                execution_context_id: types::ExecutionContextId,
            ) -> Self {
                self.execution_context_id = Some(execution_context_id);
                self
            }

            pub fn with_execution_context_name(
                mut self,
                execution_context_name: impl Into<String>,
            ) -> Self {
                self.execution_context_name = Some(execution_context_name.into());
                self
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for AddBinding {
            type Response = ();
            const METHOD: &'static str = "Runtime.addBinding";
        }

        /// This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct RemoveBinding {
            pub name: String,
        }

        impl RemoveBinding {
            pub fn new(name: impl Into<String>) -> Self {
                Self { name: name.into() }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<(), crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for RemoveBinding {
            type Response = ();
            const METHOD: &'static str = "Runtime.removeBinding";
        }

        /// This method tries to lookup and populate exception details for a JavaScript Error object. Note that the stackTrace portion of the resulting exceptionDetails will only be populated if the Runtime domain was enabled at the time when the Error was thrown.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetExceptionDetails {
            /// The error object for which to resolve the exception details.
            pub error_object_id: types::RemoteObjectId,
        }

        impl GetExceptionDetails {
            pub fn new(error_object_id: types::RemoteObjectId) -> Self {
                Self { error_object_id }
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetExceptionDetailsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetExceptionDetails {
            type Response = responses::GetExceptionDetailsResponse;
            const METHOD: &'static str = "Runtime.getExceptionDetails";
        }
    }

    /// CDP events for this domain.
    pub mod events {
        use super::super::*;
        use super::types;

        /// Notification is issued every time when binding is called.
        /// **EXPERIMENTAL**: This feature is experimental and may change or be removed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct BindingCalled {
            pub name: String,
            pub payload: String,
            /// Identifier of the context where the call was made.
            pub execution_context_id: types::ExecutionContextId,
        }

        impl BindingCalled {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.bindingCalled")
            }
        }

        /// Issued when console API was called.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ConsoleApiCalled {
            /// Type of the call.
            pub type_: String,
            /// Call arguments.
            pub args: Vec<types::RemoteObject>,
            /// Identifier of the context where the call was made.
            pub execution_context_id: types::ExecutionContextId,
            /// Call timestamp.
            pub timestamp: types::Timestamp,
            /// Stack trace captured when the call was made. The async stack chain is automatically reported for the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
            pub stack_trace: Option<types::StackTrace>,
            /// Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
            /// **EXPERIMENTAL**
            pub context: Option<String>,
        }

        impl ConsoleApiCalled {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.consoleAPICalled")
            }
        }

        /// Issued when unhandled exception was revoked.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExceptionRevoked {
            /// Reason describing why exception was revoked.
            pub reason: String,
            /// The id of revoked exception, as reported in `exceptionThrown`.
            pub exception_id: i64,
        }

        impl ExceptionRevoked {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.exceptionRevoked")
            }
        }

        /// Issued when exception was thrown and unhandled.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExceptionThrown {
            /// Timestamp of the exception.
            pub timestamp: types::Timestamp,
            pub exception_details: types::ExceptionDetails,
        }

        impl ExceptionThrown {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.exceptionThrown")
            }
        }

        /// Issued when new execution context is created.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExecutionContextCreated {
            /// A newly created execution context.
            pub context: types::ExecutionContextDescription,
        }

        impl ExecutionContextCreated {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.executionContextCreated")
            }
        }

        /// Issued when execution context is destroyed.
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExecutionContextDestroyed {
            /// Id of the destroyed context
            #[deprecated]
            pub execution_context_id: types::ExecutionContextId,
            /// Unique Id of the destroyed context
            /// **EXPERIMENTAL**
            pub execution_context_unique_id: String,
        }

        impl ExecutionContextDestroyed {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.executionContextDestroyed")
            }
        }

        /// Issued when all executionContexts were cleared in browser
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct ExecutionContextsCleared {}

        impl ExecutionContextsCleared {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.executionContextsCleared")
            }
        }

        /// Issued when object should be inspected (for example, as a result of inspect() command line API call).
        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct InspectRequested {
            pub object: types::RemoteObject,
            pub hints: serde_json::Value,
            /// Identifier of the context where the call was made.
            /// **EXPERIMENTAL**
            pub execution_context_id: Option<types::ExecutionContextId>,
        }

        impl InspectRequested {
            pub fn subscribe(target: &(impl crate::Sender + Sync)) -> crate::EventStream<Self> {
                target.event_stream("Runtime.inspectRequested")
            }
        }
    }
}

pub mod schema {
    use super::*;

    /// CDP type definitions for this domain.
    pub mod types {
        use super::super::*;

        /// Description of the protocol domain.
        #[derive(Debug, Clone, Serialize, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct Domain {
            /// Domain name.
            pub name: String,
            /// Domain version.
            pub version: String,
        }
    }

    /// Response types returned by methods in this domain.
    pub mod responses {
        use super::super::*;
        use super::types;

        #[derive(Debug, Clone, Deserialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomainsResponse {
            /// List of supported domains.
            pub domains: Vec<types::Domain>,
        }
    }

    /// CDP methods (commands) for this domain.
    pub mod methods {
        use super::super::*;
        use super::responses;
        use super::types;

        /// Returns supported domains.
        #[derive(Debug, Clone, Default, Serialize)]
        #[serde(rename_all = "camelCase")]
        pub struct GetDomains {}

        impl GetDomains {
            pub fn new() -> Self {
                Self {}
            }
            pub async fn send(
                self,
                target: &(impl crate::Sender + Sync),
            ) -> Result<responses::GetDomainsResponse, crate::CdpError> {
                target.send_cmd(self).await
            }
        }

        impl Method for GetDomains {
            type Response = responses::GetDomainsResponse;
            const METHOD: &'static str = "Schema.getDomains";
        }
    }
}
