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, 17"
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        #[prost(message, tag = "17")]
345        AccessibilitySnapshot(super::AccessibilitySnapshotCommand),
346    }
347}
348#[derive(Clone, PartialEq, ::prost::Message)]
349pub struct ContextSessionPingCommand {
350    #[prost(string, tag = "1")]
351    pub message: ::prost::alloc::string::String,
352}
353#[derive(Clone, Copy, PartialEq, ::prost::Message)]
354pub struct CloseContextSessionCommand {}
355#[derive(Clone, PartialEq, ::prost::Message)]
356pub struct ContextSessionEvent {
357    #[prost(string, tag = "1")]
358    pub context_session_id: ::prost::alloc::string::String,
359    #[prost(
360        oneof = "context_session_event::Event",
361        tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
362    )]
363    pub event: ::core::option::Option<context_session_event::Event>,
364}
365/// Nested message and enum types in `ContextSessionEvent`.
366pub mod context_session_event {
367    #[derive(Clone, PartialEq, ::prost::Oneof)]
368    pub enum Event {
369        #[prost(message, tag = "2")]
370        Attached(super::ContextSessionAttachedEvent),
371        #[prost(message, tag = "3")]
372        Pong(super::ContextSessionPongEvent),
373        #[prost(message, tag = "4")]
374        Closed(super::ContextSessionClosedEvent),
375        #[prost(message, tag = "5")]
376        Error(super::ContextSessionErrorEvent),
377        #[prost(message, tag = "6")]
378        Navigated(super::PageNavigatedEvent),
379        #[prost(message, tag = "7")]
380        ChromiumBidiInjection(super::ChromiumBidiInjectionEvent),
381        #[prost(message, tag = "8")]
382        ElementClicked(super::ElementClickedEvent),
383        #[prost(message, tag = "9")]
384        ElementCounted(super::ElementCountedEvent),
385        #[prost(message, tag = "10")]
386        ElementsHighlighted(super::ElementsHighlightedEvent),
387        #[prost(message, tag = "11")]
388        ElementFocused(super::ElementFocusedEvent),
389        #[prost(message, tag = "12")]
390        ElementFilled(super::ElementFilledEvent),
391        #[prost(message, tag = "13")]
392        ElementHovered(super::ElementHoveredEvent),
393        #[prost(message, tag = "14")]
394        KeyPressed(super::KeyPressedEvent),
395        #[prost(message, tag = "15")]
396        TextContentResolved(super::TextContentResolvedEvent),
397        #[prost(message, tag = "16")]
398        InnerTextResolved(super::InnerTextResolvedEvent),
399        #[prost(message, tag = "17")]
400        SelectorWaitSatisfied(super::SelectorWaitSatisfiedEvent),
401        #[prost(message, tag = "18")]
402        ScreenshotCaptured(super::ScreenshotCapturedEvent),
403        #[prost(message, tag = "19")]
404        AccessibilitySnapshotCaptured(super::AccessibilitySnapshotCapturedEvent),
405    }
406}
407#[derive(Clone, PartialEq, ::prost::Message)]
408pub struct ContextSessionAttachedEvent {
409    #[prost(string, tag = "1")]
410    pub note: ::prost::alloc::string::String,
411}
412#[derive(Clone, PartialEq, ::prost::Message)]
413pub struct ContextSessionPongEvent {
414    #[prost(string, tag = "1")]
415    pub message: ::prost::alloc::string::String,
416}
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct ContextSessionClosedEvent {
419    #[prost(string, tag = "1")]
420    pub reason: ::prost::alloc::string::String,
421}
422#[derive(Clone, PartialEq, ::prost::Message)]
423pub struct ContextSessionErrorEvent {
424    #[prost(string, tag = "1")]
425    pub message: ::prost::alloc::string::String,
426}
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct NavigatePageCommand {
429    #[prost(string, tag = "1")]
430    pub url: ::prost::alloc::string::String,
431    #[prost(message, optional, tag = "2")]
432    pub retry_options: ::core::option::Option<CommandRetryOptions>,
433}
434#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct ClickElementCommand {
436    #[prost(string, tag = "1")]
437    pub css_selector: ::prost::alloc::string::String,
438    #[prost(message, optional, tag = "2")]
439    pub retry_options: ::core::option::Option<CommandRetryOptions>,
440}
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct CountElementsCommand {
443    #[prost(string, tag = "1")]
444    pub css_selector: ::prost::alloc::string::String,
445    #[prost(message, optional, tag = "2")]
446    pub retry_options: ::core::option::Option<CommandRetryOptions>,
447}
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct HighlightElementsCommand {
450    #[prost(string, tag = "1")]
451    pub css_selector: ::prost::alloc::string::String,
452    #[prost(uint32, optional, tag = "2")]
453    pub duration_ms: ::core::option::Option<u32>,
454    #[prost(message, optional, tag = "3")]
455    pub retry_options: ::core::option::Option<CommandRetryOptions>,
456}
457#[derive(Clone, PartialEq, ::prost::Message)]
458pub struct FocusElementCommand {
459    #[prost(string, tag = "1")]
460    pub css_selector: ::prost::alloc::string::String,
461    #[prost(message, optional, tag = "2")]
462    pub retry_options: ::core::option::Option<CommandRetryOptions>,
463}
464#[derive(Clone, PartialEq, ::prost::Message)]
465pub struct FillElementCommand {
466    #[prost(string, tag = "1")]
467    pub css_selector: ::prost::alloc::string::String,
468    #[prost(string, tag = "2")]
469    pub value: ::prost::alloc::string::String,
470    #[prost(message, optional, tag = "3")]
471    pub retry_options: ::core::option::Option<CommandRetryOptions>,
472}
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct HoverElementCommand {
475    #[prost(string, tag = "1")]
476    pub css_selector: ::prost::alloc::string::String,
477    #[prost(message, optional, tag = "2")]
478    pub retry_options: ::core::option::Option<CommandRetryOptions>,
479}
480#[derive(Clone, PartialEq, ::prost::Message)]
481pub struct PressKeyCommand {
482    #[prost(string, tag = "1")]
483    pub css_selector: ::prost::alloc::string::String,
484    #[prost(string, tag = "2")]
485    pub key: ::prost::alloc::string::String,
486    #[prost(string, optional, tag = "3")]
487    pub text: ::core::option::Option<::prost::alloc::string::String>,
488    #[prost(message, optional, tag = "4")]
489    pub retry_options: ::core::option::Option<CommandRetryOptions>,
490}
491#[derive(Clone, PartialEq, ::prost::Message)]
492pub struct GetTextContentCommand {
493    #[prost(string, tag = "1")]
494    pub css_selector: ::prost::alloc::string::String,
495    #[prost(message, optional, tag = "2")]
496    pub retry_options: ::core::option::Option<CommandRetryOptions>,
497}
498#[derive(Clone, PartialEq, ::prost::Message)]
499pub struct GetInnerTextCommand {
500    #[prost(string, tag = "1")]
501    pub css_selector: ::prost::alloc::string::String,
502    #[prost(message, optional, tag = "2")]
503    pub retry_options: ::core::option::Option<CommandRetryOptions>,
504}
505#[derive(Clone, PartialEq, ::prost::Message)]
506pub struct WaitForSelectorCommand {
507    #[prost(string, tag = "1")]
508    pub css_selector: ::prost::alloc::string::String,
509    #[prost(bool, optional, tag = "2")]
510    pub visible: ::core::option::Option<bool>,
511    #[prost(message, optional, tag = "3")]
512    pub retry_options: ::core::option::Option<CommandRetryOptions>,
513}
514#[derive(Clone, Copy, PartialEq, ::prost::Message)]
515pub struct ScreenshotCommand {
516    #[prost(message, optional, tag = "1")]
517    pub retry_options: ::core::option::Option<CommandRetryOptions>,
518    #[prost(bool, optional, tag = "2")]
519    pub full_page: ::core::option::Option<bool>,
520}
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct PageNavigatedEvent {
523    #[prost(string, tag = "1")]
524    pub url: ::prost::alloc::string::String,
525    #[prost(string, tag = "2")]
526    pub note: ::prost::alloc::string::String,
527}
528#[derive(Clone, PartialEq, ::prost::Message)]
529pub struct ChromiumBidiInjectionEvent {
530    #[prost(string, tag = "1")]
531    pub note: ::prost::alloc::string::String,
532    #[prost(string, tag = "2")]
533    pub bidi_session_id: ::prost::alloc::string::String,
534    #[prost(string, tag = "3")]
535    pub mapper_target_id: ::prost::alloc::string::String,
536    #[prost(string, tag = "4")]
537    pub mapper_session_id: ::prost::alloc::string::String,
538    #[prost(string, tag = "5")]
539    pub package_version: ::prost::alloc::string::String,
540}
541#[derive(Clone, PartialEq, ::prost::Message)]
542pub struct ElementClickedEvent {
543    #[prost(string, tag = "1")]
544    pub css_selector: ::prost::alloc::string::String,
545    #[prost(string, tag = "2")]
546    pub note: ::prost::alloc::string::String,
547    #[prost(string, tag = "3")]
548    pub bidi_session_id: ::prost::alloc::string::String,
549}
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct ElementCountedEvent {
552    #[prost(string, tag = "1")]
553    pub css_selector: ::prost::alloc::string::String,
554    #[prost(uint32, tag = "2")]
555    pub count: u32,
556    #[prost(string, tag = "3")]
557    pub note: ::prost::alloc::string::String,
558}
559#[derive(Clone, PartialEq, ::prost::Message)]
560pub struct ElementsHighlightedEvent {
561    #[prost(string, tag = "1")]
562    pub css_selector: ::prost::alloc::string::String,
563    #[prost(uint32, tag = "2")]
564    pub count: u32,
565    #[prost(string, tag = "3")]
566    pub note: ::prost::alloc::string::String,
567}
568#[derive(Clone, PartialEq, ::prost::Message)]
569pub struct ElementFocusedEvent {
570    #[prost(string, tag = "1")]
571    pub css_selector: ::prost::alloc::string::String,
572    #[prost(string, tag = "2")]
573    pub note: ::prost::alloc::string::String,
574}
575#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct ElementFilledEvent {
577    #[prost(string, tag = "1")]
578    pub css_selector: ::prost::alloc::string::String,
579    #[prost(string, tag = "2")]
580    pub value: ::prost::alloc::string::String,
581    #[prost(string, tag = "3")]
582    pub note: ::prost::alloc::string::String,
583}
584#[derive(Clone, PartialEq, ::prost::Message)]
585pub struct ElementHoveredEvent {
586    #[prost(string, tag = "1")]
587    pub css_selector: ::prost::alloc::string::String,
588    #[prost(string, tag = "2")]
589    pub note: ::prost::alloc::string::String,
590}
591#[derive(Clone, PartialEq, ::prost::Message)]
592pub struct KeyPressedEvent {
593    #[prost(string, tag = "1")]
594    pub css_selector: ::prost::alloc::string::String,
595    #[prost(string, tag = "2")]
596    pub key: ::prost::alloc::string::String,
597    #[prost(string, tag = "3")]
598    pub note: ::prost::alloc::string::String,
599}
600#[derive(Clone, PartialEq, ::prost::Message)]
601pub struct TextContentResolvedEvent {
602    #[prost(string, tag = "1")]
603    pub css_selector: ::prost::alloc::string::String,
604    #[prost(string, tag = "2")]
605    pub text: ::prost::alloc::string::String,
606    #[prost(string, tag = "3")]
607    pub note: ::prost::alloc::string::String,
608}
609#[derive(Clone, PartialEq, ::prost::Message)]
610pub struct InnerTextResolvedEvent {
611    #[prost(string, tag = "1")]
612    pub css_selector: ::prost::alloc::string::String,
613    #[prost(string, tag = "2")]
614    pub text: ::prost::alloc::string::String,
615    #[prost(string, tag = "3")]
616    pub note: ::prost::alloc::string::String,
617}
618#[derive(Clone, PartialEq, ::prost::Message)]
619pub struct SelectorWaitSatisfiedEvent {
620    #[prost(string, tag = "1")]
621    pub css_selector: ::prost::alloc::string::String,
622    #[prost(bool, tag = "2")]
623    pub visible: bool,
624    #[prost(string, tag = "3")]
625    pub note: ::prost::alloc::string::String,
626}
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct ScreenshotCapturedEvent {
629    #[prost(bytes = "vec", tag = "1")]
630    pub png_data: ::prost::alloc::vec::Vec<u8>,
631    #[prost(string, tag = "2")]
632    pub note: ::prost::alloc::string::String,
633}
634/// Empty format defaults to JSON. Accepted values are "json" and "yaml".
635#[derive(Clone, PartialEq, ::prost::Message)]
636pub struct AccessibilitySnapshotCommand {
637    /// Empty mode defaults to default. AI assigns queryable references; reference storage is surface-owned.
638    /// Supported: default, ai, autoexpect, codegen.
639    #[prost(string, tag = "3")]
640    pub mode: ::prost::alloc::string::String,
641    #[prost(string, tag = "1")]
642    pub format: ::prost::alloc::string::String,
643    #[prost(message, optional, tag = "2")]
644    pub retry_options: ::core::option::Option<CommandRetryOptions>,
645}
646/// Both formats encode the same versioned, structured document.
647#[derive(Clone, PartialEq, ::prost::Message)]
648pub struct AccessibilitySnapshotCapturedEvent {
649    #[prost(string, tag = "1")]
650    pub snapshot: ::prost::alloc::string::String,
651    #[prost(string, tag = "2")]
652    pub format: ::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}