Skip to main content

allwright/
allwright.engine.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct PingRequest {}
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct PingResponse {
6    #[prost(string, tag = "1")]
7    pub message: ::prost::alloc::string::String,
8    #[prost(string, tag = "2")]
9    pub version: ::prost::alloc::string::String,
10}
11#[derive(Clone, Copy, PartialEq, ::prost::Message)]
12pub struct CommandRetryOptions {
13    #[prost(uint32, optional, tag = "1")]
14    pub timeout_ms: ::core::option::Option<u32>,
15    #[prost(uint32, optional, tag = "2")]
16    pub retry_interval_ms: ::core::option::Option<u32>,
17}
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct ConnectMobileCommand {
20    #[prost(enumeration = "MobilePlatform", tag = "1")]
21    pub platform: i32,
22    #[prost(string, optional, tag = "2")]
23    pub device: ::core::option::Option<::prost::alloc::string::String>,
24    #[prost(string, optional, tag = "3")]
25    pub adb_endpoint: ::core::option::Option<::prost::alloc::string::String>,
26    #[prost(bool, tag = "4")]
27    pub preserve_app_state: bool,
28    #[prost(message, optional, tag = "5")]
29    pub retry_options: ::core::option::Option<CommandRetryOptions>,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct MobileConnectedEvent {
33    #[prost(enumeration = "MobilePlatform", tag = "1")]
34    pub platform: i32,
35    #[prost(string, tag = "2")]
36    pub device_name: ::prost::alloc::string::String,
37    #[prost(string, tag = "3")]
38    pub note: ::prost::alloc::string::String,
39    #[prost(string, tag = "4")]
40    pub device_id: ::prost::alloc::string::String,
41    #[prost(enumeration = "DeviceConnectionKind", tag = "5")]
42    pub connection_kind: i32,
43    #[prost(string, tag = "6")]
44    pub backend: ::prost::alloc::string::String,
45    #[prost(string, tag = "7")]
46    pub device_session_id: ::prost::alloc::string::String,
47    #[prost(string, tag = "8")]
48    pub initial_app_session_id: ::prost::alloc::string::String,
49    #[prost(string, optional, tag = "9")]
50    pub package_name: ::core::option::Option<::prost::alloc::string::String>,
51    #[prost(string, optional, tag = "10")]
52    pub activity_name: ::core::option::Option<::prost::alloc::string::String>,
53}
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct LaunchAppCommand {
56    #[prost(string, optional, tag = "1")]
57    pub apk_path: ::core::option::Option<::prost::alloc::string::String>,
58    #[prost(string, optional, tag = "2")]
59    pub app_id: ::core::option::Option<::prost::alloc::string::String>,
60    #[prost(string, optional, tag = "3")]
61    pub launch_activity: ::core::option::Option<::prost::alloc::string::String>,
62    #[prost(bool, tag = "4")]
63    pub stop_before_launch: bool,
64    #[prost(message, optional, tag = "5")]
65    pub retry_options: ::core::option::Option<CommandRetryOptions>,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct AppLaunchedEvent {
69    #[prost(string, tag = "1")]
70    pub app_session_id: ::prost::alloc::string::String,
71    #[prost(string, tag = "2")]
72    pub note: ::prost::alloc::string::String,
73    #[prost(string, optional, tag = "3")]
74    pub package_name: ::core::option::Option<::prost::alloc::string::String>,
75    #[prost(string, optional, tag = "4")]
76    pub activity_name: ::core::option::Option<::prost::alloc::string::String>,
77    #[prost(string, optional, tag = "5")]
78    pub webview_context: ::core::option::Option<::prost::alloc::string::String>,
79}
80#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
81#[repr(i32)]
82pub enum MobilePlatform {
83    Unspecified = 0,
84    Android = 1,
85    Ios = 2,
86}
87impl MobilePlatform {
88    /// String value of the enum field names used in the ProtoBuf definition.
89    ///
90    /// The values are not transformed in any way and thus are considered stable
91    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
92    pub fn as_str_name(&self) -> &'static str {
93        match self {
94            Self::Unspecified => "MOBILE_PLATFORM_UNSPECIFIED",
95            Self::Android => "MOBILE_PLATFORM_ANDROID",
96            Self::Ios => "MOBILE_PLATFORM_IOS",
97        }
98    }
99    /// Creates an enum from field names used in the ProtoBuf definition.
100    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
101        match value {
102            "MOBILE_PLATFORM_UNSPECIFIED" => Some(Self::Unspecified),
103            "MOBILE_PLATFORM_ANDROID" => Some(Self::Android),
104            "MOBILE_PLATFORM_IOS" => Some(Self::Ios),
105            _ => None,
106        }
107    }
108}
109#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
110#[repr(i32)]
111pub enum DeviceConnectionKind {
112    Unspecified = 0,
113    Usb = 1,
114    Emulator = 2,
115    RemoteAdb = 3,
116}
117impl DeviceConnectionKind {
118    /// String value of the enum field names used in the ProtoBuf definition.
119    ///
120    /// The values are not transformed in any way and thus are considered stable
121    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
122    pub fn as_str_name(&self) -> &'static str {
123        match self {
124            Self::Unspecified => "DEVICE_CONNECTION_KIND_UNSPECIFIED",
125            Self::Usb => "DEVICE_CONNECTION_KIND_USB",
126            Self::Emulator => "DEVICE_CONNECTION_KIND_EMULATOR",
127            Self::RemoteAdb => "DEVICE_CONNECTION_KIND_REMOTE_ADB",
128        }
129    }
130    /// Creates an enum from field names used in the ProtoBuf definition.
131    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
132        match value {
133            "DEVICE_CONNECTION_KIND_UNSPECIFIED" => Some(Self::Unspecified),
134            "DEVICE_CONNECTION_KIND_USB" => Some(Self::Usb),
135            "DEVICE_CONNECTION_KIND_EMULATOR" => Some(Self::Emulator),
136            "DEVICE_CONNECTION_KIND_REMOTE_ADB" => Some(Self::RemoteAdb),
137            _ => None,
138        }
139    }
140}
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct LaunchBrowserCommand {
143    #[prost(enumeration = "BrowserKind", tag = "1")]
144    pub browser_kind: i32,
145    #[prost(string, optional, tag = "2")]
146    pub browser_binary: ::core::option::Option<::prost::alloc::string::String>,
147    #[prost(message, optional, tag = "3")]
148    pub retry_options: ::core::option::Option<CommandRetryOptions>,
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct BrowserLaunchedEvent {
152    #[prost(enumeration = "BrowserKind", tag = "1")]
153    pub browser_kind: i32,
154    #[prost(string, tag = "2")]
155    pub browser: ::prost::alloc::string::String,
156    #[prost(string, tag = "3")]
157    pub note: ::prost::alloc::string::String,
158    #[prost(string, tag = "4")]
159    pub user_data_dir: ::prost::alloc::string::String,
160    #[prost(string, tag = "5")]
161    pub initial_page_session_id: ::prost::alloc::string::String,
162}
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct LaunchChromeCommand {
165    #[prost(string, optional, tag = "1")]
166    pub chrome_binary: ::core::option::Option<::prost::alloc::string::String>,
167    #[prost(message, optional, tag = "2")]
168    pub retry_options: ::core::option::Option<CommandRetryOptions>,
169}
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct ChromeLaunchedEvent {
172    #[prost(string, tag = "1")]
173    pub browser: ::prost::alloc::string::String,
174    #[prost(string, tag = "2")]
175    pub note: ::prost::alloc::string::String,
176    #[prost(string, tag = "3")]
177    pub cdp_websocket_url: ::prost::alloc::string::String,
178    #[prost(string, tag = "4")]
179    pub user_data_dir: ::prost::alloc::string::String,
180    #[prost(string, tag = "5")]
181    pub initial_page_session_id: ::prost::alloc::string::String,
182}
183/// Empty format defaults to JSON. Accepted values are "json" and "yaml".
184#[derive(Clone, PartialEq, ::prost::Message)]
185pub struct AccessibilitySnapshotCommand {
186    /// Empty mode defaults to default. AI injects queryable aria-ref attributes.
187    /// Supported: default, ai, autoexpect, codegen.
188    #[prost(string, tag = "3")]
189    pub mode: ::prost::alloc::string::String,
190    #[prost(string, tag = "1")]
191    pub format: ::prost::alloc::string::String,
192    #[prost(message, optional, tag = "2")]
193    pub retry_options: ::core::option::Option<CommandRetryOptions>,
194}
195/// Both formats encode the same versioned, structured document.
196#[derive(Clone, PartialEq, ::prost::Message)]
197pub struct AccessibilitySnapshotCapturedEvent {
198    #[prost(string, tag = "1")]
199    pub snapshot: ::prost::alloc::string::String,
200    #[prost(string, tag = "2")]
201    pub format: ::prost::alloc::string::String,
202}
203#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
204#[repr(i32)]
205pub enum BrowserKind {
206    Unspecified = 0,
207    Chromium = 1,
208    Firefox = 2,
209}
210impl BrowserKind {
211    /// String value of the enum field names used in the ProtoBuf definition.
212    ///
213    /// The values are not transformed in any way and thus are considered stable
214    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
215    pub fn as_str_name(&self) -> &'static str {
216        match self {
217            Self::Unspecified => "BROWSER_KIND_UNSPECIFIED",
218            Self::Chromium => "BROWSER_KIND_CHROMIUM",
219            Self::Firefox => "BROWSER_KIND_FIREFOX",
220        }
221    }
222    /// Creates an enum from field names used in the ProtoBuf definition.
223    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
224        match value {
225            "BROWSER_KIND_UNSPECIFIED" => Some(Self::Unspecified),
226            "BROWSER_KIND_CHROMIUM" => Some(Self::Chromium),
227            "BROWSER_KIND_FIREFOX" => Some(Self::Firefox),
228            _ => None,
229        }
230    }
231}
232#[derive(Clone, PartialEq, ::prost::Message)]
233pub struct SurfaceSessionCommand {
234    #[prost(oneof = "surface_session_command::Command", tags = "1, 2, 3, 4, 5, 6, 7")]
235    pub command: ::core::option::Option<surface_session_command::Command>,
236}
237/// Nested message and enum types in `SurfaceSessionCommand`.
238pub mod surface_session_command {
239    #[derive(Clone, PartialEq, ::prost::Oneof)]
240    pub enum Command {
241        #[prost(message, tag = "1")]
242        LaunchChrome(super::LaunchChromeCommand),
243        #[prost(message, tag = "2")]
244        OpenContext(super::OpenContextCommand),
245        #[prost(message, tag = "3")]
246        Ping(super::SessionPingCommand),
247        #[prost(message, tag = "4")]
248        Close(super::CloseSurfaceSessionCommand),
249        #[prost(message, tag = "5")]
250        LaunchBrowser(super::LaunchBrowserCommand),
251        #[prost(message, tag = "6")]
252        ConnectMobile(super::ConnectMobileCommand),
253        #[prost(message, tag = "7")]
254        LaunchApp(super::LaunchAppCommand),
255    }
256}
257#[derive(Clone, Copy, PartialEq, ::prost::Message)]
258pub struct OpenContextCommand {
259    #[prost(message, optional, tag = "1")]
260    pub retry_options: ::core::option::Option<CommandRetryOptions>,
261}
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct SessionPingCommand {
264    #[prost(string, tag = "1")]
265    pub message: ::prost::alloc::string::String,
266}
267#[derive(Clone, Copy, PartialEq, ::prost::Message)]
268pub struct CloseSurfaceSessionCommand {}
269#[derive(Clone, PartialEq, ::prost::Message)]
270pub struct SurfaceSessionEvent {
271    #[prost(string, tag = "1")]
272    pub session_id: ::prost::alloc::string::String,
273    #[prost(oneof = "surface_session_event::Event", tags = "2, 3, 4, 5, 6, 7, 8, 9")]
274    pub event: ::core::option::Option<surface_session_event::Event>,
275}
276/// Nested message and enum types in `SurfaceSessionEvent`.
277pub mod surface_session_event {
278    #[derive(Clone, PartialEq, ::prost::Oneof)]
279    pub enum Event {
280        #[prost(message, tag = "2")]
281        ChromeLaunched(super::ChromeLaunchedEvent),
282        #[prost(message, tag = "3")]
283        ContextOpened(super::ContextOpenedEvent),
284        #[prost(message, tag = "4")]
285        Pong(super::SessionPongEvent),
286        #[prost(message, tag = "5")]
287        Closed(super::SurfaceSessionClosedEvent),
288        #[prost(message, tag = "6")]
289        Error(super::SurfaceSessionErrorEvent),
290        #[prost(message, tag = "7")]
291        BrowserLaunched(super::BrowserLaunchedEvent),
292        #[prost(message, tag = "8")]
293        MobileConnected(super::MobileConnectedEvent),
294        #[prost(message, tag = "9")]
295        AppLaunched(super::AppLaunchedEvent),
296    }
297}
298#[derive(Clone, PartialEq, ::prost::Message)]
299pub struct ContextOpenedEvent {
300    #[prost(string, tag = "1")]
301    pub context_session_id: ::prost::alloc::string::String,
302    #[prost(string, tag = "2")]
303    pub note: ::prost::alloc::string::String,
304}
305#[derive(Clone, PartialEq, ::prost::Message)]
306pub struct SessionPongEvent {
307    #[prost(string, tag = "1")]
308    pub message: ::prost::alloc::string::String,
309}
310#[derive(Clone, PartialEq, ::prost::Message)]
311pub struct SurfaceSessionClosedEvent {
312    #[prost(string, tag = "1")]
313    pub reason: ::prost::alloc::string::String,
314}
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct SurfaceSessionErrorEvent {
317    #[prost(string, tag = "1")]
318    pub message: ::prost::alloc::string::String,
319}
320#[derive(Clone, PartialEq, ::prost::Message)]
321pub struct ContextSessionCommand {
322    #[prost(string, tag = "1")]
323    pub surface_session_id: ::prost::alloc::string::String,
324    #[prost(string, tag = "2")]
325    pub context_session_id: ::prost::alloc::string::String,
326    #[prost(
327        oneof = "context_session_command::Command",
328        tags = "3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17"
329    )]
330    pub command: ::core::option::Option<context_session_command::Command>,
331}
332/// Nested message and enum types in `ContextSessionCommand`.
333pub mod context_session_command {
334    #[derive(Clone, PartialEq, ::prost::Oneof)]
335    pub enum Command {
336        #[prost(message, tag = "3")]
337        Ping(super::ContextSessionPingCommand),
338        #[prost(message, tag = "4")]
339        Close(super::CloseContextSessionCommand),
340        #[prost(message, tag = "5")]
341        Navigate(super::NavigatePageCommand),
342        #[prost(message, tag = "6")]
343        ClickElement(super::ClickElementCommand),
344        #[prost(message, tag = "7")]
345        CountElements(super::CountElementsCommand),
346        #[prost(message, tag = "8")]
347        HighlightElements(super::HighlightElementsCommand),
348        #[prost(message, tag = "9")]
349        FocusElement(super::FocusElementCommand),
350        #[prost(message, tag = "10")]
351        FillElement(super::FillElementCommand),
352        #[prost(message, tag = "11")]
353        HoverElement(super::HoverElementCommand),
354        #[prost(message, tag = "12")]
355        PressKey(super::PressKeyCommand),
356        #[prost(message, tag = "13")]
357        GetTextContent(super::GetTextContentCommand),
358        #[prost(message, tag = "14")]
359        GetInnerText(super::GetInnerTextCommand),
360        #[prost(message, tag = "15")]
361        WaitForSelector(super::WaitForSelectorCommand),
362        #[prost(message, tag = "16")]
363        Screenshot(super::ScreenshotCommand),
364        #[prost(message, tag = "17")]
365        AccessibilitySnapshot(super::AccessibilitySnapshotCommand),
366    }
367}
368#[derive(Clone, PartialEq, ::prost::Message)]
369pub struct ContextSessionPingCommand {
370    #[prost(string, tag = "1")]
371    pub message: ::prost::alloc::string::String,
372}
373#[derive(Clone, Copy, PartialEq, ::prost::Message)]
374pub struct CloseContextSessionCommand {}
375#[derive(Clone, PartialEq, ::prost::Message)]
376pub struct ContextSessionEvent {
377    #[prost(string, tag = "1")]
378    pub context_session_id: ::prost::alloc::string::String,
379    #[prost(
380        oneof = "context_session_event::Event",
381        tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
382    )]
383    pub event: ::core::option::Option<context_session_event::Event>,
384}
385/// Nested message and enum types in `ContextSessionEvent`.
386pub mod context_session_event {
387    #[derive(Clone, PartialEq, ::prost::Oneof)]
388    pub enum Event {
389        #[prost(message, tag = "2")]
390        Attached(super::ContextSessionAttachedEvent),
391        #[prost(message, tag = "3")]
392        Pong(super::ContextSessionPongEvent),
393        #[prost(message, tag = "4")]
394        Closed(super::ContextSessionClosedEvent),
395        #[prost(message, tag = "5")]
396        Error(super::ContextSessionErrorEvent),
397        #[prost(message, tag = "6")]
398        Navigated(super::PageNavigatedEvent),
399        #[prost(message, tag = "7")]
400        ChromiumBidiInjection(super::ChromiumBidiInjectionEvent),
401        #[prost(message, tag = "8")]
402        ElementClicked(super::ElementClickedEvent),
403        #[prost(message, tag = "9")]
404        ElementCounted(super::ElementCountedEvent),
405        #[prost(message, tag = "10")]
406        ElementsHighlighted(super::ElementsHighlightedEvent),
407        #[prost(message, tag = "11")]
408        ElementFocused(super::ElementFocusedEvent),
409        #[prost(message, tag = "12")]
410        ElementFilled(super::ElementFilledEvent),
411        #[prost(message, tag = "13")]
412        ElementHovered(super::ElementHoveredEvent),
413        #[prost(message, tag = "14")]
414        KeyPressed(super::KeyPressedEvent),
415        #[prost(message, tag = "15")]
416        TextContentResolved(super::TextContentResolvedEvent),
417        #[prost(message, tag = "16")]
418        InnerTextResolved(super::InnerTextResolvedEvent),
419        #[prost(message, tag = "17")]
420        SelectorWaitSatisfied(super::SelectorWaitSatisfiedEvent),
421        #[prost(message, tag = "18")]
422        ScreenshotCaptured(super::ScreenshotCapturedEvent),
423        #[prost(message, tag = "19")]
424        AccessibilitySnapshotCaptured(super::AccessibilitySnapshotCapturedEvent),
425    }
426}
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct ContextSessionAttachedEvent {
429    #[prost(string, tag = "1")]
430    pub note: ::prost::alloc::string::String,
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct ContextSessionPongEvent {
434    #[prost(string, tag = "1")]
435    pub message: ::prost::alloc::string::String,
436}
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct ContextSessionClosedEvent {
439    #[prost(string, tag = "1")]
440    pub reason: ::prost::alloc::string::String,
441}
442#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct ContextSessionErrorEvent {
444    #[prost(string, tag = "1")]
445    pub message: ::prost::alloc::string::String,
446}
447#[derive(Clone, PartialEq, ::prost::Message)]
448pub struct NavigatePageCommand {
449    #[prost(string, tag = "1")]
450    pub url: ::prost::alloc::string::String,
451    #[prost(message, optional, tag = "2")]
452    pub retry_options: ::core::option::Option<CommandRetryOptions>,
453}
454#[derive(Clone, PartialEq, ::prost::Message)]
455pub struct ClickElementCommand {
456    #[prost(string, tag = "1")]
457    pub css_selector: ::prost::alloc::string::String,
458    #[prost(message, optional, tag = "2")]
459    pub retry_options: ::core::option::Option<CommandRetryOptions>,
460}
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct CountElementsCommand {
463    #[prost(string, tag = "1")]
464    pub css_selector: ::prost::alloc::string::String,
465    #[prost(message, optional, tag = "2")]
466    pub retry_options: ::core::option::Option<CommandRetryOptions>,
467}
468#[derive(Clone, PartialEq, ::prost::Message)]
469pub struct HighlightElementsCommand {
470    #[prost(string, tag = "1")]
471    pub css_selector: ::prost::alloc::string::String,
472    #[prost(uint32, optional, tag = "2")]
473    pub duration_ms: ::core::option::Option<u32>,
474    #[prost(message, optional, tag = "3")]
475    pub retry_options: ::core::option::Option<CommandRetryOptions>,
476}
477#[derive(Clone, PartialEq, ::prost::Message)]
478pub struct FocusElementCommand {
479    #[prost(string, tag = "1")]
480    pub css_selector: ::prost::alloc::string::String,
481    #[prost(message, optional, tag = "2")]
482    pub retry_options: ::core::option::Option<CommandRetryOptions>,
483}
484#[derive(Clone, PartialEq, ::prost::Message)]
485pub struct FillElementCommand {
486    #[prost(string, tag = "1")]
487    pub css_selector: ::prost::alloc::string::String,
488    #[prost(string, tag = "2")]
489    pub value: ::prost::alloc::string::String,
490    #[prost(message, optional, tag = "3")]
491    pub retry_options: ::core::option::Option<CommandRetryOptions>,
492}
493#[derive(Clone, PartialEq, ::prost::Message)]
494pub struct HoverElementCommand {
495    #[prost(string, tag = "1")]
496    pub css_selector: ::prost::alloc::string::String,
497    #[prost(message, optional, tag = "2")]
498    pub retry_options: ::core::option::Option<CommandRetryOptions>,
499}
500#[derive(Clone, PartialEq, ::prost::Message)]
501pub struct PressKeyCommand {
502    #[prost(string, tag = "1")]
503    pub css_selector: ::prost::alloc::string::String,
504    #[prost(string, tag = "2")]
505    pub key: ::prost::alloc::string::String,
506    #[prost(string, optional, tag = "3")]
507    pub text: ::core::option::Option<::prost::alloc::string::String>,
508    #[prost(message, optional, tag = "4")]
509    pub retry_options: ::core::option::Option<CommandRetryOptions>,
510}
511#[derive(Clone, PartialEq, ::prost::Message)]
512pub struct GetTextContentCommand {
513    #[prost(string, tag = "1")]
514    pub css_selector: ::prost::alloc::string::String,
515    #[prost(message, optional, tag = "2")]
516    pub retry_options: ::core::option::Option<CommandRetryOptions>,
517}
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct GetInnerTextCommand {
520    #[prost(string, tag = "1")]
521    pub css_selector: ::prost::alloc::string::String,
522    #[prost(message, optional, tag = "2")]
523    pub retry_options: ::core::option::Option<CommandRetryOptions>,
524}
525#[derive(Clone, PartialEq, ::prost::Message)]
526pub struct WaitForSelectorCommand {
527    #[prost(string, tag = "1")]
528    pub css_selector: ::prost::alloc::string::String,
529    #[prost(bool, optional, tag = "2")]
530    pub visible: ::core::option::Option<bool>,
531    #[prost(message, optional, tag = "3")]
532    pub retry_options: ::core::option::Option<CommandRetryOptions>,
533}
534#[derive(Clone, Copy, PartialEq, ::prost::Message)]
535pub struct ScreenshotCommand {
536    #[prost(message, optional, tag = "1")]
537    pub retry_options: ::core::option::Option<CommandRetryOptions>,
538    #[prost(bool, optional, tag = "2")]
539    pub full_page: ::core::option::Option<bool>,
540}
541#[derive(Clone, PartialEq, ::prost::Message)]
542pub struct PageNavigatedEvent {
543    #[prost(string, tag = "1")]
544    pub url: ::prost::alloc::string::String,
545    #[prost(string, tag = "2")]
546    pub note: ::prost::alloc::string::String,
547}
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct ChromiumBidiInjectionEvent {
550    #[prost(string, tag = "1")]
551    pub note: ::prost::alloc::string::String,
552    #[prost(string, tag = "2")]
553    pub bidi_session_id: ::prost::alloc::string::String,
554    #[prost(string, tag = "3")]
555    pub mapper_target_id: ::prost::alloc::string::String,
556    #[prost(string, tag = "4")]
557    pub mapper_session_id: ::prost::alloc::string::String,
558    #[prost(string, tag = "5")]
559    pub package_version: ::prost::alloc::string::String,
560}
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct ElementClickedEvent {
563    #[prost(string, tag = "1")]
564    pub css_selector: ::prost::alloc::string::String,
565    #[prost(string, tag = "2")]
566    pub note: ::prost::alloc::string::String,
567    #[prost(string, tag = "3")]
568    pub bidi_session_id: ::prost::alloc::string::String,
569}
570#[derive(Clone, PartialEq, ::prost::Message)]
571pub struct ElementCountedEvent {
572    #[prost(string, tag = "1")]
573    pub css_selector: ::prost::alloc::string::String,
574    #[prost(uint32, tag = "2")]
575    pub count: u32,
576    #[prost(string, tag = "3")]
577    pub note: ::prost::alloc::string::String,
578}
579#[derive(Clone, PartialEq, ::prost::Message)]
580pub struct ElementsHighlightedEvent {
581    #[prost(string, tag = "1")]
582    pub css_selector: ::prost::alloc::string::String,
583    #[prost(uint32, tag = "2")]
584    pub count: u32,
585    #[prost(string, tag = "3")]
586    pub note: ::prost::alloc::string::String,
587}
588#[derive(Clone, PartialEq, ::prost::Message)]
589pub struct ElementFocusedEvent {
590    #[prost(string, tag = "1")]
591    pub css_selector: ::prost::alloc::string::String,
592    #[prost(string, tag = "2")]
593    pub note: ::prost::alloc::string::String,
594}
595#[derive(Clone, PartialEq, ::prost::Message)]
596pub struct ElementFilledEvent {
597    #[prost(string, tag = "1")]
598    pub css_selector: ::prost::alloc::string::String,
599    #[prost(string, tag = "2")]
600    pub value: ::prost::alloc::string::String,
601    #[prost(string, tag = "3")]
602    pub note: ::prost::alloc::string::String,
603}
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct ElementHoveredEvent {
606    #[prost(string, tag = "1")]
607    pub css_selector: ::prost::alloc::string::String,
608    #[prost(string, tag = "2")]
609    pub note: ::prost::alloc::string::String,
610}
611#[derive(Clone, PartialEq, ::prost::Message)]
612pub struct KeyPressedEvent {
613    #[prost(string, tag = "1")]
614    pub css_selector: ::prost::alloc::string::String,
615    #[prost(string, tag = "2")]
616    pub key: ::prost::alloc::string::String,
617    #[prost(string, tag = "3")]
618    pub note: ::prost::alloc::string::String,
619}
620#[derive(Clone, PartialEq, ::prost::Message)]
621pub struct TextContentResolvedEvent {
622    #[prost(string, tag = "1")]
623    pub css_selector: ::prost::alloc::string::String,
624    #[prost(string, tag = "2")]
625    pub text: ::prost::alloc::string::String,
626    #[prost(string, tag = "3")]
627    pub note: ::prost::alloc::string::String,
628}
629#[derive(Clone, PartialEq, ::prost::Message)]
630pub struct InnerTextResolvedEvent {
631    #[prost(string, tag = "1")]
632    pub css_selector: ::prost::alloc::string::String,
633    #[prost(string, tag = "2")]
634    pub text: ::prost::alloc::string::String,
635    #[prost(string, tag = "3")]
636    pub note: ::prost::alloc::string::String,
637}
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct SelectorWaitSatisfiedEvent {
640    #[prost(string, tag = "1")]
641    pub css_selector: ::prost::alloc::string::String,
642    #[prost(bool, tag = "2")]
643    pub visible: bool,
644    #[prost(string, tag = "3")]
645    pub note: ::prost::alloc::string::String,
646}
647#[derive(Clone, PartialEq, ::prost::Message)]
648pub struct ScreenshotCapturedEvent {
649    #[prost(bytes = "vec", tag = "1")]
650    pub png_data: ::prost::alloc::vec::Vec<u8>,
651    #[prost(string, tag = "2")]
652    pub note: ::prost::alloc::string::String,
653}
654/// Generated client implementations.
655pub mod engine_service_client {
656    #![allow(
657        unused_variables,
658        dead_code,
659        missing_docs,
660        clippy::wildcard_imports,
661        clippy::let_unit_value,
662    )]
663    use tonic::codegen::*;
664    use tonic::codegen::http::Uri;
665    #[derive(Debug, Clone)]
666    pub struct EngineServiceClient<T> {
667        inner: tonic::client::Grpc<T>,
668    }
669    impl EngineServiceClient<tonic::transport::Channel> {
670        /// Attempt to create a new client by connecting to a given endpoint.
671        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
672        where
673            D: TryInto<tonic::transport::Endpoint>,
674            D::Error: Into<StdError>,
675        {
676            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
677            Ok(Self::new(conn))
678        }
679    }
680    impl<T> EngineServiceClient<T>
681    where
682        T: tonic::client::GrpcService<tonic::body::BoxBody>,
683        T::Error: Into<StdError>,
684        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
685        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
686    {
687        pub fn new(inner: T) -> Self {
688            let inner = tonic::client::Grpc::new(inner);
689            Self { inner }
690        }
691        pub fn with_origin(inner: T, origin: Uri) -> Self {
692            let inner = tonic::client::Grpc::with_origin(inner, origin);
693            Self { inner }
694        }
695        pub fn with_interceptor<F>(
696            inner: T,
697            interceptor: F,
698        ) -> EngineServiceClient<InterceptedService<T, F>>
699        where
700            F: tonic::service::Interceptor,
701            T::ResponseBody: Default,
702            T: tonic::codegen::Service<
703                http::Request<tonic::body::BoxBody>,
704                Response = http::Response<
705                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
706                >,
707            >,
708            <T as tonic::codegen::Service<
709                http::Request<tonic::body::BoxBody>,
710            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
711        {
712            EngineServiceClient::new(InterceptedService::new(inner, interceptor))
713        }
714        /// Compress requests with the given encoding.
715        ///
716        /// This requires the server to support it otherwise it might respond with an
717        /// error.
718        #[must_use]
719        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
720            self.inner = self.inner.send_compressed(encoding);
721            self
722        }
723        /// Enable decompressing responses.
724        #[must_use]
725        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
726            self.inner = self.inner.accept_compressed(encoding);
727            self
728        }
729        /// Limits the maximum size of a decoded message.
730        ///
731        /// Default: `4MB`
732        #[must_use]
733        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
734            self.inner = self.inner.max_decoding_message_size(limit);
735            self
736        }
737        /// Limits the maximum size of an encoded message.
738        ///
739        /// Default: `usize::MAX`
740        #[must_use]
741        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
742            self.inner = self.inner.max_encoding_message_size(limit);
743            self
744        }
745        pub async fn ping(
746            &mut self,
747            request: impl tonic::IntoRequest<super::PingRequest>,
748        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
749            self.inner
750                .ready()
751                .await
752                .map_err(|e| {
753                    tonic::Status::unknown(
754                        format!("Service was not ready: {}", e.into()),
755                    )
756                })?;
757            let codec = tonic::codec::ProstCodec::default();
758            let path = http::uri::PathAndQuery::from_static(
759                "/allwright.engine.v1.EngineService/Ping",
760            );
761            let mut req = request.into_request();
762            req.extensions_mut()
763                .insert(GrpcMethod::new("allwright.engine.v1.EngineService", "Ping"));
764            self.inner.unary(req, path, codec).await
765        }
766        pub async fn surface_session(
767            &mut self,
768            request: impl tonic::IntoStreamingRequest<
769                Message = super::SurfaceSessionCommand,
770            >,
771        ) -> std::result::Result<
772            tonic::Response<tonic::codec::Streaming<super::SurfaceSessionEvent>>,
773            tonic::Status,
774        > {
775            self.inner
776                .ready()
777                .await
778                .map_err(|e| {
779                    tonic::Status::unknown(
780                        format!("Service was not ready: {}", e.into()),
781                    )
782                })?;
783            let codec = tonic::codec::ProstCodec::default();
784            let path = http::uri::PathAndQuery::from_static(
785                "/allwright.engine.v1.EngineService/SurfaceSession",
786            );
787            let mut req = request.into_streaming_request();
788            req.extensions_mut()
789                .insert(
790                    GrpcMethod::new(
791                        "allwright.engine.v1.EngineService",
792                        "SurfaceSession",
793                    ),
794                );
795            self.inner.streaming(req, path, codec).await
796        }
797        pub async fn context_session(
798            &mut self,
799            request: impl tonic::IntoStreamingRequest<
800                Message = super::ContextSessionCommand,
801            >,
802        ) -> std::result::Result<
803            tonic::Response<tonic::codec::Streaming<super::ContextSessionEvent>>,
804            tonic::Status,
805        > {
806            self.inner
807                .ready()
808                .await
809                .map_err(|e| {
810                    tonic::Status::unknown(
811                        format!("Service was not ready: {}", e.into()),
812                    )
813                })?;
814            let codec = tonic::codec::ProstCodec::default();
815            let path = http::uri::PathAndQuery::from_static(
816                "/allwright.engine.v1.EngineService/ContextSession",
817            );
818            let mut req = request.into_streaming_request();
819            req.extensions_mut()
820                .insert(
821                    GrpcMethod::new(
822                        "allwright.engine.v1.EngineService",
823                        "ContextSession",
824                    ),
825                );
826            self.inner.streaming(req, path, codec).await
827        }
828    }
829}
830/// Generated server implementations.
831pub mod engine_service_server {
832    #![allow(
833        unused_variables,
834        dead_code,
835        missing_docs,
836        clippy::wildcard_imports,
837        clippy::let_unit_value,
838    )]
839    use tonic::codegen::*;
840    /// Generated trait containing gRPC methods that should be implemented for use with EngineServiceServer.
841    #[async_trait]
842    pub trait EngineService: std::marker::Send + std::marker::Sync + 'static {
843        async fn ping(
844            &self,
845            request: tonic::Request<super::PingRequest>,
846        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status>;
847        /// Server streaming response type for the SurfaceSession method.
848        type SurfaceSessionStream: tonic::codegen::tokio_stream::Stream<
849                Item = std::result::Result<super::SurfaceSessionEvent, tonic::Status>,
850            >
851            + std::marker::Send
852            + 'static;
853        async fn surface_session(
854            &self,
855            request: tonic::Request<tonic::Streaming<super::SurfaceSessionCommand>>,
856        ) -> std::result::Result<
857            tonic::Response<Self::SurfaceSessionStream>,
858            tonic::Status,
859        >;
860        /// Server streaming response type for the ContextSession method.
861        type ContextSessionStream: tonic::codegen::tokio_stream::Stream<
862                Item = std::result::Result<super::ContextSessionEvent, tonic::Status>,
863            >
864            + std::marker::Send
865            + 'static;
866        async fn context_session(
867            &self,
868            request: tonic::Request<tonic::Streaming<super::ContextSessionCommand>>,
869        ) -> std::result::Result<
870            tonic::Response<Self::ContextSessionStream>,
871            tonic::Status,
872        >;
873    }
874    #[derive(Debug)]
875    pub struct EngineServiceServer<T> {
876        inner: Arc<T>,
877        accept_compression_encodings: EnabledCompressionEncodings,
878        send_compression_encodings: EnabledCompressionEncodings,
879        max_decoding_message_size: Option<usize>,
880        max_encoding_message_size: Option<usize>,
881    }
882    impl<T> EngineServiceServer<T> {
883        pub fn new(inner: T) -> Self {
884            Self::from_arc(Arc::new(inner))
885        }
886        pub fn from_arc(inner: Arc<T>) -> Self {
887            Self {
888                inner,
889                accept_compression_encodings: Default::default(),
890                send_compression_encodings: Default::default(),
891                max_decoding_message_size: None,
892                max_encoding_message_size: None,
893            }
894        }
895        pub fn with_interceptor<F>(
896            inner: T,
897            interceptor: F,
898        ) -> InterceptedService<Self, F>
899        where
900            F: tonic::service::Interceptor,
901        {
902            InterceptedService::new(Self::new(inner), interceptor)
903        }
904        /// Enable decompressing requests with the given encoding.
905        #[must_use]
906        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
907            self.accept_compression_encodings.enable(encoding);
908            self
909        }
910        /// Compress responses with the given encoding, if the client supports it.
911        #[must_use]
912        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
913            self.send_compression_encodings.enable(encoding);
914            self
915        }
916        /// Limits the maximum size of a decoded message.
917        ///
918        /// Default: `4MB`
919        #[must_use]
920        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
921            self.max_decoding_message_size = Some(limit);
922            self
923        }
924        /// Limits the maximum size of an encoded message.
925        ///
926        /// Default: `usize::MAX`
927        #[must_use]
928        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
929            self.max_encoding_message_size = Some(limit);
930            self
931        }
932    }
933    impl<T, B> tonic::codegen::Service<http::Request<B>> for EngineServiceServer<T>
934    where
935        T: EngineService,
936        B: Body + std::marker::Send + 'static,
937        B::Error: Into<StdError> + std::marker::Send + 'static,
938    {
939        type Response = http::Response<tonic::body::BoxBody>;
940        type Error = std::convert::Infallible;
941        type Future = BoxFuture<Self::Response, Self::Error>;
942        fn poll_ready(
943            &mut self,
944            _cx: &mut Context<'_>,
945        ) -> Poll<std::result::Result<(), Self::Error>> {
946            Poll::Ready(Ok(()))
947        }
948        fn call(&mut self, req: http::Request<B>) -> Self::Future {
949            match req.uri().path() {
950                "/allwright.engine.v1.EngineService/Ping" => {
951                    #[allow(non_camel_case_types)]
952                    struct PingSvc<T: EngineService>(pub Arc<T>);
953                    impl<
954                        T: EngineService,
955                    > tonic::server::UnaryService<super::PingRequest> for PingSvc<T> {
956                        type Response = super::PingResponse;
957                        type Future = BoxFuture<
958                            tonic::Response<Self::Response>,
959                            tonic::Status,
960                        >;
961                        fn call(
962                            &mut self,
963                            request: tonic::Request<super::PingRequest>,
964                        ) -> Self::Future {
965                            let inner = Arc::clone(&self.0);
966                            let fut = async move {
967                                <T as EngineService>::ping(&inner, request).await
968                            };
969                            Box::pin(fut)
970                        }
971                    }
972                    let accept_compression_encodings = self.accept_compression_encodings;
973                    let send_compression_encodings = self.send_compression_encodings;
974                    let max_decoding_message_size = self.max_decoding_message_size;
975                    let max_encoding_message_size = self.max_encoding_message_size;
976                    let inner = self.inner.clone();
977                    let fut = async move {
978                        let method = PingSvc(inner);
979                        let codec = tonic::codec::ProstCodec::default();
980                        let mut grpc = tonic::server::Grpc::new(codec)
981                            .apply_compression_config(
982                                accept_compression_encodings,
983                                send_compression_encodings,
984                            )
985                            .apply_max_message_size_config(
986                                max_decoding_message_size,
987                                max_encoding_message_size,
988                            );
989                        let res = grpc.unary(method, req).await;
990                        Ok(res)
991                    };
992                    Box::pin(fut)
993                }
994                "/allwright.engine.v1.EngineService/SurfaceSession" => {
995                    #[allow(non_camel_case_types)]
996                    struct SurfaceSessionSvc<T: EngineService>(pub Arc<T>);
997                    impl<
998                        T: EngineService,
999                    > tonic::server::StreamingService<super::SurfaceSessionCommand>
1000                    for SurfaceSessionSvc<T> {
1001                        type Response = super::SurfaceSessionEvent;
1002                        type ResponseStream = T::SurfaceSessionStream;
1003                        type Future = BoxFuture<
1004                            tonic::Response<Self::ResponseStream>,
1005                            tonic::Status,
1006                        >;
1007                        fn call(
1008                            &mut self,
1009                            request: tonic::Request<
1010                                tonic::Streaming<super::SurfaceSessionCommand>,
1011                            >,
1012                        ) -> Self::Future {
1013                            let inner = Arc::clone(&self.0);
1014                            let fut = async move {
1015                                <T as EngineService>::surface_session(&inner, request).await
1016                            };
1017                            Box::pin(fut)
1018                        }
1019                    }
1020                    let accept_compression_encodings = self.accept_compression_encodings;
1021                    let send_compression_encodings = self.send_compression_encodings;
1022                    let max_decoding_message_size = self.max_decoding_message_size;
1023                    let max_encoding_message_size = self.max_encoding_message_size;
1024                    let inner = self.inner.clone();
1025                    let fut = async move {
1026                        let method = SurfaceSessionSvc(inner);
1027                        let codec = tonic::codec::ProstCodec::default();
1028                        let mut grpc = tonic::server::Grpc::new(codec)
1029                            .apply_compression_config(
1030                                accept_compression_encodings,
1031                                send_compression_encodings,
1032                            )
1033                            .apply_max_message_size_config(
1034                                max_decoding_message_size,
1035                                max_encoding_message_size,
1036                            );
1037                        let res = grpc.streaming(method, req).await;
1038                        Ok(res)
1039                    };
1040                    Box::pin(fut)
1041                }
1042                "/allwright.engine.v1.EngineService/ContextSession" => {
1043                    #[allow(non_camel_case_types)]
1044                    struct ContextSessionSvc<T: EngineService>(pub Arc<T>);
1045                    impl<
1046                        T: EngineService,
1047                    > tonic::server::StreamingService<super::ContextSessionCommand>
1048                    for ContextSessionSvc<T> {
1049                        type Response = super::ContextSessionEvent;
1050                        type ResponseStream = T::ContextSessionStream;
1051                        type Future = BoxFuture<
1052                            tonic::Response<Self::ResponseStream>,
1053                            tonic::Status,
1054                        >;
1055                        fn call(
1056                            &mut self,
1057                            request: tonic::Request<
1058                                tonic::Streaming<super::ContextSessionCommand>,
1059                            >,
1060                        ) -> Self::Future {
1061                            let inner = Arc::clone(&self.0);
1062                            let fut = async move {
1063                                <T as EngineService>::context_session(&inner, request).await
1064                            };
1065                            Box::pin(fut)
1066                        }
1067                    }
1068                    let accept_compression_encodings = self.accept_compression_encodings;
1069                    let send_compression_encodings = self.send_compression_encodings;
1070                    let max_decoding_message_size = self.max_decoding_message_size;
1071                    let max_encoding_message_size = self.max_encoding_message_size;
1072                    let inner = self.inner.clone();
1073                    let fut = async move {
1074                        let method = ContextSessionSvc(inner);
1075                        let codec = tonic::codec::ProstCodec::default();
1076                        let mut grpc = tonic::server::Grpc::new(codec)
1077                            .apply_compression_config(
1078                                accept_compression_encodings,
1079                                send_compression_encodings,
1080                            )
1081                            .apply_max_message_size_config(
1082                                max_decoding_message_size,
1083                                max_encoding_message_size,
1084                            );
1085                        let res = grpc.streaming(method, req).await;
1086                        Ok(res)
1087                    };
1088                    Box::pin(fut)
1089                }
1090                _ => {
1091                    Box::pin(async move {
1092                        let mut response = http::Response::new(empty_body());
1093                        let headers = response.headers_mut();
1094                        headers
1095                            .insert(
1096                                tonic::Status::GRPC_STATUS,
1097                                (tonic::Code::Unimplemented as i32).into(),
1098                            );
1099                        headers
1100                            .insert(
1101                                http::header::CONTENT_TYPE,
1102                                tonic::metadata::GRPC_CONTENT_TYPE,
1103                            );
1104                        Ok(response)
1105                    })
1106                }
1107            }
1108        }
1109    }
1110    impl<T> Clone for EngineServiceServer<T> {
1111        fn clone(&self) -> Self {
1112            let inner = self.inner.clone();
1113            Self {
1114                inner,
1115                accept_compression_encodings: self.accept_compression_encodings,
1116                send_compression_encodings: self.send_compression_encodings,
1117                max_decoding_message_size: self.max_decoding_message_size,
1118                max_encoding_message_size: self.max_encoding_message_size,
1119            }
1120        }
1121    }
1122    /// Generated gRPC service name
1123    pub const SERVICE_NAME: &str = "allwright.engine.v1.EngineService";
1124    impl<T> tonic::server::NamedService for EngineServiceServer<T> {
1125        const NAME: &'static str = SERVICE_NAME;
1126    }
1127}