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