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