Skip to main content

rustenium_cdp_definitions/browser_protocol/css/
commands.rs

1use serde::{Deserialize, Serialize};
2#[doc = "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the\nposition specified by `location`.\n[addRule](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-addRule)"]
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct AddRuleParams {
5    #[doc = "The css style sheet identifier where a new rule should be inserted."]
6    #[serde(rename = "styleSheetId")]
7    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
8    #[doc = "The text of a new rule."]
9    #[serde(rename = "ruleText")]
10    pub rule_text: String,
11    #[doc = "Text position of a new rule in the target style sheet."]
12    #[serde(rename = "location")]
13    pub location: super::types::SourceRange,
14    #[doc = "NodeId for the DOM node in whose context custom property declarations for registered properties should be\nvalidated. If omitted, declarations in the new rule text can only be validated statically, which may produce\nincorrect results if the declaration contains a var() for example."]
15    #[serde(rename = "nodeForPropertySyntaxValidation")]
16    #[serde(skip_serializing_if = "Option::is_none")]
17    #[serde(default)]
18    pub node_for_property_syntax_validation: Option<crate::browser_protocol::dom::types::NodeId>,
19}
20impl AddRuleParams {
21    pub fn new(
22        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
23        rule_text: impl Into<String>,
24        location: impl Into<super::types::SourceRange>,
25    ) -> Self {
26        Self {
27            style_sheet_id: style_sheet_id.into(),
28            rule_text: rule_text.into(),
29            location: location.into(),
30            node_for_property_syntax_validation: None,
31        }
32    }
33}
34#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
35pub enum AddRuleMethod {
36    #[serde(rename = "CSS.addRule")]
37    AddRule,
38}
39#[doc = "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the\nposition specified by `location`.\n[addRule](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-addRule)"]
40#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
41pub struct AddRule {
42    pub method: AddRuleMethod,
43    pub params: AddRuleParams,
44}
45impl AddRule {
46    pub const IDENTIFIER: &'static str = "CSS.addRule";
47    pub fn identifier(&self) -> &'static str {
48        Self::IDENTIFIER
49    }
50}
51impl crate::CommandResult for AddRule {
52    type Result = super::results::AddRuleResult;
53}
54#[doc = "Returns all class names from specified stylesheet.\n[collectClassNames](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-collectClassNames)"]
55#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
56pub struct CollectClassNamesParams {
57    #[serde(rename = "styleSheetId")]
58    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
59}
60impl CollectClassNamesParams {
61    pub fn new(
62        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
63    ) -> Self {
64        Self {
65            style_sheet_id: style_sheet_id.into(),
66        }
67    }
68}
69#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
70pub enum CollectClassNamesMethod {
71    #[serde(rename = "CSS.collectClassNames")]
72    CollectClassNames,
73}
74#[doc = "Returns all class names from specified stylesheet.\n[collectClassNames](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-collectClassNames)"]
75#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
76pub struct CollectClassNames {
77    pub method: CollectClassNamesMethod,
78    pub params: CollectClassNamesParams,
79}
80impl CollectClassNames {
81    pub const IDENTIFIER: &'static str = "CSS.collectClassNames";
82    pub fn identifier(&self) -> &'static str {
83        Self::IDENTIFIER
84    }
85}
86impl crate::CommandResult for CollectClassNames {
87    type Result = super::results::CollectClassNamesResult;
88}
89#[doc = "Creates a new special \"via-inspector\" stylesheet in the frame with given `frameId`.\n[createStyleSheet](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-createStyleSheet)"]
90#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
91pub struct CreateStyleSheetParams {
92    #[doc = "Identifier of the frame where \"via-inspector\" stylesheet should be created."]
93    #[serde(rename = "frameId")]
94    pub frame_id: crate::browser_protocol::page::types::FrameId,
95    #[doc = "If true, creates a new stylesheet for every call. If false,\nreturns a stylesheet previously created by a call with force=false\nfor the frame's document if it exists or creates a new stylesheet\n(default: false)."]
96    #[serde(rename = "force")]
97    #[serde(skip_serializing_if = "Option::is_none")]
98    #[serde(default)]
99    pub force: Option<bool>,
100}
101impl CreateStyleSheetParams {
102    pub fn new(frame_id: impl Into<crate::browser_protocol::page::types::FrameId>) -> Self {
103        Self {
104            frame_id: frame_id.into(),
105            force: None,
106        }
107    }
108}
109#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
110pub enum CreateStyleSheetMethod {
111    #[serde(rename = "CSS.createStyleSheet")]
112    CreateStyleSheet,
113}
114#[doc = "Creates a new special \"via-inspector\" stylesheet in the frame with given `frameId`.\n[createStyleSheet](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-createStyleSheet)"]
115#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
116pub struct CreateStyleSheet {
117    pub method: CreateStyleSheetMethod,
118    pub params: CreateStyleSheetParams,
119}
120impl CreateStyleSheet {
121    pub const IDENTIFIER: &'static str = "CSS.createStyleSheet";
122    pub fn identifier(&self) -> &'static str {
123        Self::IDENTIFIER
124    }
125}
126impl crate::CommandResult for CreateStyleSheet {
127    type Result = super::results::CreateStyleSheetResult;
128}
129#[doc = "Disables the CSS agent for the given page.\n[disable](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-disable)"]
130#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
131pub struct DisableParams {}
132#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
133pub enum DisableMethod {
134    #[serde(rename = "CSS.disable")]
135    Disable,
136}
137#[doc = "Disables the CSS agent for the given page.\n[disable](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-disable)"]
138#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
139pub struct Disable {
140    pub method: DisableMethod,
141    pub params: DisableParams,
142}
143impl Disable {
144    pub const IDENTIFIER: &'static str = "CSS.disable";
145    pub fn identifier(&self) -> &'static str {
146        Self::IDENTIFIER
147    }
148}
149impl crate::CommandResult for Disable {
150    type Result = super::results::DisableResult;
151}
152#[doc = "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been\nenabled until the result of this command is received.\n[enable](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-enable)"]
153#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
154pub struct EnableParams {}
155#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
156pub enum EnableMethod {
157    #[serde(rename = "CSS.enable")]
158    Enable,
159}
160#[doc = "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been\nenabled until the result of this command is received.\n[enable](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-enable)"]
161#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
162pub struct Enable {
163    pub method: EnableMethod,
164    pub params: EnableParams,
165}
166impl Enable {
167    pub const IDENTIFIER: &'static str = "CSS.enable";
168    pub fn identifier(&self) -> &'static str {
169        Self::IDENTIFIER
170    }
171}
172impl crate::CommandResult for Enable {
173    type Result = super::results::EnableResult;
174}
175#[doc = "Ensures that the given node will have specified pseudo-classes whenever its style is computed by\nthe browser.\n[forcePseudoState](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-forcePseudoState)"]
176#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
177pub struct ForcePseudoStateParams {
178    #[doc = "The element id for which to force the pseudo state."]
179    #[serde(rename = "nodeId")]
180    pub node_id: crate::browser_protocol::dom::types::NodeId,
181    #[doc = "Element pseudo classes to force when computing the element's style."]
182    #[serde(rename = "forcedPseudoClasses")]
183    #[serde(skip_serializing_if = "Vec::is_empty")]
184    pub forced_pseudo_classes: Vec<String>,
185}
186impl ForcePseudoStateParams {
187    pub fn new(
188        node_id: impl Into<crate::browser_protocol::dom::types::NodeId>,
189        forced_pseudo_classes: Vec<String>,
190    ) -> Self {
191        Self {
192            node_id: node_id.into(),
193            forced_pseudo_classes,
194        }
195    }
196}
197#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
198pub enum ForcePseudoStateMethod {
199    #[serde(rename = "CSS.forcePseudoState")]
200    ForcePseudoState,
201}
202#[doc = "Ensures that the given node will have specified pseudo-classes whenever its style is computed by\nthe browser.\n[forcePseudoState](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-forcePseudoState)"]
203#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
204pub struct ForcePseudoState {
205    pub method: ForcePseudoStateMethod,
206    pub params: ForcePseudoStateParams,
207}
208impl ForcePseudoState {
209    pub const IDENTIFIER: &'static str = "CSS.forcePseudoState";
210    pub fn identifier(&self) -> &'static str {
211        Self::IDENTIFIER
212    }
213}
214impl crate::CommandResult for ForcePseudoState {
215    type Result = super::results::ForcePseudoStateResult;
216}
217#[doc = "Ensures that the given node is in its starting-style state.\n[forceStartingStyle](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-forceStartingStyle)"]
218#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
219pub struct ForceStartingStyleParams {
220    #[doc = "The element id for which to force the starting-style state."]
221    #[serde(rename = "nodeId")]
222    pub node_id: crate::browser_protocol::dom::types::NodeId,
223    #[doc = "Boolean indicating if this is on or off."]
224    #[serde(rename = "forced")]
225    pub forced: bool,
226}
227impl ForceStartingStyleParams {
228    pub fn new(
229        node_id: impl Into<crate::browser_protocol::dom::types::NodeId>,
230        forced: impl Into<bool>,
231    ) -> Self {
232        Self {
233            node_id: node_id.into(),
234            forced: forced.into(),
235        }
236    }
237}
238#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
239pub enum ForceStartingStyleMethod {
240    #[serde(rename = "CSS.forceStartingStyle")]
241    ForceStartingStyle,
242}
243#[doc = "Ensures that the given node is in its starting-style state.\n[forceStartingStyle](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-forceStartingStyle)"]
244#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
245pub struct ForceStartingStyle {
246    pub method: ForceStartingStyleMethod,
247    pub params: ForceStartingStyleParams,
248}
249impl ForceStartingStyle {
250    pub const IDENTIFIER: &'static str = "CSS.forceStartingStyle";
251    pub fn identifier(&self) -> &'static str {
252        Self::IDENTIFIER
253    }
254}
255impl crate::CommandResult for ForceStartingStyle {
256    type Result = super::results::ForceStartingStyleResult;
257}
258#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
259pub struct GetBackgroundColorsParams {
260    #[doc = "Id of the node to get background colors for."]
261    #[serde(rename = "nodeId")]
262    pub node_id: crate::browser_protocol::dom::types::NodeId,
263}
264impl GetBackgroundColorsParams {
265    pub fn new(node_id: impl Into<crate::browser_protocol::dom::types::NodeId>) -> Self {
266        Self {
267            node_id: node_id.into(),
268        }
269    }
270}
271#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
272pub enum GetBackgroundColorsMethod {
273    #[serde(rename = "CSS.getBackgroundColors")]
274    GetBackgroundColors,
275}
276#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
277pub struct GetBackgroundColors {
278    pub method: GetBackgroundColorsMethod,
279    pub params: GetBackgroundColorsParams,
280}
281impl GetBackgroundColors {
282    pub const IDENTIFIER: &'static str = "CSS.getBackgroundColors";
283    pub fn identifier(&self) -> &'static str {
284        Self::IDENTIFIER
285    }
286}
287impl crate::CommandResult for GetBackgroundColors {
288    type Result = super::results::GetBackgroundColorsResult;
289}
290#[doc = "Returns the computed style for a DOM node identified by `nodeId`.\n[getComputedStyleForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getComputedStyleForNode)"]
291#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
292pub struct GetComputedStyleForNodeParams {
293    #[serde(rename = "nodeId")]
294    pub node_id: crate::browser_protocol::dom::types::NodeId,
295}
296impl GetComputedStyleForNodeParams {
297    pub fn new(node_id: impl Into<crate::browser_protocol::dom::types::NodeId>) -> Self {
298        Self {
299            node_id: node_id.into(),
300        }
301    }
302}
303#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
304pub enum GetComputedStyleForNodeMethod {
305    #[serde(rename = "CSS.getComputedStyleForNode")]
306    GetComputedStyleForNode,
307}
308#[doc = "Returns the computed style for a DOM node identified by `nodeId`.\n[getComputedStyleForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getComputedStyleForNode)"]
309#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
310pub struct GetComputedStyleForNode {
311    pub method: GetComputedStyleForNodeMethod,
312    pub params: GetComputedStyleForNodeParams,
313}
314impl GetComputedStyleForNode {
315    pub const IDENTIFIER: &'static str = "CSS.getComputedStyleForNode";
316    pub fn identifier(&self) -> &'static str {
317        Self::IDENTIFIER
318    }
319}
320impl crate::CommandResult for GetComputedStyleForNode {
321    type Result = super::results::GetComputedStyleForNodeResult;
322}
323#[doc = "Resolve the specified values in the context of the provided element.\nFor example, a value of '1em' is evaluated according to the computed\n'font-size' of the element and a value 'calc(1px + 2px)' will be\nresolved to '3px'.\nIf the `propertyName` was specified the `values` are resolved as if\nthey were property's declaration. If a value cannot be parsed according\nto the provided property syntax, the value is parsed using combined\nsyntax as if null `propertyName` was provided. If the value cannot be\nresolved even then, return the provided value without any changes.\nNote: this function currently does not resolve CSS random() function,\nit returns unmodified random() function parts.`\n[resolveValues](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-resolveValues)"]
324#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
325pub struct ResolveValuesParams {
326    #[doc = "Cascade-dependent keywords (revert/revert-layer) do not work."]
327    #[serde(rename = "values")]
328    #[serde(skip_serializing_if = "Vec::is_empty")]
329    pub values: Vec<String>,
330    #[doc = "Id of the node in whose context the expression is evaluated"]
331    #[serde(rename = "nodeId")]
332    pub node_id: crate::browser_protocol::dom::types::NodeId,
333    #[doc = "Only longhands and custom property names are accepted."]
334    #[serde(rename = "propertyName")]
335    #[serde(skip_serializing_if = "Option::is_none")]
336    #[serde(default)]
337    pub property_name: Option<String>,
338    #[doc = "Pseudo element type, only works for pseudo elements that generate\nelements in the tree, such as ::before and ::after."]
339    #[serde(rename = "pseudoType")]
340    #[serde(skip_serializing_if = "Option::is_none")]
341    #[serde(default)]
342    pub pseudo_type: Option<crate::browser_protocol::dom::types::PseudoType>,
343    #[doc = "Pseudo element custom ident."]
344    #[serde(rename = "pseudoIdentifier")]
345    #[serde(skip_serializing_if = "Option::is_none")]
346    #[serde(default)]
347    pub pseudo_identifier: Option<String>,
348}
349impl ResolveValuesParams {
350    pub fn new(
351        values: Vec<String>,
352        node_id: impl Into<crate::browser_protocol::dom::types::NodeId>,
353    ) -> Self {
354        Self {
355            values,
356            node_id: node_id.into(),
357            property_name: None,
358            pseudo_type: None,
359            pseudo_identifier: None,
360        }
361    }
362}
363#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
364pub enum ResolveValuesMethod {
365    #[serde(rename = "CSS.resolveValues")]
366    ResolveValues,
367}
368#[doc = "Resolve the specified values in the context of the provided element.\nFor example, a value of '1em' is evaluated according to the computed\n'font-size' of the element and a value 'calc(1px + 2px)' will be\nresolved to '3px'.\nIf the `propertyName` was specified the `values` are resolved as if\nthey were property's declaration. If a value cannot be parsed according\nto the provided property syntax, the value is parsed using combined\nsyntax as if null `propertyName` was provided. If the value cannot be\nresolved even then, return the provided value without any changes.\nNote: this function currently does not resolve CSS random() function,\nit returns unmodified random() function parts.`\n[resolveValues](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-resolveValues)"]
369#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
370pub struct ResolveValues {
371    pub method: ResolveValuesMethod,
372    pub params: ResolveValuesParams,
373}
374impl ResolveValues {
375    pub const IDENTIFIER: &'static str = "CSS.resolveValues";
376    pub fn identifier(&self) -> &'static str {
377        Self::IDENTIFIER
378    }
379}
380impl crate::CommandResult for ResolveValues {
381    type Result = super::results::ResolveValuesResult;
382}
383#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
384pub struct GetLonghandPropertiesParams {
385    #[serde(rename = "shorthandName")]
386    pub shorthand_name: String,
387    #[serde(rename = "value")]
388    pub value: String,
389}
390impl GetLonghandPropertiesParams {
391    pub fn new(shorthand_name: impl Into<String>, value: impl Into<String>) -> Self {
392        Self {
393            shorthand_name: shorthand_name.into(),
394            value: value.into(),
395        }
396    }
397}
398#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
399pub enum GetLonghandPropertiesMethod {
400    #[serde(rename = "CSS.getLonghandProperties")]
401    GetLonghandProperties,
402}
403#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
404pub struct GetLonghandProperties {
405    pub method: GetLonghandPropertiesMethod,
406    pub params: GetLonghandPropertiesParams,
407}
408impl GetLonghandProperties {
409    pub const IDENTIFIER: &'static str = "CSS.getLonghandProperties";
410    pub fn identifier(&self) -> &'static str {
411        Self::IDENTIFIER
412    }
413}
414impl crate::CommandResult for GetLonghandProperties {
415    type Result = super::results::GetLonghandPropertiesResult;
416}
417#[doc = "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM\nattributes) for a DOM node identified by `nodeId`.\n[getInlineStylesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getInlineStylesForNode)"]
418#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
419pub struct GetInlineStylesForNodeParams {
420    #[serde(rename = "nodeId")]
421    pub node_id: crate::browser_protocol::dom::types::NodeId,
422}
423impl GetInlineStylesForNodeParams {
424    pub fn new(node_id: impl Into<crate::browser_protocol::dom::types::NodeId>) -> Self {
425        Self {
426            node_id: node_id.into(),
427        }
428    }
429}
430#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
431pub enum GetInlineStylesForNodeMethod {
432    #[serde(rename = "CSS.getInlineStylesForNode")]
433    GetInlineStylesForNode,
434}
435#[doc = "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM\nattributes) for a DOM node identified by `nodeId`.\n[getInlineStylesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getInlineStylesForNode)"]
436#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
437pub struct GetInlineStylesForNode {
438    pub method: GetInlineStylesForNodeMethod,
439    pub params: GetInlineStylesForNodeParams,
440}
441impl GetInlineStylesForNode {
442    pub const IDENTIFIER: &'static str = "CSS.getInlineStylesForNode";
443    pub fn identifier(&self) -> &'static str {
444        Self::IDENTIFIER
445    }
446}
447impl crate::CommandResult for GetInlineStylesForNode {
448    type Result = super::results::GetInlineStylesForNodeResult;
449}
450#[doc = "Returns the styles coming from animations & transitions\nincluding the animation & transition styles coming from inheritance chain.\n[getAnimatedStylesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getAnimatedStylesForNode)"]
451#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
452pub struct GetAnimatedStylesForNodeParams {
453    #[serde(rename = "nodeId")]
454    pub node_id: crate::browser_protocol::dom::types::NodeId,
455}
456impl GetAnimatedStylesForNodeParams {
457    pub fn new(node_id: impl Into<crate::browser_protocol::dom::types::NodeId>) -> Self {
458        Self {
459            node_id: node_id.into(),
460        }
461    }
462}
463#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
464pub enum GetAnimatedStylesForNodeMethod {
465    #[serde(rename = "CSS.getAnimatedStylesForNode")]
466    GetAnimatedStylesForNode,
467}
468#[doc = "Returns the styles coming from animations & transitions\nincluding the animation & transition styles coming from inheritance chain.\n[getAnimatedStylesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getAnimatedStylesForNode)"]
469#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
470pub struct GetAnimatedStylesForNode {
471    pub method: GetAnimatedStylesForNodeMethod,
472    pub params: GetAnimatedStylesForNodeParams,
473}
474impl GetAnimatedStylesForNode {
475    pub const IDENTIFIER: &'static str = "CSS.getAnimatedStylesForNode";
476    pub fn identifier(&self) -> &'static str {
477        Self::IDENTIFIER
478    }
479}
480impl crate::CommandResult for GetAnimatedStylesForNode {
481    type Result = super::results::GetAnimatedStylesForNodeResult;
482}
483#[doc = "Returns requested styles for a DOM node identified by `nodeId`.\n[getMatchedStylesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getMatchedStylesForNode)"]
484#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
485pub struct GetMatchedStylesForNodeParams {
486    #[serde(rename = "nodeId")]
487    pub node_id: crate::browser_protocol::dom::types::NodeId,
488}
489impl GetMatchedStylesForNodeParams {
490    pub fn new(node_id: impl Into<crate::browser_protocol::dom::types::NodeId>) -> Self {
491        Self {
492            node_id: node_id.into(),
493        }
494    }
495}
496#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
497pub enum GetMatchedStylesForNodeMethod {
498    #[serde(rename = "CSS.getMatchedStylesForNode")]
499    GetMatchedStylesForNode,
500}
501#[doc = "Returns requested styles for a DOM node identified by `nodeId`.\n[getMatchedStylesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getMatchedStylesForNode)"]
502#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
503pub struct GetMatchedStylesForNode {
504    pub method: GetMatchedStylesForNodeMethod,
505    pub params: GetMatchedStylesForNodeParams,
506}
507impl GetMatchedStylesForNode {
508    pub const IDENTIFIER: &'static str = "CSS.getMatchedStylesForNode";
509    pub fn identifier(&self) -> &'static str {
510        Self::IDENTIFIER
511    }
512}
513impl crate::CommandResult for GetMatchedStylesForNode {
514    type Result = super::results::GetMatchedStylesForNodeResult;
515}
516#[doc = "Returns the values of the default UA-defined environment variables used in env()\n[getEnvironmentVariables](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getEnvironmentVariables)"]
517#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
518pub struct GetEnvironmentVariablesParams {}
519#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
520pub enum GetEnvironmentVariablesMethod {
521    #[serde(rename = "CSS.getEnvironmentVariables")]
522    GetEnvironmentVariables,
523}
524#[doc = "Returns the values of the default UA-defined environment variables used in env()\n[getEnvironmentVariables](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getEnvironmentVariables)"]
525#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
526pub struct GetEnvironmentVariables {
527    pub method: GetEnvironmentVariablesMethod,
528    pub params: GetEnvironmentVariablesParams,
529}
530impl GetEnvironmentVariables {
531    pub const IDENTIFIER: &'static str = "CSS.getEnvironmentVariables";
532    pub fn identifier(&self) -> &'static str {
533        Self::IDENTIFIER
534    }
535}
536impl crate::CommandResult for GetEnvironmentVariables {
537    type Result = super::results::GetEnvironmentVariablesResult;
538}
539#[doc = "Returns all media queries parsed by the rendering engine.\n[getMediaQueries](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getMediaQueries)"]
540#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
541pub struct GetMediaQueriesParams {}
542#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
543pub enum GetMediaQueriesMethod {
544    #[serde(rename = "CSS.getMediaQueries")]
545    GetMediaQueries,
546}
547#[doc = "Returns all media queries parsed by the rendering engine.\n[getMediaQueries](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getMediaQueries)"]
548#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
549pub struct GetMediaQueries {
550    pub method: GetMediaQueriesMethod,
551    pub params: GetMediaQueriesParams,
552}
553impl GetMediaQueries {
554    pub const IDENTIFIER: &'static str = "CSS.getMediaQueries";
555    pub fn identifier(&self) -> &'static str {
556        Self::IDENTIFIER
557    }
558}
559impl crate::CommandResult for GetMediaQueries {
560    type Result = super::results::GetMediaQueriesResult;
561}
562#[doc = "Requests information about platform fonts which we used to render child TextNodes in the given\nnode.\n[getPlatformFontsForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getPlatformFontsForNode)"]
563#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
564pub struct GetPlatformFontsForNodeParams {
565    #[serde(rename = "nodeId")]
566    pub node_id: crate::browser_protocol::dom::types::NodeId,
567}
568impl GetPlatformFontsForNodeParams {
569    pub fn new(node_id: impl Into<crate::browser_protocol::dom::types::NodeId>) -> Self {
570        Self {
571            node_id: node_id.into(),
572        }
573    }
574}
575#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
576pub enum GetPlatformFontsForNodeMethod {
577    #[serde(rename = "CSS.getPlatformFontsForNode")]
578    GetPlatformFontsForNode,
579}
580#[doc = "Requests information about platform fonts which we used to render child TextNodes in the given\nnode.\n[getPlatformFontsForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getPlatformFontsForNode)"]
581#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
582pub struct GetPlatformFontsForNode {
583    pub method: GetPlatformFontsForNodeMethod,
584    pub params: GetPlatformFontsForNodeParams,
585}
586impl GetPlatformFontsForNode {
587    pub const IDENTIFIER: &'static str = "CSS.getPlatformFontsForNode";
588    pub fn identifier(&self) -> &'static str {
589        Self::IDENTIFIER
590    }
591}
592impl crate::CommandResult for GetPlatformFontsForNode {
593    type Result = super::results::GetPlatformFontsForNodeResult;
594}
595#[doc = "Returns the current textual content for a stylesheet.\n[getStyleSheetText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getStyleSheetText)"]
596#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
597pub struct GetStyleSheetTextParams {
598    #[serde(rename = "styleSheetId")]
599    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
600}
601impl GetStyleSheetTextParams {
602    pub fn new(
603        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
604    ) -> Self {
605        Self {
606            style_sheet_id: style_sheet_id.into(),
607        }
608    }
609}
610#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
611pub enum GetStyleSheetTextMethod {
612    #[serde(rename = "CSS.getStyleSheetText")]
613    GetStyleSheetText,
614}
615#[doc = "Returns the current textual content for a stylesheet.\n[getStyleSheetText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getStyleSheetText)"]
616#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
617pub struct GetStyleSheetText {
618    pub method: GetStyleSheetTextMethod,
619    pub params: GetStyleSheetTextParams,
620}
621impl GetStyleSheetText {
622    pub const IDENTIFIER: &'static str = "CSS.getStyleSheetText";
623    pub fn identifier(&self) -> &'static str {
624        Self::IDENTIFIER
625    }
626}
627impl crate::CommandResult for GetStyleSheetText {
628    type Result = super::results::GetStyleSheetTextResult;
629}
630#[doc = "Returns all layers parsed by the rendering engine for the tree scope of a node.\nGiven a DOM element identified by nodeId, getLayersForNode returns the root\nlayer for the nearest ancestor document or shadow root. The layer root contains\nthe full layer tree for the tree scope and their ordering.\n[getLayersForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getLayersForNode)"]
631#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
632pub struct GetLayersForNodeParams {
633    #[serde(rename = "nodeId")]
634    pub node_id: crate::browser_protocol::dom::types::NodeId,
635}
636impl GetLayersForNodeParams {
637    pub fn new(node_id: impl Into<crate::browser_protocol::dom::types::NodeId>) -> Self {
638        Self {
639            node_id: node_id.into(),
640        }
641    }
642}
643#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
644pub enum GetLayersForNodeMethod {
645    #[serde(rename = "CSS.getLayersForNode")]
646    GetLayersForNode,
647}
648#[doc = "Returns all layers parsed by the rendering engine for the tree scope of a node.\nGiven a DOM element identified by nodeId, getLayersForNode returns the root\nlayer for the nearest ancestor document or shadow root. The layer root contains\nthe full layer tree for the tree scope and their ordering.\n[getLayersForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getLayersForNode)"]
649#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
650pub struct GetLayersForNode {
651    pub method: GetLayersForNodeMethod,
652    pub params: GetLayersForNodeParams,
653}
654impl GetLayersForNode {
655    pub const IDENTIFIER: &'static str = "CSS.getLayersForNode";
656    pub fn identifier(&self) -> &'static str {
657        Self::IDENTIFIER
658    }
659}
660impl crate::CommandResult for GetLayersForNode {
661    type Result = super::results::GetLayersForNodeResult;
662}
663#[doc = "Given a CSS selector text and a style sheet ID, getLocationForSelector\nreturns an array of locations of the CSS selector in the style sheet.\n[getLocationForSelector](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getLocationForSelector)"]
664#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
665pub struct GetLocationForSelectorParams {
666    #[serde(rename = "styleSheetId")]
667    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
668    #[serde(rename = "selectorText")]
669    pub selector_text: String,
670}
671impl GetLocationForSelectorParams {
672    pub fn new(
673        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
674        selector_text: impl Into<String>,
675    ) -> Self {
676        Self {
677            style_sheet_id: style_sheet_id.into(),
678            selector_text: selector_text.into(),
679        }
680    }
681}
682#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
683pub enum GetLocationForSelectorMethod {
684    #[serde(rename = "CSS.getLocationForSelector")]
685    GetLocationForSelector,
686}
687#[doc = "Given a CSS selector text and a style sheet ID, getLocationForSelector\nreturns an array of locations of the CSS selector in the style sheet.\n[getLocationForSelector](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-getLocationForSelector)"]
688#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
689pub struct GetLocationForSelector {
690    pub method: GetLocationForSelectorMethod,
691    pub params: GetLocationForSelectorParams,
692}
693impl GetLocationForSelector {
694    pub const IDENTIFIER: &'static str = "CSS.getLocationForSelector";
695    pub fn identifier(&self) -> &'static str {
696        Self::IDENTIFIER
697    }
698}
699impl crate::CommandResult for GetLocationForSelector {
700    type Result = super::results::GetLocationForSelectorResult;
701}
702#[doc = "Starts tracking the given node for the computed style updates\nand whenever the computed style is updated for node, it queues\na `computedStyleUpdated` event with throttling.\nThere can only be 1 node tracked for computed style updates\nso passing a new node id removes tracking from the previous node.\nPass `undefined` to disable tracking.\n[trackComputedStyleUpdatesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-trackComputedStyleUpdatesForNode)"]
703#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
704pub struct TrackComputedStyleUpdatesForNodeParams {
705    #[serde(rename = "nodeId")]
706    #[serde(skip_serializing_if = "Option::is_none")]
707    #[serde(default)]
708    pub node_id: Option<crate::browser_protocol::dom::types::NodeId>,
709}
710#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
711pub enum TrackComputedStyleUpdatesForNodeMethod {
712    #[serde(rename = "CSS.trackComputedStyleUpdatesForNode")]
713    TrackComputedStyleUpdatesForNode,
714}
715#[doc = "Starts tracking the given node for the computed style updates\nand whenever the computed style is updated for node, it queues\na `computedStyleUpdated` event with throttling.\nThere can only be 1 node tracked for computed style updates\nso passing a new node id removes tracking from the previous node.\nPass `undefined` to disable tracking.\n[trackComputedStyleUpdatesForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-trackComputedStyleUpdatesForNode)"]
716#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
717pub struct TrackComputedStyleUpdatesForNode {
718    pub method: TrackComputedStyleUpdatesForNodeMethod,
719    pub params: TrackComputedStyleUpdatesForNodeParams,
720}
721impl TrackComputedStyleUpdatesForNode {
722    pub const IDENTIFIER: &'static str = "CSS.trackComputedStyleUpdatesForNode";
723    pub fn identifier(&self) -> &'static str {
724        Self::IDENTIFIER
725    }
726}
727impl crate::CommandResult for TrackComputedStyleUpdatesForNode {
728    type Result = super::results::TrackComputedStyleUpdatesForNodeResult;
729}
730#[doc = "Starts tracking the given computed styles for updates. The specified array of properties\nreplaces the one previously specified. Pass empty array to disable tracking.\nUse takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\nThe changes to computed style properties are only tracked for nodes pushed to the front-end\nby the DOM agent. If no changes to the tracked properties occur after the node has been pushed\nto the front-end, no updates will be issued for the node.\n[trackComputedStyleUpdates](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-trackComputedStyleUpdates)"]
731#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
732pub struct TrackComputedStyleUpdatesParams {
733    #[serde(rename = "propertiesToTrack")]
734    #[serde(skip_serializing_if = "Vec::is_empty")]
735    pub properties_to_track: Vec<super::types::CssComputedStyleProperty>,
736}
737impl TrackComputedStyleUpdatesParams {
738    pub fn new(properties_to_track: Vec<super::types::CssComputedStyleProperty>) -> Self {
739        Self {
740            properties_to_track,
741        }
742    }
743}
744#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
745pub enum TrackComputedStyleUpdatesMethod {
746    #[serde(rename = "CSS.trackComputedStyleUpdates")]
747    TrackComputedStyleUpdates,
748}
749#[doc = "Starts tracking the given computed styles for updates. The specified array of properties\nreplaces the one previously specified. Pass empty array to disable tracking.\nUse takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\nThe changes to computed style properties are only tracked for nodes pushed to the front-end\nby the DOM agent. If no changes to the tracked properties occur after the node has been pushed\nto the front-end, no updates will be issued for the node.\n[trackComputedStyleUpdates](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-trackComputedStyleUpdates)"]
750#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
751pub struct TrackComputedStyleUpdates {
752    pub method: TrackComputedStyleUpdatesMethod,
753    pub params: TrackComputedStyleUpdatesParams,
754}
755impl TrackComputedStyleUpdates {
756    pub const IDENTIFIER: &'static str = "CSS.trackComputedStyleUpdates";
757    pub fn identifier(&self) -> &'static str {
758        Self::IDENTIFIER
759    }
760}
761impl crate::CommandResult for TrackComputedStyleUpdates {
762    type Result = super::results::TrackComputedStyleUpdatesResult;
763}
764#[doc = "Polls the next batch of computed style updates.\n[takeComputedStyleUpdates](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-takeComputedStyleUpdates)"]
765#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
766pub struct TakeComputedStyleUpdatesParams {}
767#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
768pub enum TakeComputedStyleUpdatesMethod {
769    #[serde(rename = "CSS.takeComputedStyleUpdates")]
770    TakeComputedStyleUpdates,
771}
772#[doc = "Polls the next batch of computed style updates.\n[takeComputedStyleUpdates](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-takeComputedStyleUpdates)"]
773#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
774pub struct TakeComputedStyleUpdates {
775    pub method: TakeComputedStyleUpdatesMethod,
776    pub params: TakeComputedStyleUpdatesParams,
777}
778impl TakeComputedStyleUpdates {
779    pub const IDENTIFIER: &'static str = "CSS.takeComputedStyleUpdates";
780    pub fn identifier(&self) -> &'static str {
781        Self::IDENTIFIER
782    }
783}
784impl crate::CommandResult for TakeComputedStyleUpdates {
785    type Result = super::results::TakeComputedStyleUpdatesResult;
786}
787#[doc = "Find a rule with the given active property for the given node and set the new value for this\nproperty\n[setEffectivePropertyValueForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setEffectivePropertyValueForNode)"]
788#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
789pub struct SetEffectivePropertyValueForNodeParams {
790    #[doc = "The element id for which to set property."]
791    #[serde(rename = "nodeId")]
792    pub node_id: crate::browser_protocol::dom::types::NodeId,
793    #[serde(rename = "propertyName")]
794    pub property_name: String,
795    #[serde(rename = "value")]
796    pub value: String,
797}
798impl SetEffectivePropertyValueForNodeParams {
799    pub fn new(
800        node_id: impl Into<crate::browser_protocol::dom::types::NodeId>,
801        property_name: impl Into<String>,
802        value: impl Into<String>,
803    ) -> Self {
804        Self {
805            node_id: node_id.into(),
806            property_name: property_name.into(),
807            value: value.into(),
808        }
809    }
810}
811#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
812pub enum SetEffectivePropertyValueForNodeMethod {
813    #[serde(rename = "CSS.setEffectivePropertyValueForNode")]
814    SetEffectivePropertyValueForNode,
815}
816#[doc = "Find a rule with the given active property for the given node and set the new value for this\nproperty\n[setEffectivePropertyValueForNode](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setEffectivePropertyValueForNode)"]
817#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
818pub struct SetEffectivePropertyValueForNode {
819    pub method: SetEffectivePropertyValueForNodeMethod,
820    pub params: SetEffectivePropertyValueForNodeParams,
821}
822impl SetEffectivePropertyValueForNode {
823    pub const IDENTIFIER: &'static str = "CSS.setEffectivePropertyValueForNode";
824    pub fn identifier(&self) -> &'static str {
825        Self::IDENTIFIER
826    }
827}
828impl crate::CommandResult for SetEffectivePropertyValueForNode {
829    type Result = super::results::SetEffectivePropertyValueForNodeResult;
830}
831#[doc = "Modifies the property rule property name.\n[setPropertyRulePropertyName](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setPropertyRulePropertyName)"]
832#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
833pub struct SetPropertyRulePropertyNameParams {
834    #[serde(rename = "styleSheetId")]
835    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
836    #[serde(rename = "range")]
837    pub range: super::types::SourceRange,
838    #[serde(rename = "propertyName")]
839    pub property_name: String,
840}
841impl SetPropertyRulePropertyNameParams {
842    pub fn new(
843        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
844        range: impl Into<super::types::SourceRange>,
845        property_name: impl Into<String>,
846    ) -> Self {
847        Self {
848            style_sheet_id: style_sheet_id.into(),
849            range: range.into(),
850            property_name: property_name.into(),
851        }
852    }
853}
854#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
855pub enum SetPropertyRulePropertyNameMethod {
856    #[serde(rename = "CSS.setPropertyRulePropertyName")]
857    SetPropertyRulePropertyName,
858}
859#[doc = "Modifies the property rule property name.\n[setPropertyRulePropertyName](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setPropertyRulePropertyName)"]
860#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
861pub struct SetPropertyRulePropertyName {
862    pub method: SetPropertyRulePropertyNameMethod,
863    pub params: SetPropertyRulePropertyNameParams,
864}
865impl SetPropertyRulePropertyName {
866    pub const IDENTIFIER: &'static str = "CSS.setPropertyRulePropertyName";
867    pub fn identifier(&self) -> &'static str {
868        Self::IDENTIFIER
869    }
870}
871impl crate::CommandResult for SetPropertyRulePropertyName {
872    type Result = super::results::SetPropertyRulePropertyNameResult;
873}
874#[doc = "Modifies the keyframe rule key text.\n[setKeyframeKey](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setKeyframeKey)"]
875#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
876pub struct SetKeyframeKeyParams {
877    #[serde(rename = "styleSheetId")]
878    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
879    #[serde(rename = "range")]
880    pub range: super::types::SourceRange,
881    #[serde(rename = "keyText")]
882    pub key_text: String,
883}
884impl SetKeyframeKeyParams {
885    pub fn new(
886        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
887        range: impl Into<super::types::SourceRange>,
888        key_text: impl Into<String>,
889    ) -> Self {
890        Self {
891            style_sheet_id: style_sheet_id.into(),
892            range: range.into(),
893            key_text: key_text.into(),
894        }
895    }
896}
897#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
898pub enum SetKeyframeKeyMethod {
899    #[serde(rename = "CSS.setKeyframeKey")]
900    SetKeyframeKey,
901}
902#[doc = "Modifies the keyframe rule key text.\n[setKeyframeKey](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setKeyframeKey)"]
903#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
904pub struct SetKeyframeKey {
905    pub method: SetKeyframeKeyMethod,
906    pub params: SetKeyframeKeyParams,
907}
908impl SetKeyframeKey {
909    pub const IDENTIFIER: &'static str = "CSS.setKeyframeKey";
910    pub fn identifier(&self) -> &'static str {
911        Self::IDENTIFIER
912    }
913}
914impl crate::CommandResult for SetKeyframeKey {
915    type Result = super::results::SetKeyframeKeyResult;
916}
917#[doc = "Modifies the rule selector.\n[setMediaText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setMediaText)"]
918#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
919pub struct SetMediaTextParams {
920    #[serde(rename = "styleSheetId")]
921    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
922    #[serde(rename = "range")]
923    pub range: super::types::SourceRange,
924    #[serde(rename = "text")]
925    pub text: String,
926}
927impl SetMediaTextParams {
928    pub fn new(
929        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
930        range: impl Into<super::types::SourceRange>,
931        text: impl Into<String>,
932    ) -> Self {
933        Self {
934            style_sheet_id: style_sheet_id.into(),
935            range: range.into(),
936            text: text.into(),
937        }
938    }
939}
940#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
941pub enum SetMediaTextMethod {
942    #[serde(rename = "CSS.setMediaText")]
943    SetMediaText,
944}
945#[doc = "Modifies the rule selector.\n[setMediaText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setMediaText)"]
946#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
947pub struct SetMediaText {
948    pub method: SetMediaTextMethod,
949    pub params: SetMediaTextParams,
950}
951impl SetMediaText {
952    pub const IDENTIFIER: &'static str = "CSS.setMediaText";
953    pub fn identifier(&self) -> &'static str {
954        Self::IDENTIFIER
955    }
956}
957impl crate::CommandResult for SetMediaText {
958    type Result = super::results::SetMediaTextResult;
959}
960#[doc = "Modifies the expression of a container query.\n[setContainerQueryText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setContainerQueryText)"]
961#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
962pub struct SetContainerQueryTextParams {
963    #[serde(rename = "styleSheetId")]
964    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
965    #[serde(rename = "range")]
966    pub range: super::types::SourceRange,
967    #[serde(rename = "text")]
968    pub text: String,
969}
970impl SetContainerQueryTextParams {
971    pub fn new(
972        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
973        range: impl Into<super::types::SourceRange>,
974        text: impl Into<String>,
975    ) -> Self {
976        Self {
977            style_sheet_id: style_sheet_id.into(),
978            range: range.into(),
979            text: text.into(),
980        }
981    }
982}
983#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
984pub enum SetContainerQueryTextMethod {
985    #[serde(rename = "CSS.setContainerQueryText")]
986    SetContainerQueryText,
987}
988#[doc = "Modifies the expression of a container query.\n[setContainerQueryText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setContainerQueryText)"]
989#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
990pub struct SetContainerQueryText {
991    pub method: SetContainerQueryTextMethod,
992    pub params: SetContainerQueryTextParams,
993}
994impl SetContainerQueryText {
995    pub const IDENTIFIER: &'static str = "CSS.setContainerQueryText";
996    pub fn identifier(&self) -> &'static str {
997        Self::IDENTIFIER
998    }
999}
1000impl crate::CommandResult for SetContainerQueryText {
1001    type Result = super::results::SetContainerQueryTextResult;
1002}
1003#[doc = "Modifies the expression of a supports at-rule.\n[setSupportsText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setSupportsText)"]
1004#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1005pub struct SetSupportsTextParams {
1006    #[serde(rename = "styleSheetId")]
1007    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
1008    #[serde(rename = "range")]
1009    pub range: super::types::SourceRange,
1010    #[serde(rename = "text")]
1011    pub text: String,
1012}
1013impl SetSupportsTextParams {
1014    pub fn new(
1015        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
1016        range: impl Into<super::types::SourceRange>,
1017        text: impl Into<String>,
1018    ) -> Self {
1019        Self {
1020            style_sheet_id: style_sheet_id.into(),
1021            range: range.into(),
1022            text: text.into(),
1023        }
1024    }
1025}
1026#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1027pub enum SetSupportsTextMethod {
1028    #[serde(rename = "CSS.setSupportsText")]
1029    SetSupportsText,
1030}
1031#[doc = "Modifies the expression of a supports at-rule.\n[setSupportsText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setSupportsText)"]
1032#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1033pub struct SetSupportsText {
1034    pub method: SetSupportsTextMethod,
1035    pub params: SetSupportsTextParams,
1036}
1037impl SetSupportsText {
1038    pub const IDENTIFIER: &'static str = "CSS.setSupportsText";
1039    pub fn identifier(&self) -> &'static str {
1040        Self::IDENTIFIER
1041    }
1042}
1043impl crate::CommandResult for SetSupportsText {
1044    type Result = super::results::SetSupportsTextResult;
1045}
1046#[doc = "Modifies the expression of a scope at-rule.\n[setScopeText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setScopeText)"]
1047#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1048pub struct SetScopeTextParams {
1049    #[serde(rename = "styleSheetId")]
1050    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
1051    #[serde(rename = "range")]
1052    pub range: super::types::SourceRange,
1053    #[serde(rename = "text")]
1054    pub text: String,
1055}
1056impl SetScopeTextParams {
1057    pub fn new(
1058        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
1059        range: impl Into<super::types::SourceRange>,
1060        text: impl Into<String>,
1061    ) -> Self {
1062        Self {
1063            style_sheet_id: style_sheet_id.into(),
1064            range: range.into(),
1065            text: text.into(),
1066        }
1067    }
1068}
1069#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1070pub enum SetScopeTextMethod {
1071    #[serde(rename = "CSS.setScopeText")]
1072    SetScopeText,
1073}
1074#[doc = "Modifies the expression of a scope at-rule.\n[setScopeText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setScopeText)"]
1075#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1076pub struct SetScopeText {
1077    pub method: SetScopeTextMethod,
1078    pub params: SetScopeTextParams,
1079}
1080impl SetScopeText {
1081    pub const IDENTIFIER: &'static str = "CSS.setScopeText";
1082    pub fn identifier(&self) -> &'static str {
1083        Self::IDENTIFIER
1084    }
1085}
1086impl crate::CommandResult for SetScopeText {
1087    type Result = super::results::SetScopeTextResult;
1088}
1089#[doc = "Modifies the rule selector.\n[setRuleSelector](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setRuleSelector)"]
1090#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1091pub struct SetRuleSelectorParams {
1092    #[serde(rename = "styleSheetId")]
1093    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
1094    #[serde(rename = "range")]
1095    pub range: super::types::SourceRange,
1096    #[serde(rename = "selector")]
1097    pub selector: String,
1098}
1099impl SetRuleSelectorParams {
1100    pub fn new(
1101        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
1102        range: impl Into<super::types::SourceRange>,
1103        selector: impl Into<String>,
1104    ) -> Self {
1105        Self {
1106            style_sheet_id: style_sheet_id.into(),
1107            range: range.into(),
1108            selector: selector.into(),
1109        }
1110    }
1111}
1112#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1113pub enum SetRuleSelectorMethod {
1114    #[serde(rename = "CSS.setRuleSelector")]
1115    SetRuleSelector,
1116}
1117#[doc = "Modifies the rule selector.\n[setRuleSelector](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setRuleSelector)"]
1118#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1119pub struct SetRuleSelector {
1120    pub method: SetRuleSelectorMethod,
1121    pub params: SetRuleSelectorParams,
1122}
1123impl SetRuleSelector {
1124    pub const IDENTIFIER: &'static str = "CSS.setRuleSelector";
1125    pub fn identifier(&self) -> &'static str {
1126        Self::IDENTIFIER
1127    }
1128}
1129impl crate::CommandResult for SetRuleSelector {
1130    type Result = super::results::SetRuleSelectorResult;
1131}
1132#[doc = "Sets the new stylesheet text.\n[setStyleSheetText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setStyleSheetText)"]
1133#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1134pub struct SetStyleSheetTextParams {
1135    #[serde(rename = "styleSheetId")]
1136    pub style_sheet_id: crate::browser_protocol::dom::types::StyleSheetId,
1137    #[serde(rename = "text")]
1138    pub text: String,
1139}
1140impl SetStyleSheetTextParams {
1141    pub fn new(
1142        style_sheet_id: impl Into<crate::browser_protocol::dom::types::StyleSheetId>,
1143        text: impl Into<String>,
1144    ) -> Self {
1145        Self {
1146            style_sheet_id: style_sheet_id.into(),
1147            text: text.into(),
1148        }
1149    }
1150}
1151#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1152pub enum SetStyleSheetTextMethod {
1153    #[serde(rename = "CSS.setStyleSheetText")]
1154    SetStyleSheetText,
1155}
1156#[doc = "Sets the new stylesheet text.\n[setStyleSheetText](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setStyleSheetText)"]
1157#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1158pub struct SetStyleSheetText {
1159    pub method: SetStyleSheetTextMethod,
1160    pub params: SetStyleSheetTextParams,
1161}
1162impl SetStyleSheetText {
1163    pub const IDENTIFIER: &'static str = "CSS.setStyleSheetText";
1164    pub fn identifier(&self) -> &'static str {
1165        Self::IDENTIFIER
1166    }
1167}
1168impl crate::CommandResult for SetStyleSheetText {
1169    type Result = super::results::SetStyleSheetTextResult;
1170}
1171#[doc = "Applies specified style edits one after another in the given order.\n[setStyleTexts](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setStyleTexts)"]
1172#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1173pub struct SetStyleTextsParams {
1174    #[serde(rename = "edits")]
1175    #[serde(skip_serializing_if = "Vec::is_empty")]
1176    pub edits: Vec<super::types::StyleDeclarationEdit>,
1177    #[doc = "NodeId for the DOM node in whose context custom property declarations for registered properties should be\nvalidated. If omitted, declarations in the new rule text can only be validated statically, which may produce\nincorrect results if the declaration contains a var() for example."]
1178    #[serde(rename = "nodeForPropertySyntaxValidation")]
1179    #[serde(skip_serializing_if = "Option::is_none")]
1180    #[serde(default)]
1181    pub node_for_property_syntax_validation: Option<crate::browser_protocol::dom::types::NodeId>,
1182}
1183impl SetStyleTextsParams {
1184    pub fn new(edits: Vec<super::types::StyleDeclarationEdit>) -> Self {
1185        Self {
1186            edits,
1187            node_for_property_syntax_validation: None,
1188        }
1189    }
1190}
1191#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1192pub enum SetStyleTextsMethod {
1193    #[serde(rename = "CSS.setStyleTexts")]
1194    SetStyleTexts,
1195}
1196#[doc = "Applies specified style edits one after another in the given order.\n[setStyleTexts](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setStyleTexts)"]
1197#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1198pub struct SetStyleTexts {
1199    pub method: SetStyleTextsMethod,
1200    pub params: SetStyleTextsParams,
1201}
1202impl SetStyleTexts {
1203    pub const IDENTIFIER: &'static str = "CSS.setStyleTexts";
1204    pub fn identifier(&self) -> &'static str {
1205        Self::IDENTIFIER
1206    }
1207}
1208impl crate::CommandResult for SetStyleTexts {
1209    type Result = super::results::SetStyleTextsResult;
1210}
1211#[doc = "Enables the selector recording.\n[startRuleUsageTracking](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-startRuleUsageTracking)"]
1212#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1213pub struct StartRuleUsageTrackingParams {}
1214#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1215pub enum StartRuleUsageTrackingMethod {
1216    #[serde(rename = "CSS.startRuleUsageTracking")]
1217    StartRuleUsageTracking,
1218}
1219#[doc = "Enables the selector recording.\n[startRuleUsageTracking](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-startRuleUsageTracking)"]
1220#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1221pub struct StartRuleUsageTracking {
1222    pub method: StartRuleUsageTrackingMethod,
1223    pub params: StartRuleUsageTrackingParams,
1224}
1225impl StartRuleUsageTracking {
1226    pub const IDENTIFIER: &'static str = "CSS.startRuleUsageTracking";
1227    pub fn identifier(&self) -> &'static str {
1228        Self::IDENTIFIER
1229    }
1230}
1231impl crate::CommandResult for StartRuleUsageTracking {
1232    type Result = super::results::StartRuleUsageTrackingResult;
1233}
1234#[doc = "Stop tracking rule usage and return the list of rules that were used since last call to\n`takeCoverageDelta` (or since start of coverage instrumentation).\n[stopRuleUsageTracking](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-stopRuleUsageTracking)"]
1235#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1236pub struct StopRuleUsageTrackingParams {}
1237#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1238pub enum StopRuleUsageTrackingMethod {
1239    #[serde(rename = "CSS.stopRuleUsageTracking")]
1240    StopRuleUsageTracking,
1241}
1242#[doc = "Stop tracking rule usage and return the list of rules that were used since last call to\n`takeCoverageDelta` (or since start of coverage instrumentation).\n[stopRuleUsageTracking](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-stopRuleUsageTracking)"]
1243#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1244pub struct StopRuleUsageTracking {
1245    pub method: StopRuleUsageTrackingMethod,
1246    pub params: StopRuleUsageTrackingParams,
1247}
1248impl StopRuleUsageTracking {
1249    pub const IDENTIFIER: &'static str = "CSS.stopRuleUsageTracking";
1250    pub fn identifier(&self) -> &'static str {
1251        Self::IDENTIFIER
1252    }
1253}
1254impl crate::CommandResult for StopRuleUsageTracking {
1255    type Result = super::results::StopRuleUsageTrackingResult;
1256}
1257#[doc = "Obtain list of rules that became used since last call to this method (or since start of coverage\ninstrumentation).\n[takeCoverageDelta](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-takeCoverageDelta)"]
1258#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1259pub struct TakeCoverageDeltaParams {}
1260#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1261pub enum TakeCoverageDeltaMethod {
1262    #[serde(rename = "CSS.takeCoverageDelta")]
1263    TakeCoverageDelta,
1264}
1265#[doc = "Obtain list of rules that became used since last call to this method (or since start of coverage\ninstrumentation).\n[takeCoverageDelta](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-takeCoverageDelta)"]
1266#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1267pub struct TakeCoverageDelta {
1268    pub method: TakeCoverageDeltaMethod,
1269    pub params: TakeCoverageDeltaParams,
1270}
1271impl TakeCoverageDelta {
1272    pub const IDENTIFIER: &'static str = "CSS.takeCoverageDelta";
1273    pub fn identifier(&self) -> &'static str {
1274        Self::IDENTIFIER
1275    }
1276}
1277impl crate::CommandResult for TakeCoverageDelta {
1278    type Result = super::results::TakeCoverageDeltaResult;
1279}
1280#[doc = "Enables/disables rendering of local CSS fonts (enabled by default).\n[setLocalFontsEnabled](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setLocalFontsEnabled)"]
1281#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1282pub struct SetLocalFontsEnabledParams {
1283    #[doc = "Whether rendering of local fonts is enabled."]
1284    #[serde(rename = "enabled")]
1285    pub enabled: bool,
1286}
1287impl SetLocalFontsEnabledParams {
1288    pub fn new(enabled: impl Into<bool>) -> Self {
1289        Self {
1290            enabled: enabled.into(),
1291        }
1292    }
1293}
1294#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1295pub enum SetLocalFontsEnabledMethod {
1296    #[serde(rename = "CSS.setLocalFontsEnabled")]
1297    SetLocalFontsEnabled,
1298}
1299#[doc = "Enables/disables rendering of local CSS fonts (enabled by default).\n[setLocalFontsEnabled](https://chromedevtools.github.io/devtools-protocol/tot/CSS/#method-setLocalFontsEnabled)"]
1300#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1301pub struct SetLocalFontsEnabled {
1302    pub method: SetLocalFontsEnabledMethod,
1303    pub params: SetLocalFontsEnabledParams,
1304}
1305impl SetLocalFontsEnabled {
1306    pub const IDENTIFIER: &'static str = "CSS.setLocalFontsEnabled";
1307    pub fn identifier(&self) -> &'static str {
1308        Self::IDENTIFIER
1309    }
1310}
1311impl crate::CommandResult for SetLocalFontsEnabled {
1312    type Result = super::results::SetLocalFontsEnabledResult;
1313}
1314group_enum ! (CssCommands { AddRule (AddRule) , CollectClassNames (CollectClassNames) , CreateStyleSheet (CreateStyleSheet) , Disable (Disable) , Enable (Enable) , ForcePseudoState (ForcePseudoState) , ForceStartingStyle (ForceStartingStyle) , GetBackgroundColors (GetBackgroundColors) , GetComputedStyleForNode (GetComputedStyleForNode) , ResolveValues (ResolveValues) , GetLonghandProperties (GetLonghandProperties) , GetInlineStylesForNode (GetInlineStylesForNode) , GetAnimatedStylesForNode (GetAnimatedStylesForNode) , GetMatchedStylesForNode (GetMatchedStylesForNode) , GetEnvironmentVariables (GetEnvironmentVariables) , GetMediaQueries (GetMediaQueries) , GetPlatformFontsForNode (GetPlatformFontsForNode) , GetStyleSheetText (GetStyleSheetText) , GetLayersForNode (GetLayersForNode) , GetLocationForSelector (GetLocationForSelector) , TrackComputedStyleUpdatesForNode (TrackComputedStyleUpdatesForNode) , TrackComputedStyleUpdates (TrackComputedStyleUpdates) , TakeComputedStyleUpdates (TakeComputedStyleUpdates) , SetEffectivePropertyValueForNode (SetEffectivePropertyValueForNode) , SetPropertyRulePropertyName (SetPropertyRulePropertyName) , SetKeyframeKey (SetKeyframeKey) , SetMediaText (SetMediaText) , SetContainerQueryText (SetContainerQueryText) , SetSupportsText (SetSupportsText) , SetScopeText (SetScopeText) , SetRuleSelector (SetRuleSelector) , SetStyleSheetText (SetStyleSheetText) , SetStyleTexts (SetStyleTexts) , StartRuleUsageTracking (StartRuleUsageTracking) , StopRuleUsageTracking (StopRuleUsageTracking) , TakeCoverageDelta (TakeCoverageDelta) , SetLocalFontsEnabled (SetLocalFontsEnabled) } + identifiable);