Skip to main content

rustenium_cdp_definitions/browser_protocol/dom/
commands.rs

1use serde::{Deserialize, Serialize};
2#[doc = "Collects class names for the node with given id and all of it's child nodes.\n[collectClassNamesFromSubtree](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-collectClassNamesFromSubtree)"]
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct CollectClassNamesFromSubtreeParams {
5    #[doc = "Id of the node to collect class names."]
6    #[serde(rename = "nodeId")]
7    pub node_id: Box<super::types::NodeId>,
8}
9impl CollectClassNamesFromSubtreeParams {
10    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
11        Self {
12            node_id: Box::new(node_id.into()),
13        }
14    }
15}
16#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
17pub enum CollectClassNamesFromSubtreeMethod {
18    #[serde(rename = "DOM.collectClassNamesFromSubtree")]
19    CollectClassNamesFromSubtree,
20}
21#[doc = "Collects class names for the node with given id and all of it's child nodes.\n[collectClassNamesFromSubtree](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-collectClassNamesFromSubtree)"]
22#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
23pub struct CollectClassNamesFromSubtree {
24    pub method: CollectClassNamesFromSubtreeMethod,
25    pub params: CollectClassNamesFromSubtreeParams,
26}
27impl CollectClassNamesFromSubtree {
28    pub const IDENTIFIER: &'static str = "DOM.collectClassNamesFromSubtree";
29    pub fn identifier(&self) -> &'static str {
30        Self::IDENTIFIER
31    }
32}
33impl crate::CommandResult for CollectClassNamesFromSubtree {
34    type Result = super::results::CollectClassNamesFromSubtreeResult;
35}
36#[doc = "Creates a deep copy of the specified node and places it into the target container before the\ngiven anchor.\n[copyTo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-copyTo)"]
37#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
38pub struct CopyToParams {
39    #[doc = "Id of the node to copy."]
40    #[serde(rename = "nodeId")]
41    pub node_id: Box<super::types::NodeId>,
42    #[doc = "Id of the element to drop the copy into."]
43    #[serde(rename = "targetNodeId")]
44    pub target_node_id: super::types::NodeId,
45    #[doc = "Drop the copy before this node (if absent, the copy becomes the last child of\n`targetNodeId`)."]
46    #[serde(rename = "insertBeforeNodeId")]
47    #[serde(skip_serializing_if = "Option::is_none")]
48    #[serde(default)]
49    pub insert_before_node_id: Option<super::types::NodeId>,
50}
51impl CopyToParams {
52    pub fn new(
53        node_id: impl Into<super::types::NodeId>,
54        target_node_id: impl Into<super::types::NodeId>,
55    ) -> Self {
56        Self {
57            node_id: Box::new(node_id.into()),
58            target_node_id: target_node_id.into(),
59            insert_before_node_id: None,
60        }
61    }
62}
63#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
64pub enum CopyToMethod {
65    #[serde(rename = "DOM.copyTo")]
66    CopyTo,
67}
68#[doc = "Creates a deep copy of the specified node and places it into the target container before the\ngiven anchor.\n[copyTo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-copyTo)"]
69#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
70pub struct CopyTo {
71    pub method: CopyToMethod,
72    pub params: CopyToParams,
73}
74impl CopyTo {
75    pub const IDENTIFIER: &'static str = "DOM.copyTo";
76    pub fn identifier(&self) -> &'static str {
77        Self::IDENTIFIER
78    }
79}
80impl crate::CommandResult for CopyTo {
81    type Result = super::results::CopyToResult;
82}
83#[doc = "Describes node given its id, does not require domain to be enabled. Does not start tracking any\nobjects, can be used for automation.\n[describeNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-describeNode)"]
84#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
85pub struct DescribeNodeParams {
86    #[doc = "Identifier of the node."]
87    #[serde(rename = "nodeId")]
88    #[serde(skip_serializing_if = "Option::is_none")]
89    #[serde(default)]
90    pub node_id: Option<Box<super::types::NodeId>>,
91    #[doc = "Identifier of the backend node."]
92    #[serde(rename = "backendNodeId")]
93    #[serde(skip_serializing_if = "Option::is_none")]
94    #[serde(default)]
95    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
96    #[doc = "JavaScript object id of the node wrapper."]
97    #[serde(rename = "objectId")]
98    #[serde(skip_serializing_if = "Option::is_none")]
99    #[serde(default)]
100    pub object_id: Option<crate::js_protocol::runtime::types::RemoteObjectId>,
101    #[doc = "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0."]
102    #[serde(rename = "depth")]
103    #[serde(skip_serializing_if = "Option::is_none")]
104    #[serde(default)]
105    pub depth: Option<i64>,
106    #[doc = "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false)."]
107    #[serde(rename = "pierce")]
108    #[serde(skip_serializing_if = "Option::is_none")]
109    #[serde(default)]
110    pub pierce: Option<bool>,
111}
112#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
113pub enum DescribeNodeMethod {
114    #[serde(rename = "DOM.describeNode")]
115    DescribeNode,
116}
117#[doc = "Describes node given its id, does not require domain to be enabled. Does not start tracking any\nobjects, can be used for automation.\n[describeNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-describeNode)"]
118#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
119pub struct DescribeNode {
120    pub method: DescribeNodeMethod,
121    pub params: DescribeNodeParams,
122}
123impl DescribeNode {
124    pub const IDENTIFIER: &'static str = "DOM.describeNode";
125    pub fn identifier(&self) -> &'static str {
126        Self::IDENTIFIER
127    }
128}
129impl crate::CommandResult for DescribeNode {
130    type Result = super::results::DescribeNodeResult;
131}
132#[doc = "Scrolls the specified rect of the given node into view if not already visible.\nNote: exactly one between nodeId, backendNodeId and objectId should be passed\nto identify the node.\n[scrollIntoViewIfNeeded](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-scrollIntoViewIfNeeded)"]
133#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
134pub struct ScrollIntoViewIfNeededParams {
135    #[doc = "Identifier of the node."]
136    #[serde(rename = "nodeId")]
137    #[serde(skip_serializing_if = "Option::is_none")]
138    #[serde(default)]
139    pub node_id: Option<Box<super::types::NodeId>>,
140    #[doc = "Identifier of the backend node."]
141    #[serde(rename = "backendNodeId")]
142    #[serde(skip_serializing_if = "Option::is_none")]
143    #[serde(default)]
144    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
145    #[doc = "JavaScript object id of the node wrapper."]
146    #[serde(rename = "objectId")]
147    #[serde(skip_serializing_if = "Option::is_none")]
148    #[serde(default)]
149    pub object_id: Option<crate::js_protocol::runtime::types::RemoteObjectId>,
150    #[doc = "The rect to be scrolled into view, relative to the node's border box, in CSS pixels.\nWhen omitted, center of the node will be used, similar to Element.scrollIntoView."]
151    #[serde(rename = "rect")]
152    #[serde(skip_serializing_if = "Option::is_none")]
153    #[serde(default)]
154    pub rect: Option<super::types::Rect>,
155}
156#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
157pub enum ScrollIntoViewIfNeededMethod {
158    #[serde(rename = "DOM.scrollIntoViewIfNeeded")]
159    ScrollIntoViewIfNeeded,
160}
161#[doc = "Scrolls the specified rect of the given node into view if not already visible.\nNote: exactly one between nodeId, backendNodeId and objectId should be passed\nto identify the node.\n[scrollIntoViewIfNeeded](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-scrollIntoViewIfNeeded)"]
162#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
163pub struct ScrollIntoViewIfNeeded {
164    pub method: ScrollIntoViewIfNeededMethod,
165    pub params: ScrollIntoViewIfNeededParams,
166}
167impl ScrollIntoViewIfNeeded {
168    pub const IDENTIFIER: &'static str = "DOM.scrollIntoViewIfNeeded";
169    pub fn identifier(&self) -> &'static str {
170        Self::IDENTIFIER
171    }
172}
173impl crate::CommandResult for ScrollIntoViewIfNeeded {
174    type Result = super::results::ScrollIntoViewIfNeededResult;
175}
176#[doc = "Disables DOM agent for the given page.\n[disable](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-disable)"]
177#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
178pub struct DisableParams {}
179#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
180pub enum DisableMethod {
181    #[serde(rename = "DOM.disable")]
182    Disable,
183}
184#[doc = "Disables DOM agent for the given page.\n[disable](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-disable)"]
185#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
186pub struct Disable {
187    pub method: DisableMethod,
188    pub params: DisableParams,
189}
190impl Disable {
191    pub const IDENTIFIER: &'static str = "DOM.disable";
192    pub fn identifier(&self) -> &'static str {
193        Self::IDENTIFIER
194    }
195}
196impl crate::CommandResult for Disable {
197    type Result = super::results::DisableResult;
198}
199#[doc = "Discards search results from the session with the given id. `getSearchResults` should no longer\nbe called for that search.\n[discardSearchResults](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-discardSearchResults)"]
200#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
201pub struct DiscardSearchResultsParams {
202    #[doc = "Unique search session identifier."]
203    #[serde(rename = "searchId")]
204    pub search_id: String,
205}
206impl DiscardSearchResultsParams {
207    pub fn new(search_id: impl Into<String>) -> Self {
208        Self {
209            search_id: search_id.into(),
210        }
211    }
212}
213impl<T: Into<String>> From<T> for DiscardSearchResultsParams {
214    fn from(url: T) -> Self {
215        DiscardSearchResultsParams::new(url)
216    }
217}
218#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
219pub enum DiscardSearchResultsMethod {
220    #[serde(rename = "DOM.discardSearchResults")]
221    DiscardSearchResults,
222}
223#[doc = "Discards search results from the session with the given id. `getSearchResults` should no longer\nbe called for that search.\n[discardSearchResults](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-discardSearchResults)"]
224#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
225pub struct DiscardSearchResults {
226    pub method: DiscardSearchResultsMethod,
227    pub params: DiscardSearchResultsParams,
228}
229impl DiscardSearchResults {
230    pub const IDENTIFIER: &'static str = "DOM.discardSearchResults";
231    pub fn identifier(&self) -> &'static str {
232        Self::IDENTIFIER
233    }
234}
235impl crate::CommandResult for DiscardSearchResults {
236    type Result = super::results::DiscardSearchResultsResult;
237}
238#[doc = "Enables DOM agent for the given page.\n[enable](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-enable)"]
239#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
240pub struct EnableParams {
241    #[doc = "Whether to include whitespaces in the children array of returned Nodes."]
242    #[serde(rename = "includeWhitespace")]
243    #[serde(skip_serializing_if = "Option::is_none")]
244    #[serde(default)]
245    pub include_whitespace: Option<EnableIncludeWhitespace>,
246}
247#[doc = "Whether to include whitespaces in the children array of returned Nodes."]
248#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
249pub enum EnableIncludeWhitespace {
250    #[doc = "Strip whitespaces from child arrays (default)."]
251    #[serde(rename = "none")]
252    None,
253    #[doc = "Return all children including block-level whitespace nodes."]
254    #[serde(rename = "all")]
255    All,
256}
257#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
258pub enum EnableMethod {
259    #[serde(rename = "DOM.enable")]
260    Enable,
261}
262#[doc = "Enables DOM agent for the given page.\n[enable](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-enable)"]
263#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
264pub struct Enable {
265    pub method: EnableMethod,
266    pub params: EnableParams,
267}
268impl Enable {
269    pub const IDENTIFIER: &'static str = "DOM.enable";
270    pub fn identifier(&self) -> &'static str {
271        Self::IDENTIFIER
272    }
273}
274impl crate::CommandResult for Enable {
275    type Result = super::results::EnableResult;
276}
277#[doc = "Focuses the given element.\n[focus](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-focus)"]
278#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
279pub struct FocusParams {
280    #[doc = "Identifier of the node."]
281    #[serde(rename = "nodeId")]
282    #[serde(skip_serializing_if = "Option::is_none")]
283    #[serde(default)]
284    pub node_id: Option<Box<super::types::NodeId>>,
285    #[doc = "Identifier of the backend node."]
286    #[serde(rename = "backendNodeId")]
287    #[serde(skip_serializing_if = "Option::is_none")]
288    #[serde(default)]
289    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
290    #[doc = "JavaScript object id of the node wrapper."]
291    #[serde(rename = "objectId")]
292    #[serde(skip_serializing_if = "Option::is_none")]
293    #[serde(default)]
294    pub object_id: Option<crate::js_protocol::runtime::types::RemoteObjectId>,
295}
296#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
297pub enum FocusMethod {
298    #[serde(rename = "DOM.focus")]
299    Focus,
300}
301#[doc = "Focuses the given element.\n[focus](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-focus)"]
302#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
303pub struct Focus {
304    pub method: FocusMethod,
305    pub params: FocusParams,
306}
307impl Focus {
308    pub const IDENTIFIER: &'static str = "DOM.focus";
309    pub fn identifier(&self) -> &'static str {
310        Self::IDENTIFIER
311    }
312}
313impl crate::CommandResult for Focus {
314    type Result = super::results::FocusResult;
315}
316#[doc = "Returns attributes for the specified node.\n[getAttributes](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getAttributes)"]
317#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
318pub struct GetAttributesParams {
319    #[doc = "Id of the node to retrieve attributes for."]
320    #[serde(rename = "nodeId")]
321    pub node_id: Box<super::types::NodeId>,
322}
323impl GetAttributesParams {
324    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
325        Self {
326            node_id: Box::new(node_id.into()),
327        }
328    }
329}
330#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
331pub enum GetAttributesMethod {
332    #[serde(rename = "DOM.getAttributes")]
333    GetAttributes,
334}
335#[doc = "Returns attributes for the specified node.\n[getAttributes](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getAttributes)"]
336#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
337pub struct GetAttributes {
338    pub method: GetAttributesMethod,
339    pub params: GetAttributesParams,
340}
341impl GetAttributes {
342    pub const IDENTIFIER: &'static str = "DOM.getAttributes";
343    pub fn identifier(&self) -> &'static str {
344        Self::IDENTIFIER
345    }
346}
347impl crate::CommandResult for GetAttributes {
348    type Result = super::results::GetAttributesResult;
349}
350#[doc = "Returns boxes for the given node.\n[getBoxModel](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getBoxModel)"]
351#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
352pub struct GetBoxModelParams {
353    #[doc = "Identifier of the node."]
354    #[serde(rename = "nodeId")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    #[serde(default)]
357    pub node_id: Option<Box<super::types::NodeId>>,
358    #[doc = "Identifier of the backend node."]
359    #[serde(rename = "backendNodeId")]
360    #[serde(skip_serializing_if = "Option::is_none")]
361    #[serde(default)]
362    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
363    #[doc = "JavaScript object id of the node wrapper."]
364    #[serde(rename = "objectId")]
365    #[serde(skip_serializing_if = "Option::is_none")]
366    #[serde(default)]
367    pub object_id: Option<crate::js_protocol::runtime::types::RemoteObjectId>,
368}
369#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
370pub enum GetBoxModelMethod {
371    #[serde(rename = "DOM.getBoxModel")]
372    GetBoxModel,
373}
374#[doc = "Returns boxes for the given node.\n[getBoxModel](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getBoxModel)"]
375#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
376pub struct GetBoxModel {
377    pub method: GetBoxModelMethod,
378    pub params: GetBoxModelParams,
379}
380impl GetBoxModel {
381    pub const IDENTIFIER: &'static str = "DOM.getBoxModel";
382    pub fn identifier(&self) -> &'static str {
383        Self::IDENTIFIER
384    }
385}
386impl crate::CommandResult for GetBoxModel {
387    type Result = super::results::GetBoxModelResult;
388}
389#[doc = "Returns quads that describe node position on the page. This method\nmight return multiple quads for inline nodes.\n[getContentQuads](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getContentQuads)"]
390#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
391pub struct GetContentQuadsParams {
392    #[doc = "Identifier of the node."]
393    #[serde(rename = "nodeId")]
394    #[serde(skip_serializing_if = "Option::is_none")]
395    #[serde(default)]
396    pub node_id: Option<Box<super::types::NodeId>>,
397    #[doc = "Identifier of the backend node."]
398    #[serde(rename = "backendNodeId")]
399    #[serde(skip_serializing_if = "Option::is_none")]
400    #[serde(default)]
401    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
402    #[doc = "JavaScript object id of the node wrapper."]
403    #[serde(rename = "objectId")]
404    #[serde(skip_serializing_if = "Option::is_none")]
405    #[serde(default)]
406    pub object_id: Option<crate::js_protocol::runtime::types::RemoteObjectId>,
407}
408#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
409pub enum GetContentQuadsMethod {
410    #[serde(rename = "DOM.getContentQuads")]
411    GetContentQuads,
412}
413#[doc = "Returns quads that describe node position on the page. This method\nmight return multiple quads for inline nodes.\n[getContentQuads](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getContentQuads)"]
414#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
415pub struct GetContentQuads {
416    pub method: GetContentQuadsMethod,
417    pub params: GetContentQuadsParams,
418}
419impl GetContentQuads {
420    pub const IDENTIFIER: &'static str = "DOM.getContentQuads";
421    pub fn identifier(&self) -> &'static str {
422        Self::IDENTIFIER
423    }
424}
425impl crate::CommandResult for GetContentQuads {
426    type Result = super::results::GetContentQuadsResult;
427}
428#[doc = "Returns the root DOM node (and optionally the subtree) to the caller.\nImplicitly enables the DOM domain events for the current target.\n[getDocument](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getDocument)"]
429#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
430pub struct GetDocumentParams {
431    #[doc = "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0."]
432    #[serde(rename = "depth")]
433    #[serde(skip_serializing_if = "Option::is_none")]
434    #[serde(default)]
435    pub depth: Option<i64>,
436    #[doc = "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false)."]
437    #[serde(rename = "pierce")]
438    #[serde(skip_serializing_if = "Option::is_none")]
439    #[serde(default)]
440    pub pierce: Option<bool>,
441}
442#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
443pub enum GetDocumentMethod {
444    #[serde(rename = "DOM.getDocument")]
445    GetDocument,
446}
447#[doc = "Returns the root DOM node (and optionally the subtree) to the caller.\nImplicitly enables the DOM domain events for the current target.\n[getDocument](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getDocument)"]
448#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
449pub struct GetDocument {
450    pub method: GetDocumentMethod,
451    pub params: GetDocumentParams,
452}
453impl GetDocument {
454    pub const IDENTIFIER: &'static str = "DOM.getDocument";
455    pub fn identifier(&self) -> &'static str {
456        Self::IDENTIFIER
457    }
458}
459impl crate::CommandResult for GetDocument {
460    type Result = super::results::GetDocumentResult;
461}
462#[doc = "Finds nodes with a given computed style in a subtree.\n[getNodesForSubtreeByStyle](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getNodesForSubtreeByStyle)"]
463#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
464pub struct GetNodesForSubtreeByStyleParams {
465    #[doc = "Node ID pointing to the root of a subtree."]
466    #[serde(rename = "nodeId")]
467    pub node_id: Box<super::types::NodeId>,
468    #[doc = "The style to filter nodes by (includes nodes if any of properties matches)."]
469    #[serde(rename = "computedStyles")]
470    #[serde(skip_serializing_if = "Vec::is_empty")]
471    pub computed_styles: Vec<super::types::CssComputedStyleProperty>,
472    #[doc = "Whether or not iframes and shadow roots in the same target should be traversed when returning the\nresults (default is false)."]
473    #[serde(rename = "pierce")]
474    #[serde(skip_serializing_if = "Option::is_none")]
475    #[serde(default)]
476    pub pierce: Option<bool>,
477}
478impl GetNodesForSubtreeByStyleParams {
479    pub fn new(
480        node_id: impl Into<super::types::NodeId>,
481        computed_styles: Vec<super::types::CssComputedStyleProperty>,
482    ) -> Self {
483        Self {
484            node_id: Box::new(node_id.into()),
485            computed_styles,
486            pierce: None,
487        }
488    }
489}
490#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
491pub enum GetNodesForSubtreeByStyleMethod {
492    #[serde(rename = "DOM.getNodesForSubtreeByStyle")]
493    GetNodesForSubtreeByStyle,
494}
495#[doc = "Finds nodes with a given computed style in a subtree.\n[getNodesForSubtreeByStyle](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getNodesForSubtreeByStyle)"]
496#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
497pub struct GetNodesForSubtreeByStyle {
498    pub method: GetNodesForSubtreeByStyleMethod,
499    pub params: GetNodesForSubtreeByStyleParams,
500}
501impl GetNodesForSubtreeByStyle {
502    pub const IDENTIFIER: &'static str = "DOM.getNodesForSubtreeByStyle";
503    pub fn identifier(&self) -> &'static str {
504        Self::IDENTIFIER
505    }
506}
507impl crate::CommandResult for GetNodesForSubtreeByStyle {
508    type Result = super::results::GetNodesForSubtreeByStyleResult;
509}
510#[doc = "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is\neither returned or not.\n[getNodeForLocation](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getNodeForLocation)"]
511#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
512pub struct GetNodeForLocationParams {
513    #[doc = "X coordinate."]
514    #[serde(rename = "x")]
515    pub x: i64,
516    #[doc = "Y coordinate."]
517    #[serde(rename = "y")]
518    pub y: i64,
519    #[doc = "False to skip to the nearest non-UA shadow root ancestor (default: false)."]
520    #[serde(rename = "includeUserAgentShadowDOM")]
521    #[serde(skip_serializing_if = "Option::is_none")]
522    #[serde(default)]
523    pub include_user_agent_shadow_dom: Option<bool>,
524    #[doc = "Whether to ignore pointer-events: none on elements and hit test them."]
525    #[serde(rename = "ignorePointerEventsNone")]
526    #[serde(skip_serializing_if = "Option::is_none")]
527    #[serde(default)]
528    pub ignore_pointer_events_none: Option<bool>,
529}
530impl GetNodeForLocationParams {
531    pub fn new(x: impl Into<i64>, y: impl Into<i64>) -> Self {
532        Self {
533            x: x.into(),
534            y: y.into(),
535            include_user_agent_shadow_dom: None,
536            ignore_pointer_events_none: None,
537        }
538    }
539}
540#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
541pub enum GetNodeForLocationMethod {
542    #[serde(rename = "DOM.getNodeForLocation")]
543    GetNodeForLocation,
544}
545#[doc = "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is\neither returned or not.\n[getNodeForLocation](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getNodeForLocation)"]
546#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
547pub struct GetNodeForLocation {
548    pub method: GetNodeForLocationMethod,
549    pub params: GetNodeForLocationParams,
550}
551impl GetNodeForLocation {
552    pub const IDENTIFIER: &'static str = "DOM.getNodeForLocation";
553    pub fn identifier(&self) -> &'static str {
554        Self::IDENTIFIER
555    }
556}
557impl crate::CommandResult for GetNodeForLocation {
558    type Result = super::results::GetNodeForLocationResult;
559}
560#[doc = "Returns node's HTML markup.\n[getOuterHTML](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getOuterHTML)"]
561#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
562pub struct GetOuterHtmlParams {
563    #[doc = "Identifier of the node."]
564    #[serde(rename = "nodeId")]
565    #[serde(skip_serializing_if = "Option::is_none")]
566    #[serde(default)]
567    pub node_id: Option<Box<super::types::NodeId>>,
568    #[doc = "Identifier of the backend node."]
569    #[serde(rename = "backendNodeId")]
570    #[serde(skip_serializing_if = "Option::is_none")]
571    #[serde(default)]
572    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
573    #[doc = "JavaScript object id of the node wrapper."]
574    #[serde(rename = "objectId")]
575    #[serde(skip_serializing_if = "Option::is_none")]
576    #[serde(default)]
577    pub object_id: Option<crate::js_protocol::runtime::types::RemoteObjectId>,
578    #[doc = "Include all shadow roots. Equals to false if not specified."]
579    #[serde(rename = "includeShadowDOM")]
580    #[serde(skip_serializing_if = "Option::is_none")]
581    #[serde(default)]
582    pub include_shadow_dom: Option<bool>,
583}
584#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
585pub enum GetOuterHtmlMethod {
586    #[serde(rename = "DOM.getOuterHTML")]
587    GetOuterHtml,
588}
589#[doc = "Returns node's HTML markup.\n[getOuterHTML](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getOuterHTML)"]
590#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
591pub struct GetOuterHtml {
592    pub method: GetOuterHtmlMethod,
593    pub params: GetOuterHtmlParams,
594}
595impl GetOuterHtml {
596    pub const IDENTIFIER: &'static str = "DOM.getOuterHTML";
597    pub fn identifier(&self) -> &'static str {
598        Self::IDENTIFIER
599    }
600}
601impl crate::CommandResult for GetOuterHtml {
602    type Result = super::results::GetOuterHtmlResult;
603}
604#[doc = "Returns the id of the nearest ancestor that is a relayout boundary.\n[getRelayoutBoundary](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getRelayoutBoundary)"]
605#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
606pub struct GetRelayoutBoundaryParams {
607    #[doc = "Id of the node."]
608    #[serde(rename = "nodeId")]
609    pub node_id: Box<super::types::NodeId>,
610}
611impl GetRelayoutBoundaryParams {
612    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
613        Self {
614            node_id: Box::new(node_id.into()),
615        }
616    }
617}
618#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
619pub enum GetRelayoutBoundaryMethod {
620    #[serde(rename = "DOM.getRelayoutBoundary")]
621    GetRelayoutBoundary,
622}
623#[doc = "Returns the id of the nearest ancestor that is a relayout boundary.\n[getRelayoutBoundary](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getRelayoutBoundary)"]
624#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
625pub struct GetRelayoutBoundary {
626    pub method: GetRelayoutBoundaryMethod,
627    pub params: GetRelayoutBoundaryParams,
628}
629impl GetRelayoutBoundary {
630    pub const IDENTIFIER: &'static str = "DOM.getRelayoutBoundary";
631    pub fn identifier(&self) -> &'static str {
632        Self::IDENTIFIER
633    }
634}
635impl crate::CommandResult for GetRelayoutBoundary {
636    type Result = super::results::GetRelayoutBoundaryResult;
637}
638#[doc = "Returns search results from given `fromIndex` to given `toIndex` from the search with the given\nidentifier.\n[getSearchResults](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getSearchResults)"]
639#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
640pub struct GetSearchResultsParams {
641    #[doc = "Unique search session identifier."]
642    #[serde(rename = "searchId")]
643    pub search_id: String,
644    #[doc = "Start index of the search result to be returned."]
645    #[serde(rename = "fromIndex")]
646    pub from_index: i64,
647    #[doc = "End index of the search result to be returned."]
648    #[serde(rename = "toIndex")]
649    pub to_index: i64,
650}
651impl GetSearchResultsParams {
652    pub fn new(
653        search_id: impl Into<String>,
654        from_index: impl Into<i64>,
655        to_index: impl Into<i64>,
656    ) -> Self {
657        Self {
658            search_id: search_id.into(),
659            from_index: from_index.into(),
660            to_index: to_index.into(),
661        }
662    }
663}
664#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
665pub enum GetSearchResultsMethod {
666    #[serde(rename = "DOM.getSearchResults")]
667    GetSearchResults,
668}
669#[doc = "Returns search results from given `fromIndex` to given `toIndex` from the search with the given\nidentifier.\n[getSearchResults](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getSearchResults)"]
670#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
671pub struct GetSearchResults {
672    pub method: GetSearchResultsMethod,
673    pub params: GetSearchResultsParams,
674}
675impl GetSearchResults {
676    pub const IDENTIFIER: &'static str = "DOM.getSearchResults";
677    pub fn identifier(&self) -> &'static str {
678        Self::IDENTIFIER
679    }
680}
681impl crate::CommandResult for GetSearchResults {
682    type Result = super::results::GetSearchResultsResult;
683}
684#[doc = "Hides any highlight.\n[hideHighlight](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-hideHighlight)"]
685#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
686pub struct HideHighlightParams {}
687#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
688pub enum HideHighlightMethod {
689    #[serde(rename = "DOM.hideHighlight")]
690    HideHighlight,
691}
692#[doc = "Hides any highlight.\n[hideHighlight](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-hideHighlight)"]
693#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
694pub struct HideHighlight {
695    pub method: HideHighlightMethod,
696    pub params: HideHighlightParams,
697}
698impl HideHighlight {
699    pub const IDENTIFIER: &'static str = "DOM.hideHighlight";
700    pub fn identifier(&self) -> &'static str {
701        Self::IDENTIFIER
702    }
703}
704impl crate::CommandResult for HideHighlight {
705    type Result = super::results::HideHighlightResult;
706}
707#[doc = "Highlights DOM node.\n[highlightNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-highlightNode)"]
708#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
709pub struct HighlightNodeParams {}
710#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
711pub enum HighlightNodeMethod {
712    #[serde(rename = "DOM.highlightNode")]
713    HighlightNode,
714}
715#[doc = "Highlights DOM node.\n[highlightNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-highlightNode)"]
716#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
717pub struct HighlightNode {
718    pub method: HighlightNodeMethod,
719    pub params: HighlightNodeParams,
720}
721impl HighlightNode {
722    pub const IDENTIFIER: &'static str = "DOM.highlightNode";
723    pub fn identifier(&self) -> &'static str {
724        Self::IDENTIFIER
725    }
726}
727impl crate::CommandResult for HighlightNode {
728    type Result = super::results::HighlightNodeResult;
729}
730#[doc = "Highlights given rectangle.\n[highlightRect](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-highlightRect)"]
731#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
732pub struct HighlightRectParams {}
733#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
734pub enum HighlightRectMethod {
735    #[serde(rename = "DOM.highlightRect")]
736    HighlightRect,
737}
738#[doc = "Highlights given rectangle.\n[highlightRect](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-highlightRect)"]
739#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
740pub struct HighlightRect {
741    pub method: HighlightRectMethod,
742    pub params: HighlightRectParams,
743}
744impl HighlightRect {
745    pub const IDENTIFIER: &'static str = "DOM.highlightRect";
746    pub fn identifier(&self) -> &'static str {
747        Self::IDENTIFIER
748    }
749}
750impl crate::CommandResult for HighlightRect {
751    type Result = super::results::HighlightRectResult;
752}
753#[doc = "Marks last undoable state.\n[markUndoableState](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-markUndoableState)"]
754#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
755pub struct MarkUndoableStateParams {}
756#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
757pub enum MarkUndoableStateMethod {
758    #[serde(rename = "DOM.markUndoableState")]
759    MarkUndoableState,
760}
761#[doc = "Marks last undoable state.\n[markUndoableState](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-markUndoableState)"]
762#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
763pub struct MarkUndoableState {
764    pub method: MarkUndoableStateMethod,
765    pub params: MarkUndoableStateParams,
766}
767impl MarkUndoableState {
768    pub const IDENTIFIER: &'static str = "DOM.markUndoableState";
769    pub fn identifier(&self) -> &'static str {
770        Self::IDENTIFIER
771    }
772}
773impl crate::CommandResult for MarkUndoableState {
774    type Result = super::results::MarkUndoableStateResult;
775}
776#[doc = "Moves node into the new container, places it before the given anchor.\n[moveTo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-moveTo)"]
777#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
778pub struct MoveToParams {
779    #[doc = "Id of the node to move."]
780    #[serde(rename = "nodeId")]
781    pub node_id: Box<super::types::NodeId>,
782    #[doc = "Id of the element to drop the moved node into."]
783    #[serde(rename = "targetNodeId")]
784    pub target_node_id: super::types::NodeId,
785    #[doc = "Drop node before this one (if absent, the moved node becomes the last child of\n`targetNodeId`)."]
786    #[serde(rename = "insertBeforeNodeId")]
787    #[serde(skip_serializing_if = "Option::is_none")]
788    #[serde(default)]
789    pub insert_before_node_id: Option<super::types::NodeId>,
790}
791impl MoveToParams {
792    pub fn new(
793        node_id: impl Into<super::types::NodeId>,
794        target_node_id: impl Into<super::types::NodeId>,
795    ) -> Self {
796        Self {
797            node_id: Box::new(node_id.into()),
798            target_node_id: target_node_id.into(),
799            insert_before_node_id: None,
800        }
801    }
802}
803#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
804pub enum MoveToMethod {
805    #[serde(rename = "DOM.moveTo")]
806    MoveTo,
807}
808#[doc = "Moves node into the new container, places it before the given anchor.\n[moveTo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-moveTo)"]
809#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
810pub struct MoveTo {
811    pub method: MoveToMethod,
812    pub params: MoveToParams,
813}
814impl MoveTo {
815    pub const IDENTIFIER: &'static str = "DOM.moveTo";
816    pub fn identifier(&self) -> &'static str {
817        Self::IDENTIFIER
818    }
819}
820impl crate::CommandResult for MoveTo {
821    type Result = super::results::MoveToResult;
822}
823#[doc = "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or\n`cancelSearch` to end this search session.\n[performSearch](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-performSearch)"]
824#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
825pub struct PerformSearchParams {
826    #[doc = "Plain text or query selector or XPath search query."]
827    #[serde(rename = "query")]
828    pub query: String,
829    #[doc = "True to search in user agent shadow DOM."]
830    #[serde(rename = "includeUserAgentShadowDOM")]
831    #[serde(skip_serializing_if = "Option::is_none")]
832    #[serde(default)]
833    pub include_user_agent_shadow_dom: Option<bool>,
834}
835impl PerformSearchParams {
836    pub fn new(query: impl Into<String>) -> Self {
837        Self {
838            query: query.into(),
839            include_user_agent_shadow_dom: None,
840        }
841    }
842}
843impl<T: Into<String>> From<T> for PerformSearchParams {
844    fn from(url: T) -> Self {
845        PerformSearchParams::new(url)
846    }
847}
848#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
849pub enum PerformSearchMethod {
850    #[serde(rename = "DOM.performSearch")]
851    PerformSearch,
852}
853#[doc = "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or\n`cancelSearch` to end this search session.\n[performSearch](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-performSearch)"]
854#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
855pub struct PerformSearch {
856    pub method: PerformSearchMethod,
857    pub params: PerformSearchParams,
858}
859impl PerformSearch {
860    pub const IDENTIFIER: &'static str = "DOM.performSearch";
861    pub fn identifier(&self) -> &'static str {
862        Self::IDENTIFIER
863    }
864}
865impl crate::CommandResult for PerformSearch {
866    type Result = super::results::PerformSearchResult;
867}
868#[doc = "Requests that the node is sent to the caller given its path. // FIXME, use XPath\n[pushNodeByPathToFrontend](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-pushNodeByPathToFrontend)"]
869#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
870pub struct PushNodeByPathToFrontendParams {
871    #[doc = "Path to node in the proprietary format."]
872    #[serde(rename = "path")]
873    pub path: String,
874}
875impl PushNodeByPathToFrontendParams {
876    pub fn new(path: impl Into<String>) -> Self {
877        Self { path: path.into() }
878    }
879}
880impl<T: Into<String>> From<T> for PushNodeByPathToFrontendParams {
881    fn from(url: T) -> Self {
882        PushNodeByPathToFrontendParams::new(url)
883    }
884}
885#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
886pub enum PushNodeByPathToFrontendMethod {
887    #[serde(rename = "DOM.pushNodeByPathToFrontend")]
888    PushNodeByPathToFrontend,
889}
890#[doc = "Requests that the node is sent to the caller given its path. // FIXME, use XPath\n[pushNodeByPathToFrontend](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-pushNodeByPathToFrontend)"]
891#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
892pub struct PushNodeByPathToFrontend {
893    pub method: PushNodeByPathToFrontendMethod,
894    pub params: PushNodeByPathToFrontendParams,
895}
896impl PushNodeByPathToFrontend {
897    pub const IDENTIFIER: &'static str = "DOM.pushNodeByPathToFrontend";
898    pub fn identifier(&self) -> &'static str {
899        Self::IDENTIFIER
900    }
901}
902impl crate::CommandResult for PushNodeByPathToFrontend {
903    type Result = super::results::PushNodeByPathToFrontendResult;
904}
905#[doc = "Requests that a batch of nodes is sent to the caller given their backend node ids.\n[pushNodesByBackendIdsToFrontend](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-pushNodesByBackendIdsToFrontend)"]
906#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
907pub struct PushNodesByBackendIdsToFrontendParams {
908    #[doc = "The array of backend node ids."]
909    #[serde(rename = "backendNodeIds")]
910    #[serde(skip_serializing_if = "Vec::is_empty")]
911    pub backend_node_ids: Vec<super::types::BackendNodeId>,
912}
913impl PushNodesByBackendIdsToFrontendParams {
914    pub fn new(backend_node_ids: Vec<super::types::BackendNodeId>) -> Self {
915        Self { backend_node_ids }
916    }
917}
918#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
919pub enum PushNodesByBackendIdsToFrontendMethod {
920    #[serde(rename = "DOM.pushNodesByBackendIdsToFrontend")]
921    PushNodesByBackendIdsToFrontend,
922}
923#[doc = "Requests that a batch of nodes is sent to the caller given their backend node ids.\n[pushNodesByBackendIdsToFrontend](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-pushNodesByBackendIdsToFrontend)"]
924#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
925pub struct PushNodesByBackendIdsToFrontend {
926    pub method: PushNodesByBackendIdsToFrontendMethod,
927    pub params: PushNodesByBackendIdsToFrontendParams,
928}
929impl PushNodesByBackendIdsToFrontend {
930    pub const IDENTIFIER: &'static str = "DOM.pushNodesByBackendIdsToFrontend";
931    pub fn identifier(&self) -> &'static str {
932        Self::IDENTIFIER
933    }
934}
935impl crate::CommandResult for PushNodesByBackendIdsToFrontend {
936    type Result = super::results::PushNodesByBackendIdsToFrontendResult;
937}
938#[doc = "Executes `querySelector` on a given node.\n[querySelector](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-querySelector)"]
939#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
940pub struct QuerySelectorParams {
941    #[doc = "Id of the node to query upon."]
942    #[serde(rename = "nodeId")]
943    pub node_id: Box<super::types::NodeId>,
944    #[doc = "Selector string."]
945    #[serde(rename = "selector")]
946    pub selector: String,
947}
948impl QuerySelectorParams {
949    pub fn new(node_id: impl Into<super::types::NodeId>, selector: impl Into<String>) -> Self {
950        Self {
951            node_id: Box::new(node_id.into()),
952            selector: selector.into(),
953        }
954    }
955}
956#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
957pub enum QuerySelectorMethod {
958    #[serde(rename = "DOM.querySelector")]
959    QuerySelector,
960}
961#[doc = "Executes `querySelector` on a given node.\n[querySelector](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-querySelector)"]
962#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
963pub struct QuerySelector {
964    pub method: QuerySelectorMethod,
965    pub params: QuerySelectorParams,
966}
967impl QuerySelector {
968    pub const IDENTIFIER: &'static str = "DOM.querySelector";
969    pub fn identifier(&self) -> &'static str {
970        Self::IDENTIFIER
971    }
972}
973impl crate::CommandResult for QuerySelector {
974    type Result = super::results::QuerySelectorResult;
975}
976#[doc = "Executes `querySelectorAll` on a given node.\n[querySelectorAll](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-querySelectorAll)"]
977#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
978pub struct QuerySelectorAllParams {
979    #[doc = "Id of the node to query upon."]
980    #[serde(rename = "nodeId")]
981    pub node_id: Box<super::types::NodeId>,
982    #[doc = "Selector string."]
983    #[serde(rename = "selector")]
984    pub selector: String,
985}
986impl QuerySelectorAllParams {
987    pub fn new(node_id: impl Into<super::types::NodeId>, selector: impl Into<String>) -> Self {
988        Self {
989            node_id: Box::new(node_id.into()),
990            selector: selector.into(),
991        }
992    }
993}
994#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
995pub enum QuerySelectorAllMethod {
996    #[serde(rename = "DOM.querySelectorAll")]
997    QuerySelectorAll,
998}
999#[doc = "Executes `querySelectorAll` on a given node.\n[querySelectorAll](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-querySelectorAll)"]
1000#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1001pub struct QuerySelectorAll {
1002    pub method: QuerySelectorAllMethod,
1003    pub params: QuerySelectorAllParams,
1004}
1005impl QuerySelectorAll {
1006    pub const IDENTIFIER: &'static str = "DOM.querySelectorAll";
1007    pub fn identifier(&self) -> &'static str {
1008        Self::IDENTIFIER
1009    }
1010}
1011impl crate::CommandResult for QuerySelectorAll {
1012    type Result = super::results::QuerySelectorAllResult;
1013}
1014#[doc = "Returns NodeIds of current top layer elements.\nTop layer is rendered closest to the user within a viewport, therefore its elements always\nappear on top of all other content.\n[getTopLayerElements](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getTopLayerElements)"]
1015#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1016pub struct GetTopLayerElementsParams {}
1017#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1018pub enum GetTopLayerElementsMethod {
1019    #[serde(rename = "DOM.getTopLayerElements")]
1020    GetTopLayerElements,
1021}
1022#[doc = "Returns NodeIds of current top layer elements.\nTop layer is rendered closest to the user within a viewport, therefore its elements always\nappear on top of all other content.\n[getTopLayerElements](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getTopLayerElements)"]
1023#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1024pub struct GetTopLayerElements {
1025    pub method: GetTopLayerElementsMethod,
1026    pub params: GetTopLayerElementsParams,
1027}
1028impl GetTopLayerElements {
1029    pub const IDENTIFIER: &'static str = "DOM.getTopLayerElements";
1030    pub fn identifier(&self) -> &'static str {
1031        Self::IDENTIFIER
1032    }
1033}
1034impl crate::CommandResult for GetTopLayerElements {
1035    type Result = super::results::GetTopLayerElementsResult;
1036}
1037#[doc = "Returns the NodeId of the matched element according to certain relations.\n[getElementByRelation](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getElementByRelation)"]
1038#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1039pub struct GetElementByRelationParams {
1040    #[doc = "Id of the node from which to query the relation."]
1041    #[serde(rename = "nodeId")]
1042    pub node_id: Box<super::types::NodeId>,
1043    #[doc = "Type of relation to get."]
1044    #[serde(rename = "relation")]
1045    pub relation: GetElementByRelationRelation,
1046}
1047#[doc = "Type of relation to get."]
1048#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1049pub enum GetElementByRelationRelation {
1050    #[doc = "Get the popover target for a given element. In this case, this given\nelement can only be an HTMLFormControlElement (<input>, <button>)."]
1051    #[serde(rename = "PopoverTarget")]
1052    PopoverTarget,
1053    #[doc = "Get the interestfor target (the attribute used to be named\n`interesttarget`) for for a given element."]
1054    #[serde(rename = "InterestTarget")]
1055    InterestTarget,
1056    #[doc = "Get the commandfor target for a given element. In this case, this given\nelement can only be an HTMLButtonElement."]
1057    #[serde(rename = "CommandFor")]
1058    CommandFor,
1059}
1060impl GetElementByRelationParams {
1061    pub fn new(
1062        node_id: impl Into<super::types::NodeId>,
1063        relation: impl Into<GetElementByRelationRelation>,
1064    ) -> Self {
1065        Self {
1066            node_id: Box::new(node_id.into()),
1067            relation: relation.into(),
1068        }
1069    }
1070}
1071#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1072pub enum GetElementByRelationMethod {
1073    #[serde(rename = "DOM.getElementByRelation")]
1074    GetElementByRelation,
1075}
1076#[doc = "Returns the NodeId of the matched element according to certain relations.\n[getElementByRelation](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getElementByRelation)"]
1077#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1078pub struct GetElementByRelation {
1079    pub method: GetElementByRelationMethod,
1080    pub params: GetElementByRelationParams,
1081}
1082impl GetElementByRelation {
1083    pub const IDENTIFIER: &'static str = "DOM.getElementByRelation";
1084    pub fn identifier(&self) -> &'static str {
1085        Self::IDENTIFIER
1086    }
1087}
1088impl crate::CommandResult for GetElementByRelation {
1089    type Result = super::results::GetElementByRelationResult;
1090}
1091#[doc = "Re-does the last undone action.\n[redo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-redo)"]
1092#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1093pub struct RedoParams {}
1094#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1095pub enum RedoMethod {
1096    #[serde(rename = "DOM.redo")]
1097    Redo,
1098}
1099#[doc = "Re-does the last undone action.\n[redo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-redo)"]
1100#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1101pub struct Redo {
1102    pub method: RedoMethod,
1103    pub params: RedoParams,
1104}
1105impl Redo {
1106    pub const IDENTIFIER: &'static str = "DOM.redo";
1107    pub fn identifier(&self) -> &'static str {
1108        Self::IDENTIFIER
1109    }
1110}
1111impl crate::CommandResult for Redo {
1112    type Result = super::results::RedoResult;
1113}
1114#[doc = "Removes attribute with given name from an element with given id.\n[removeAttribute](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-removeAttribute)"]
1115#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1116pub struct RemoveAttributeParams {
1117    #[doc = "Id of the element to remove attribute from."]
1118    #[serde(rename = "nodeId")]
1119    pub node_id: Box<super::types::NodeId>,
1120    #[doc = "Name of the attribute to remove."]
1121    #[serde(rename = "name")]
1122    pub name: String,
1123}
1124impl RemoveAttributeParams {
1125    pub fn new(node_id: impl Into<super::types::NodeId>, name: impl Into<String>) -> Self {
1126        Self {
1127            node_id: Box::new(node_id.into()),
1128            name: name.into(),
1129        }
1130    }
1131}
1132#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1133pub enum RemoveAttributeMethod {
1134    #[serde(rename = "DOM.removeAttribute")]
1135    RemoveAttribute,
1136}
1137#[doc = "Removes attribute with given name from an element with given id.\n[removeAttribute](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-removeAttribute)"]
1138#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1139pub struct RemoveAttribute {
1140    pub method: RemoveAttributeMethod,
1141    pub params: RemoveAttributeParams,
1142}
1143impl RemoveAttribute {
1144    pub const IDENTIFIER: &'static str = "DOM.removeAttribute";
1145    pub fn identifier(&self) -> &'static str {
1146        Self::IDENTIFIER
1147    }
1148}
1149impl crate::CommandResult for RemoveAttribute {
1150    type Result = super::results::RemoveAttributeResult;
1151}
1152#[doc = "Removes node with given id.\n[removeNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-removeNode)"]
1153#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1154pub struct RemoveNodeParams {
1155    #[doc = "Id of the node to remove."]
1156    #[serde(rename = "nodeId")]
1157    pub node_id: Box<super::types::NodeId>,
1158}
1159impl RemoveNodeParams {
1160    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
1161        Self {
1162            node_id: Box::new(node_id.into()),
1163        }
1164    }
1165}
1166#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1167pub enum RemoveNodeMethod {
1168    #[serde(rename = "DOM.removeNode")]
1169    RemoveNode,
1170}
1171#[doc = "Removes node with given id.\n[removeNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-removeNode)"]
1172#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1173pub struct RemoveNode {
1174    pub method: RemoveNodeMethod,
1175    pub params: RemoveNodeParams,
1176}
1177impl RemoveNode {
1178    pub const IDENTIFIER: &'static str = "DOM.removeNode";
1179    pub fn identifier(&self) -> &'static str {
1180        Self::IDENTIFIER
1181    }
1182}
1183impl crate::CommandResult for RemoveNode {
1184    type Result = super::results::RemoveNodeResult;
1185}
1186#[doc = "Requests that children of the node with given id are returned to the caller in form of\n`setChildNodes` events where not only immediate children are retrieved, but all children down to\nthe specified depth.\n[requestChildNodes](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-requestChildNodes)"]
1187#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1188pub struct RequestChildNodesParams {
1189    #[doc = "Id of the node to get children for."]
1190    #[serde(rename = "nodeId")]
1191    pub node_id: Box<super::types::NodeId>,
1192    #[doc = "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0."]
1193    #[serde(rename = "depth")]
1194    #[serde(skip_serializing_if = "Option::is_none")]
1195    #[serde(default)]
1196    pub depth: Option<i64>,
1197    #[doc = "Whether or not iframes and shadow roots should be traversed when returning the sub-tree\n(default is false)."]
1198    #[serde(rename = "pierce")]
1199    #[serde(skip_serializing_if = "Option::is_none")]
1200    #[serde(default)]
1201    pub pierce: Option<bool>,
1202}
1203impl RequestChildNodesParams {
1204    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
1205        Self {
1206            node_id: Box::new(node_id.into()),
1207            depth: None,
1208            pierce: None,
1209        }
1210    }
1211}
1212#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1213pub enum RequestChildNodesMethod {
1214    #[serde(rename = "DOM.requestChildNodes")]
1215    RequestChildNodes,
1216}
1217#[doc = "Requests that children of the node with given id are returned to the caller in form of\n`setChildNodes` events where not only immediate children are retrieved, but all children down to\nthe specified depth.\n[requestChildNodes](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-requestChildNodes)"]
1218#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1219pub struct RequestChildNodes {
1220    pub method: RequestChildNodesMethod,
1221    pub params: RequestChildNodesParams,
1222}
1223impl RequestChildNodes {
1224    pub const IDENTIFIER: &'static str = "DOM.requestChildNodes";
1225    pub fn identifier(&self) -> &'static str {
1226        Self::IDENTIFIER
1227    }
1228}
1229impl crate::CommandResult for RequestChildNodes {
1230    type Result = super::results::RequestChildNodesResult;
1231}
1232#[doc = "Requests that the node is sent to the caller given the JavaScript node object reference. All\nnodes that form the path from the node to the root are also sent to the client as a series of\n`setChildNodes` notifications.\n[requestNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-requestNode)"]
1233#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1234pub struct RequestNodeParams {
1235    #[doc = "JavaScript object id to convert into node."]
1236    #[serde(rename = "objectId")]
1237    pub object_id: crate::js_protocol::runtime::types::RemoteObjectId,
1238}
1239impl RequestNodeParams {
1240    pub fn new(object_id: impl Into<crate::js_protocol::runtime::types::RemoteObjectId>) -> Self {
1241        Self {
1242            object_id: object_id.into(),
1243        }
1244    }
1245}
1246#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1247pub enum RequestNodeMethod {
1248    #[serde(rename = "DOM.requestNode")]
1249    RequestNode,
1250}
1251#[doc = "Requests that the node is sent to the caller given the JavaScript node object reference. All\nnodes that form the path from the node to the root are also sent to the client as a series of\n`setChildNodes` notifications.\n[requestNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-requestNode)"]
1252#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1253pub struct RequestNode {
1254    pub method: RequestNodeMethod,
1255    pub params: RequestNodeParams,
1256}
1257impl RequestNode {
1258    pub const IDENTIFIER: &'static str = "DOM.requestNode";
1259    pub fn identifier(&self) -> &'static str {
1260        Self::IDENTIFIER
1261    }
1262}
1263impl crate::CommandResult for RequestNode {
1264    type Result = super::results::RequestNodeResult;
1265}
1266#[doc = "Resolves the JavaScript node object for a given NodeId or BackendNodeId.\n[resolveNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-resolveNode)"]
1267#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
1268pub struct ResolveNodeParams {
1269    #[doc = "Id of the node to resolve."]
1270    #[serde(rename = "nodeId")]
1271    #[serde(skip_serializing_if = "Option::is_none")]
1272    #[serde(default)]
1273    pub node_id: Option<Box<super::types::NodeId>>,
1274    #[doc = "Backend identifier of the node to resolve."]
1275    #[serde(rename = "backendNodeId")]
1276    #[serde(skip_serializing_if = "Option::is_none")]
1277    #[serde(default)]
1278    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
1279    #[doc = "Symbolic group name that can be used to release multiple objects."]
1280    #[serde(rename = "objectGroup")]
1281    #[serde(skip_serializing_if = "Option::is_none")]
1282    #[serde(default)]
1283    pub object_group: Option<String>,
1284    #[doc = "Execution context in which to resolve the node."]
1285    #[serde(rename = "executionContextId")]
1286    #[serde(skip_serializing_if = "Option::is_none")]
1287    #[serde(default)]
1288    pub execution_context_id: Option<crate::js_protocol::runtime::types::ExecutionContextId>,
1289}
1290#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1291pub enum ResolveNodeMethod {
1292    #[serde(rename = "DOM.resolveNode")]
1293    ResolveNode,
1294}
1295#[doc = "Resolves the JavaScript node object for a given NodeId or BackendNodeId.\n[resolveNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-resolveNode)"]
1296#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1297pub struct ResolveNode {
1298    pub method: ResolveNodeMethod,
1299    pub params: ResolveNodeParams,
1300}
1301impl ResolveNode {
1302    pub const IDENTIFIER: &'static str = "DOM.resolveNode";
1303    pub fn identifier(&self) -> &'static str {
1304        Self::IDENTIFIER
1305    }
1306}
1307impl crate::CommandResult for ResolveNode {
1308    type Result = super::results::ResolveNodeResult;
1309}
1310#[doc = "Sets attribute for an element with given id.\n[setAttributeValue](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setAttributeValue)"]
1311#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1312pub struct SetAttributeValueParams {
1313    #[doc = "Id of the element to set attribute for."]
1314    #[serde(rename = "nodeId")]
1315    pub node_id: Box<super::types::NodeId>,
1316    #[doc = "Attribute name."]
1317    #[serde(rename = "name")]
1318    pub name: String,
1319    #[doc = "Attribute value."]
1320    #[serde(rename = "value")]
1321    pub value: String,
1322}
1323impl SetAttributeValueParams {
1324    pub fn new(
1325        node_id: impl Into<super::types::NodeId>,
1326        name: impl Into<String>,
1327        value: impl Into<String>,
1328    ) -> Self {
1329        Self {
1330            node_id: Box::new(node_id.into()),
1331            name: name.into(),
1332            value: value.into(),
1333        }
1334    }
1335}
1336#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1337pub enum SetAttributeValueMethod {
1338    #[serde(rename = "DOM.setAttributeValue")]
1339    SetAttributeValue,
1340}
1341#[doc = "Sets attribute for an element with given id.\n[setAttributeValue](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setAttributeValue)"]
1342#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1343pub struct SetAttributeValue {
1344    pub method: SetAttributeValueMethod,
1345    pub params: SetAttributeValueParams,
1346}
1347impl SetAttributeValue {
1348    pub const IDENTIFIER: &'static str = "DOM.setAttributeValue";
1349    pub fn identifier(&self) -> &'static str {
1350        Self::IDENTIFIER
1351    }
1352}
1353impl crate::CommandResult for SetAttributeValue {
1354    type Result = super::results::SetAttributeValueResult;
1355}
1356#[doc = "Sets attributes on element with given id. This method is useful when user edits some existing\nattribute value and types in several attribute name/value pairs.\n[setAttributesAsText](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setAttributesAsText)"]
1357#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1358pub struct SetAttributesAsTextParams {
1359    #[doc = "Id of the element to set attributes for."]
1360    #[serde(rename = "nodeId")]
1361    pub node_id: Box<super::types::NodeId>,
1362    #[doc = "Text with a number of attributes. Will parse this text using HTML parser."]
1363    #[serde(rename = "text")]
1364    pub text: String,
1365    #[doc = "Attribute name to replace with new attributes derived from text in case text parsed\nsuccessfully."]
1366    #[serde(rename = "name")]
1367    #[serde(skip_serializing_if = "Option::is_none")]
1368    #[serde(default)]
1369    pub name: Option<String>,
1370}
1371impl SetAttributesAsTextParams {
1372    pub fn new(node_id: impl Into<super::types::NodeId>, text: impl Into<String>) -> Self {
1373        Self {
1374            node_id: Box::new(node_id.into()),
1375            text: text.into(),
1376            name: None,
1377        }
1378    }
1379}
1380#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1381pub enum SetAttributesAsTextMethod {
1382    #[serde(rename = "DOM.setAttributesAsText")]
1383    SetAttributesAsText,
1384}
1385#[doc = "Sets attributes on element with given id. This method is useful when user edits some existing\nattribute value and types in several attribute name/value pairs.\n[setAttributesAsText](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setAttributesAsText)"]
1386#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1387pub struct SetAttributesAsText {
1388    pub method: SetAttributesAsTextMethod,
1389    pub params: SetAttributesAsTextParams,
1390}
1391impl SetAttributesAsText {
1392    pub const IDENTIFIER: &'static str = "DOM.setAttributesAsText";
1393    pub fn identifier(&self) -> &'static str {
1394        Self::IDENTIFIER
1395    }
1396}
1397impl crate::CommandResult for SetAttributesAsText {
1398    type Result = super::results::SetAttributesAsTextResult;
1399}
1400#[doc = "Sets files for the given file input element.\n[setFileInputFiles](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setFileInputFiles)"]
1401#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1402pub struct SetFileInputFilesParams {
1403    #[doc = "Array of file paths to set."]
1404    #[serde(rename = "files")]
1405    #[serde(skip_serializing_if = "Vec::is_empty")]
1406    pub files: Vec<String>,
1407    #[doc = "Identifier of the node."]
1408    #[serde(rename = "nodeId")]
1409    #[serde(skip_serializing_if = "Option::is_none")]
1410    #[serde(default)]
1411    pub node_id: Option<Box<super::types::NodeId>>,
1412    #[doc = "Identifier of the backend node."]
1413    #[serde(rename = "backendNodeId")]
1414    #[serde(skip_serializing_if = "Option::is_none")]
1415    #[serde(default)]
1416    pub backend_node_id: Option<Box<super::types::BackendNodeId>>,
1417    #[doc = "JavaScript object id of the node wrapper."]
1418    #[serde(rename = "objectId")]
1419    #[serde(skip_serializing_if = "Option::is_none")]
1420    #[serde(default)]
1421    pub object_id: Option<crate::js_protocol::runtime::types::RemoteObjectId>,
1422}
1423impl SetFileInputFilesParams {
1424    pub fn new(files: Vec<String>) -> Self {
1425        Self {
1426            files,
1427            node_id: None,
1428            backend_node_id: None,
1429            object_id: None,
1430        }
1431    }
1432}
1433#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1434pub enum SetFileInputFilesMethod {
1435    #[serde(rename = "DOM.setFileInputFiles")]
1436    SetFileInputFiles,
1437}
1438#[doc = "Sets files for the given file input element.\n[setFileInputFiles](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setFileInputFiles)"]
1439#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1440pub struct SetFileInputFiles {
1441    pub method: SetFileInputFilesMethod,
1442    pub params: SetFileInputFilesParams,
1443}
1444impl SetFileInputFiles {
1445    pub const IDENTIFIER: &'static str = "DOM.setFileInputFiles";
1446    pub fn identifier(&self) -> &'static str {
1447        Self::IDENTIFIER
1448    }
1449}
1450impl crate::CommandResult for SetFileInputFiles {
1451    type Result = super::results::SetFileInputFilesResult;
1452}
1453#[doc = "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.\n[setNodeStackTracesEnabled](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setNodeStackTracesEnabled)"]
1454#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1455pub struct SetNodeStackTracesEnabledParams {
1456    #[doc = "Enable or disable."]
1457    #[serde(rename = "enable")]
1458    pub enable: bool,
1459}
1460impl SetNodeStackTracesEnabledParams {
1461    pub fn new(enable: impl Into<bool>) -> Self {
1462        Self {
1463            enable: enable.into(),
1464        }
1465    }
1466}
1467#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1468pub enum SetNodeStackTracesEnabledMethod {
1469    #[serde(rename = "DOM.setNodeStackTracesEnabled")]
1470    SetNodeStackTracesEnabled,
1471}
1472#[doc = "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.\n[setNodeStackTracesEnabled](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setNodeStackTracesEnabled)"]
1473#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1474pub struct SetNodeStackTracesEnabled {
1475    pub method: SetNodeStackTracesEnabledMethod,
1476    pub params: SetNodeStackTracesEnabledParams,
1477}
1478impl SetNodeStackTracesEnabled {
1479    pub const IDENTIFIER: &'static str = "DOM.setNodeStackTracesEnabled";
1480    pub fn identifier(&self) -> &'static str {
1481        Self::IDENTIFIER
1482    }
1483}
1484impl crate::CommandResult for SetNodeStackTracesEnabled {
1485    type Result = super::results::SetNodeStackTracesEnabledResult;
1486}
1487#[doc = "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.\n[getNodeStackTraces](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getNodeStackTraces)"]
1488#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1489pub struct GetNodeStackTracesParams {
1490    #[doc = "Id of the node to get stack traces for."]
1491    #[serde(rename = "nodeId")]
1492    pub node_id: Box<super::types::NodeId>,
1493}
1494impl GetNodeStackTracesParams {
1495    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
1496        Self {
1497            node_id: Box::new(node_id.into()),
1498        }
1499    }
1500}
1501#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1502pub enum GetNodeStackTracesMethod {
1503    #[serde(rename = "DOM.getNodeStackTraces")]
1504    GetNodeStackTraces,
1505}
1506#[doc = "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.\n[getNodeStackTraces](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getNodeStackTraces)"]
1507#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1508pub struct GetNodeStackTraces {
1509    pub method: GetNodeStackTracesMethod,
1510    pub params: GetNodeStackTracesParams,
1511}
1512impl GetNodeStackTraces {
1513    pub const IDENTIFIER: &'static str = "DOM.getNodeStackTraces";
1514    pub fn identifier(&self) -> &'static str {
1515        Self::IDENTIFIER
1516    }
1517}
1518impl crate::CommandResult for GetNodeStackTraces {
1519    type Result = super::results::GetNodeStackTracesResult;
1520}
1521#[doc = "Returns file information for the given\nFile wrapper.\n[getFileInfo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getFileInfo)"]
1522#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1523pub struct GetFileInfoParams {
1524    #[doc = "JavaScript object id of the node wrapper."]
1525    #[serde(rename = "objectId")]
1526    pub object_id: crate::js_protocol::runtime::types::RemoteObjectId,
1527}
1528impl GetFileInfoParams {
1529    pub fn new(object_id: impl Into<crate::js_protocol::runtime::types::RemoteObjectId>) -> Self {
1530        Self {
1531            object_id: object_id.into(),
1532        }
1533    }
1534}
1535#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1536pub enum GetFileInfoMethod {
1537    #[serde(rename = "DOM.getFileInfo")]
1538    GetFileInfo,
1539}
1540#[doc = "Returns file information for the given\nFile wrapper.\n[getFileInfo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getFileInfo)"]
1541#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1542pub struct GetFileInfo {
1543    pub method: GetFileInfoMethod,
1544    pub params: GetFileInfoParams,
1545}
1546impl GetFileInfo {
1547    pub const IDENTIFIER: &'static str = "DOM.getFileInfo";
1548    pub fn identifier(&self) -> &'static str {
1549        Self::IDENTIFIER
1550    }
1551}
1552impl crate::CommandResult for GetFileInfo {
1553    type Result = super::results::GetFileInfoResult;
1554}
1555#[doc = "Returns list of detached nodes\n[getDetachedDomNodes](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getDetachedDomNodes)"]
1556#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1557pub struct GetDetachedDomNodesParams {}
1558#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1559pub enum GetDetachedDomNodesMethod {
1560    #[serde(rename = "DOM.getDetachedDomNodes")]
1561    GetDetachedDomNodes,
1562}
1563#[doc = "Returns list of detached nodes\n[getDetachedDomNodes](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getDetachedDomNodes)"]
1564#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1565pub struct GetDetachedDomNodes {
1566    pub method: GetDetachedDomNodesMethod,
1567    pub params: GetDetachedDomNodesParams,
1568}
1569impl GetDetachedDomNodes {
1570    pub const IDENTIFIER: &'static str = "DOM.getDetachedDomNodes";
1571    pub fn identifier(&self) -> &'static str {
1572        Self::IDENTIFIER
1573    }
1574}
1575impl crate::CommandResult for GetDetachedDomNodes {
1576    type Result = super::results::GetDetachedDomNodesResult;
1577}
1578#[doc = "Enables console to refer to the node with given id via $x (see Command Line API for more details\n$x functions).\n[setInspectedNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setInspectedNode)"]
1579#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1580pub struct SetInspectedNodeParams {
1581    #[doc = "DOM node id to be accessible by means of $x command line API."]
1582    #[serde(rename = "nodeId")]
1583    pub node_id: Box<super::types::NodeId>,
1584}
1585impl SetInspectedNodeParams {
1586    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
1587        Self {
1588            node_id: Box::new(node_id.into()),
1589        }
1590    }
1591}
1592#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1593pub enum SetInspectedNodeMethod {
1594    #[serde(rename = "DOM.setInspectedNode")]
1595    SetInspectedNode,
1596}
1597#[doc = "Enables console to refer to the node with given id via $x (see Command Line API for more details\n$x functions).\n[setInspectedNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setInspectedNode)"]
1598#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1599pub struct SetInspectedNode {
1600    pub method: SetInspectedNodeMethod,
1601    pub params: SetInspectedNodeParams,
1602}
1603impl SetInspectedNode {
1604    pub const IDENTIFIER: &'static str = "DOM.setInspectedNode";
1605    pub fn identifier(&self) -> &'static str {
1606        Self::IDENTIFIER
1607    }
1608}
1609impl crate::CommandResult for SetInspectedNode {
1610    type Result = super::results::SetInspectedNodeResult;
1611}
1612#[doc = "Sets node name for a node with given id.\n[setNodeName](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setNodeName)"]
1613#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1614pub struct SetNodeNameParams {
1615    #[doc = "Id of the node to set name for."]
1616    #[serde(rename = "nodeId")]
1617    pub node_id: Box<super::types::NodeId>,
1618    #[doc = "New node's name."]
1619    #[serde(rename = "name")]
1620    pub name: String,
1621}
1622impl SetNodeNameParams {
1623    pub fn new(node_id: impl Into<super::types::NodeId>, name: impl Into<String>) -> Self {
1624        Self {
1625            node_id: Box::new(node_id.into()),
1626            name: name.into(),
1627        }
1628    }
1629}
1630#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1631pub enum SetNodeNameMethod {
1632    #[serde(rename = "DOM.setNodeName")]
1633    SetNodeName,
1634}
1635#[doc = "Sets node name for a node with given id.\n[setNodeName](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setNodeName)"]
1636#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1637pub struct SetNodeName {
1638    pub method: SetNodeNameMethod,
1639    pub params: SetNodeNameParams,
1640}
1641impl SetNodeName {
1642    pub const IDENTIFIER: &'static str = "DOM.setNodeName";
1643    pub fn identifier(&self) -> &'static str {
1644        Self::IDENTIFIER
1645    }
1646}
1647impl crate::CommandResult for SetNodeName {
1648    type Result = super::results::SetNodeNameResult;
1649}
1650#[doc = "Sets node value for a node with given id.\n[setNodeValue](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setNodeValue)"]
1651#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1652pub struct SetNodeValueParams {
1653    #[doc = "Id of the node to set value for."]
1654    #[serde(rename = "nodeId")]
1655    pub node_id: Box<super::types::NodeId>,
1656    #[doc = "New node's value."]
1657    #[serde(rename = "value")]
1658    pub value: String,
1659}
1660impl SetNodeValueParams {
1661    pub fn new(node_id: impl Into<super::types::NodeId>, value: impl Into<String>) -> Self {
1662        Self {
1663            node_id: Box::new(node_id.into()),
1664            value: value.into(),
1665        }
1666    }
1667}
1668#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1669pub enum SetNodeValueMethod {
1670    #[serde(rename = "DOM.setNodeValue")]
1671    SetNodeValue,
1672}
1673#[doc = "Sets node value for a node with given id.\n[setNodeValue](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setNodeValue)"]
1674#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1675pub struct SetNodeValue {
1676    pub method: SetNodeValueMethod,
1677    pub params: SetNodeValueParams,
1678}
1679impl SetNodeValue {
1680    pub const IDENTIFIER: &'static str = "DOM.setNodeValue";
1681    pub fn identifier(&self) -> &'static str {
1682        Self::IDENTIFIER
1683    }
1684}
1685impl crate::CommandResult for SetNodeValue {
1686    type Result = super::results::SetNodeValueResult;
1687}
1688#[doc = "Sets node HTML markup, returns new node id.\n[setOuterHTML](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setOuterHTML)"]
1689#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1690pub struct SetOuterHtmlParams {
1691    #[doc = "Id of the node to set markup for."]
1692    #[serde(rename = "nodeId")]
1693    pub node_id: Box<super::types::NodeId>,
1694    #[doc = "Outer HTML markup to set."]
1695    #[serde(rename = "outerHTML")]
1696    pub outer_html: String,
1697}
1698impl SetOuterHtmlParams {
1699    pub fn new(node_id: impl Into<super::types::NodeId>, outer_html: impl Into<String>) -> Self {
1700        Self {
1701            node_id: Box::new(node_id.into()),
1702            outer_html: outer_html.into(),
1703        }
1704    }
1705}
1706#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1707pub enum SetOuterHtmlMethod {
1708    #[serde(rename = "DOM.setOuterHTML")]
1709    SetOuterHtml,
1710}
1711#[doc = "Sets node HTML markup, returns new node id.\n[setOuterHTML](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setOuterHTML)"]
1712#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1713pub struct SetOuterHtml {
1714    pub method: SetOuterHtmlMethod,
1715    pub params: SetOuterHtmlParams,
1716}
1717impl SetOuterHtml {
1718    pub const IDENTIFIER: &'static str = "DOM.setOuterHTML";
1719    pub fn identifier(&self) -> &'static str {
1720        Self::IDENTIFIER
1721    }
1722}
1723impl crate::CommandResult for SetOuterHtml {
1724    type Result = super::results::SetOuterHtmlResult;
1725}
1726#[doc = "Undoes the last performed action.\n[undo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-undo)"]
1727#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1728pub struct UndoParams {}
1729#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1730pub enum UndoMethod {
1731    #[serde(rename = "DOM.undo")]
1732    Undo,
1733}
1734#[doc = "Undoes the last performed action.\n[undo](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-undo)"]
1735#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1736pub struct Undo {
1737    pub method: UndoMethod,
1738    pub params: UndoParams,
1739}
1740impl Undo {
1741    pub const IDENTIFIER: &'static str = "DOM.undo";
1742    pub fn identifier(&self) -> &'static str {
1743        Self::IDENTIFIER
1744    }
1745}
1746impl crate::CommandResult for Undo {
1747    type Result = super::results::UndoResult;
1748}
1749#[doc = "Returns iframe node that owns iframe with the given domain.\n[getFrameOwner](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getFrameOwner)"]
1750#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1751pub struct GetFrameOwnerParams {
1752    #[serde(rename = "frameId")]
1753    pub frame_id: crate::browser_protocol::page::types::FrameId,
1754}
1755impl GetFrameOwnerParams {
1756    pub fn new(frame_id: impl Into<crate::browser_protocol::page::types::FrameId>) -> Self {
1757        Self {
1758            frame_id: frame_id.into(),
1759        }
1760    }
1761}
1762#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1763pub enum GetFrameOwnerMethod {
1764    #[serde(rename = "DOM.getFrameOwner")]
1765    GetFrameOwner,
1766}
1767#[doc = "Returns iframe node that owns iframe with the given domain.\n[getFrameOwner](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getFrameOwner)"]
1768#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1769pub struct GetFrameOwner {
1770    pub method: GetFrameOwnerMethod,
1771    pub params: GetFrameOwnerParams,
1772}
1773impl GetFrameOwner {
1774    pub const IDENTIFIER: &'static str = "DOM.getFrameOwner";
1775    pub fn identifier(&self) -> &'static str {
1776        Self::IDENTIFIER
1777    }
1778}
1779impl crate::CommandResult for GetFrameOwner {
1780    type Result = super::results::GetFrameOwnerResult;
1781}
1782#[doc = "Returns the query container of the given node based on container query\nconditions: containerName, physical and logical axes, and whether it queries\nscroll-state or anchored elements. If no axes are provided and\nqueriesScrollState is false, the style container is returned, which is the\ndirect parent or the closest element with a matching container-name.\n[getContainerForNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getContainerForNode)"]
1783#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1784pub struct GetContainerForNodeParams {
1785    #[serde(rename = "nodeId")]
1786    pub node_id: Box<super::types::NodeId>,
1787    #[serde(rename = "containerName")]
1788    #[serde(skip_serializing_if = "Option::is_none")]
1789    #[serde(default)]
1790    pub container_name: Option<String>,
1791    #[serde(rename = "physicalAxes")]
1792    #[serde(skip_serializing_if = "Option::is_none")]
1793    #[serde(default)]
1794    pub physical_axes: Option<super::types::PhysicalAxes>,
1795    #[serde(rename = "logicalAxes")]
1796    #[serde(skip_serializing_if = "Option::is_none")]
1797    #[serde(default)]
1798    pub logical_axes: Option<super::types::LogicalAxes>,
1799    #[serde(rename = "queriesScrollState")]
1800    #[serde(skip_serializing_if = "Option::is_none")]
1801    #[serde(default)]
1802    pub queries_scroll_state: Option<bool>,
1803    #[serde(rename = "queriesAnchored")]
1804    #[serde(skip_serializing_if = "Option::is_none")]
1805    #[serde(default)]
1806    pub queries_anchored: Option<bool>,
1807}
1808impl GetContainerForNodeParams {
1809    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
1810        Self {
1811            node_id: Box::new(node_id.into()),
1812            container_name: None,
1813            physical_axes: None,
1814            logical_axes: None,
1815            queries_scroll_state: None,
1816            queries_anchored: None,
1817        }
1818    }
1819}
1820#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1821pub enum GetContainerForNodeMethod {
1822    #[serde(rename = "DOM.getContainerForNode")]
1823    GetContainerForNode,
1824}
1825#[doc = "Returns the query container of the given node based on container query\nconditions: containerName, physical and logical axes, and whether it queries\nscroll-state or anchored elements. If no axes are provided and\nqueriesScrollState is false, the style container is returned, which is the\ndirect parent or the closest element with a matching container-name.\n[getContainerForNode](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getContainerForNode)"]
1826#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1827pub struct GetContainerForNode {
1828    pub method: GetContainerForNodeMethod,
1829    pub params: GetContainerForNodeParams,
1830}
1831impl GetContainerForNode {
1832    pub const IDENTIFIER: &'static str = "DOM.getContainerForNode";
1833    pub fn identifier(&self) -> &'static str {
1834        Self::IDENTIFIER
1835    }
1836}
1837impl crate::CommandResult for GetContainerForNode {
1838    type Result = super::results::GetContainerForNodeResult;
1839}
1840#[doc = "Returns the descendants of a container query container that have\ncontainer queries against this container.\n[getQueryingDescendantsForContainer](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getQueryingDescendantsForContainer)"]
1841#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1842pub struct GetQueryingDescendantsForContainerParams {
1843    #[doc = "Id of the container node to find querying descendants from."]
1844    #[serde(rename = "nodeId")]
1845    pub node_id: Box<super::types::NodeId>,
1846}
1847impl GetQueryingDescendantsForContainerParams {
1848    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
1849        Self {
1850            node_id: Box::new(node_id.into()),
1851        }
1852    }
1853}
1854#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1855pub enum GetQueryingDescendantsForContainerMethod {
1856    #[serde(rename = "DOM.getQueryingDescendantsForContainer")]
1857    GetQueryingDescendantsForContainer,
1858}
1859#[doc = "Returns the descendants of a container query container that have\ncontainer queries against this container.\n[getQueryingDescendantsForContainer](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getQueryingDescendantsForContainer)"]
1860#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1861pub struct GetQueryingDescendantsForContainer {
1862    pub method: GetQueryingDescendantsForContainerMethod,
1863    pub params: GetQueryingDescendantsForContainerParams,
1864}
1865impl GetQueryingDescendantsForContainer {
1866    pub const IDENTIFIER: &'static str = "DOM.getQueryingDescendantsForContainer";
1867    pub fn identifier(&self) -> &'static str {
1868        Self::IDENTIFIER
1869    }
1870}
1871impl crate::CommandResult for GetQueryingDescendantsForContainer {
1872    type Result = super::results::GetQueryingDescendantsForContainerResult;
1873}
1874#[doc = "Returns the target anchor element of the given anchor query according to\nhttps://www.w3.org/TR/css-anchor-position-1/#target.\n[getAnchorElement](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getAnchorElement)"]
1875#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1876pub struct GetAnchorElementParams {
1877    #[doc = "Id of the positioned element from which to find the anchor."]
1878    #[serde(rename = "nodeId")]
1879    pub node_id: Box<super::types::NodeId>,
1880    #[doc = "An optional anchor specifier, as defined in\nhttps://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.\nIf not provided, it will return the implicit anchor element for\nthe given positioned element."]
1881    #[serde(rename = "anchorSpecifier")]
1882    #[serde(skip_serializing_if = "Option::is_none")]
1883    #[serde(default)]
1884    pub anchor_specifier: Option<String>,
1885}
1886impl GetAnchorElementParams {
1887    pub fn new(node_id: impl Into<super::types::NodeId>) -> Self {
1888        Self {
1889            node_id: Box::new(node_id.into()),
1890            anchor_specifier: None,
1891        }
1892    }
1893}
1894#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1895pub enum GetAnchorElementMethod {
1896    #[serde(rename = "DOM.getAnchorElement")]
1897    GetAnchorElement,
1898}
1899#[doc = "Returns the target anchor element of the given anchor query according to\nhttps://www.w3.org/TR/css-anchor-position-1/#target.\n[getAnchorElement](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-getAnchorElement)"]
1900#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1901pub struct GetAnchorElement {
1902    pub method: GetAnchorElementMethod,
1903    pub params: GetAnchorElementParams,
1904}
1905impl GetAnchorElement {
1906    pub const IDENTIFIER: &'static str = "DOM.getAnchorElement";
1907    pub fn identifier(&self) -> &'static str {
1908        Self::IDENTIFIER
1909    }
1910}
1911impl crate::CommandResult for GetAnchorElement {
1912    type Result = super::results::GetAnchorElementResult;
1913}
1914#[doc = "When enabling, this API force-opens the popover identified by nodeId\nand keeps it open until disabled.\n[forceShowPopover](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-forceShowPopover)"]
1915#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1916pub struct ForceShowPopoverParams {
1917    #[doc = "Id of the popover HTMLElement"]
1918    #[serde(rename = "nodeId")]
1919    pub node_id: Box<super::types::NodeId>,
1920    #[doc = "If true, opens the popover and keeps it open. If false, closes the\npopover if it was previously force-opened."]
1921    #[serde(rename = "enable")]
1922    pub enable: bool,
1923}
1924impl ForceShowPopoverParams {
1925    pub fn new(node_id: impl Into<super::types::NodeId>, enable: impl Into<bool>) -> Self {
1926        Self {
1927            node_id: Box::new(node_id.into()),
1928            enable: enable.into(),
1929        }
1930    }
1931}
1932#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1933pub enum ForceShowPopoverMethod {
1934    #[serde(rename = "DOM.forceShowPopover")]
1935    ForceShowPopover,
1936}
1937#[doc = "When enabling, this API force-opens the popover identified by nodeId\nand keeps it open until disabled.\n[forceShowPopover](https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-forceShowPopover)"]
1938#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1939pub struct ForceShowPopover {
1940    pub method: ForceShowPopoverMethod,
1941    pub params: ForceShowPopoverParams,
1942}
1943impl ForceShowPopover {
1944    pub const IDENTIFIER: &'static str = "DOM.forceShowPopover";
1945    pub fn identifier(&self) -> &'static str {
1946        Self::IDENTIFIER
1947    }
1948}
1949impl crate::CommandResult for ForceShowPopover {
1950    type Result = super::results::ForceShowPopoverResult;
1951}
1952group_enum ! (DomCommands { CollectClassNamesFromSubtree (CollectClassNamesFromSubtree) , CopyTo (CopyTo) , DescribeNode (DescribeNode) , ScrollIntoViewIfNeeded (ScrollIntoViewIfNeeded) , Disable (Disable) , DiscardSearchResults (DiscardSearchResults) , Enable (Enable) , Focus (Focus) , GetAttributes (GetAttributes) , GetBoxModel (GetBoxModel) , GetContentQuads (GetContentQuads) , GetDocument (GetDocument) , GetNodesForSubtreeByStyle (GetNodesForSubtreeByStyle) , GetNodeForLocation (GetNodeForLocation) , GetOuterHtml (GetOuterHtml) , GetRelayoutBoundary (GetRelayoutBoundary) , GetSearchResults (GetSearchResults) , HideHighlight (HideHighlight) , HighlightNode (HighlightNode) , HighlightRect (HighlightRect) , MarkUndoableState (MarkUndoableState) , MoveTo (MoveTo) , PerformSearch (PerformSearch) , PushNodeByPathToFrontend (PushNodeByPathToFrontend) , PushNodesByBackendIdsToFrontend (PushNodesByBackendIdsToFrontend) , QuerySelector (QuerySelector) , QuerySelectorAll (QuerySelectorAll) , GetTopLayerElements (GetTopLayerElements) , GetElementByRelation (GetElementByRelation) , Redo (Redo) , RemoveAttribute (RemoveAttribute) , RemoveNode (RemoveNode) , RequestChildNodes (RequestChildNodes) , RequestNode (RequestNode) , ResolveNode (ResolveNode) , SetAttributeValue (SetAttributeValue) , SetAttributesAsText (SetAttributesAsText) , SetFileInputFiles (SetFileInputFiles) , SetNodeStackTracesEnabled (SetNodeStackTracesEnabled) , GetNodeStackTraces (GetNodeStackTraces) , GetFileInfo (GetFileInfo) , GetDetachedDomNodes (GetDetachedDomNodes) , SetInspectedNode (SetInspectedNode) , SetNodeName (SetNodeName) , SetNodeValue (SetNodeValue) , SetOuterHtml (SetOuterHtml) , Undo (Undo) , GetFrameOwner (GetFrameOwner) , GetContainerForNode (GetContainerForNode) , GetQueryingDescendantsForContainer (GetQueryingDescendantsForContainer) , GetAnchorElement (GetAnchorElement) , ForceShowPopover (ForceShowPopover) } + identifiable);