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 ConnectDesktopCommand {
20 #[prost(enumeration = "DesktopPlatform", tag = "1")]
21 pub platform: i32,
22 #[prost(string, optional, tag = "2")]
23 pub agent_endpoint: ::core::option::Option<::prost::alloc::string::String>,
24 #[prost(message, optional, tag = "3")]
25 pub retry_options: ::core::option::Option<CommandRetryOptions>,
26}
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct DesktopConnectedEvent {
29 #[prost(enumeration = "DesktopPlatform", tag = "1")]
30 pub platform: i32,
31 #[prost(string, tag = "2")]
32 pub host_name: ::prost::alloc::string::String,
33 #[prost(string, tag = "3")]
34 pub note: ::prost::alloc::string::String,
35 #[prost(string, tag = "4")]
36 pub backend: ::prost::alloc::string::String,
37 #[prost(string, tag = "5")]
38 pub desktop_session_id: ::prost::alloc::string::String,
39 #[prost(string, tag = "6")]
40 pub initial_app_session_id: ::prost::alloc::string::String,
41}
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct LaunchDesktopAppCommand {
44 #[prost(string, tag = "1")]
45 pub app_id: ::prost::alloc::string::String,
46 #[prost(bool, tag = "2")]
47 pub terminate_running: bool,
48 #[prost(message, optional, tag = "3")]
49 pub retry_options: ::core::option::Option<CommandRetryOptions>,
50}
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct DesktopAppLaunchedEvent {
53 #[prost(string, tag = "1")]
54 pub app_session_id: ::prost::alloc::string::String,
55 #[prost(string, tag = "2")]
56 pub app_id: ::prost::alloc::string::String,
57 #[prost(string, tag = "3")]
58 pub note: ::prost::alloc::string::String,
59}
60#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
61#[repr(i32)]
62pub enum DesktopPlatform {
63 Unspecified = 0,
64 Mac = 1,
65 Windows = 2,
66}
67impl DesktopPlatform {
68 pub fn as_str_name(&self) -> &'static str {
73 match self {
74 Self::Unspecified => "DESKTOP_PLATFORM_UNSPECIFIED",
75 Self::Mac => "DESKTOP_PLATFORM_MAC",
76 Self::Windows => "DESKTOP_PLATFORM_WINDOWS",
77 }
78 }
79 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
81 match value {
82 "DESKTOP_PLATFORM_UNSPECIFIED" => Some(Self::Unspecified),
83 "DESKTOP_PLATFORM_MAC" => Some(Self::Mac),
84 "DESKTOP_PLATFORM_WINDOWS" => Some(Self::Windows),
85 _ => None,
86 }
87 }
88}
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct ConnectMobileCommand {
91 #[prost(enumeration = "MobilePlatform", tag = "1")]
92 pub platform: i32,
93 #[prost(string, optional, tag = "2")]
94 pub device: ::core::option::Option<::prost::alloc::string::String>,
95 #[prost(string, optional, tag = "3")]
96 pub adb_endpoint: ::core::option::Option<::prost::alloc::string::String>,
97 #[prost(bool, tag = "4")]
98 pub preserve_app_state: bool,
99 #[prost(message, optional, tag = "5")]
100 pub retry_options: ::core::option::Option<CommandRetryOptions>,
101}
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct MobileConnectedEvent {
104 #[prost(enumeration = "MobilePlatform", tag = "1")]
105 pub platform: i32,
106 #[prost(string, tag = "2")]
107 pub device_name: ::prost::alloc::string::String,
108 #[prost(string, tag = "3")]
109 pub note: ::prost::alloc::string::String,
110 #[prost(string, tag = "4")]
111 pub device_id: ::prost::alloc::string::String,
112 #[prost(enumeration = "DeviceConnectionKind", tag = "5")]
113 pub connection_kind: i32,
114 #[prost(string, tag = "6")]
115 pub backend: ::prost::alloc::string::String,
116 #[prost(string, tag = "7")]
117 pub device_session_id: ::prost::alloc::string::String,
118 #[prost(string, tag = "8")]
119 pub initial_app_session_id: ::prost::alloc::string::String,
120 #[prost(string, optional, tag = "9")]
121 pub package_name: ::core::option::Option<::prost::alloc::string::String>,
122 #[prost(string, optional, tag = "10")]
123 pub activity_name: ::core::option::Option<::prost::alloc::string::String>,
124}
125#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct LaunchAppCommand {
127 #[prost(string, optional, tag = "1")]
128 pub apk_path: ::core::option::Option<::prost::alloc::string::String>,
129 #[prost(string, optional, tag = "2")]
130 pub app_id: ::core::option::Option<::prost::alloc::string::String>,
131 #[prost(string, optional, tag = "3")]
132 pub launch_activity: ::core::option::Option<::prost::alloc::string::String>,
133 #[prost(bool, tag = "4")]
134 pub stop_before_launch: bool,
135 #[prost(message, optional, tag = "5")]
136 pub retry_options: ::core::option::Option<CommandRetryOptions>,
137}
138#[derive(Clone, PartialEq, ::prost::Message)]
139pub struct AppLaunchedEvent {
140 #[prost(string, tag = "1")]
141 pub app_session_id: ::prost::alloc::string::String,
142 #[prost(string, tag = "2")]
143 pub note: ::prost::alloc::string::String,
144 #[prost(string, optional, tag = "3")]
145 pub package_name: ::core::option::Option<::prost::alloc::string::String>,
146 #[prost(string, optional, tag = "4")]
147 pub activity_name: ::core::option::Option<::prost::alloc::string::String>,
148 #[prost(string, optional, tag = "5")]
149 pub webview_context: ::core::option::Option<::prost::alloc::string::String>,
150}
151#[derive(Clone, Copy, PartialEq, ::prost::Message)]
152pub struct RegisterMobileFileChooserHook {}
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct MobileFileChooserHookResult {
155 #[prost(string, tag = "1")]
156 pub file_chooser_id: ::prost::alloc::string::String,
157 #[prost(bool, tag = "2")]
158 pub is_multiple: bool,
159 #[prost(string, tag = "3")]
160 pub note: ::prost::alloc::string::String,
161}
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct SetMobileFileChooserFilesCommand {
164 #[prost(string, tag = "1")]
165 pub file_chooser_id: ::prost::alloc::string::String,
166 #[prost(string, repeated, tag = "2")]
167 pub file_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
168 #[prost(message, optional, tag = "3")]
169 pub retry_options: ::core::option::Option<CommandRetryOptions>,
170}
171#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct MobileFileChooserFilesSetEvent {
173 #[prost(string, tag = "1")]
174 pub file_chooser_id: ::prost::alloc::string::String,
175 #[prost(string, repeated, tag = "2")]
176 pub file_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
177 #[prost(string, tag = "3")]
178 pub note: ::prost::alloc::string::String,
179}
180#[derive(Clone, Copy, PartialEq, ::prost::Message)]
181pub struct RegisterMobileDownloadHook {}
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct MobileDownloadHookResult {
184 #[prost(string, tag = "1")]
185 pub download_id: ::prost::alloc::string::String,
186 #[prost(string, tag = "2")]
187 pub suggested_filename: ::prost::alloc::string::String,
188 #[prost(string, tag = "3")]
189 pub note: ::prost::alloc::string::String,
190}
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct SaveMobileDownloadCommand {
193 #[prost(string, tag = "1")]
194 pub download_id: ::prost::alloc::string::String,
195 #[prost(message, optional, tag = "2")]
196 pub retry_options: ::core::option::Option<CommandRetryOptions>,
197}
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct MobileDownloadSavedEvent {
200 #[prost(string, tag = "1")]
201 pub download_id: ::prost::alloc::string::String,
202 #[prost(string, tag = "2")]
203 pub file_id: ::prost::alloc::string::String,
204 #[prost(string, tag = "3")]
205 pub suggested_filename: ::prost::alloc::string::String,
206 #[prost(uint64, tag = "4")]
207 pub size: u64,
208 #[prost(string, tag = "5")]
209 pub note: ::prost::alloc::string::String,
210}
211#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
212#[repr(i32)]
213pub enum MobilePlatform {
214 Unspecified = 0,
215 Android = 1,
216 Ios = 2,
217}
218impl MobilePlatform {
219 pub fn as_str_name(&self) -> &'static str {
224 match self {
225 Self::Unspecified => "MOBILE_PLATFORM_UNSPECIFIED",
226 Self::Android => "MOBILE_PLATFORM_ANDROID",
227 Self::Ios => "MOBILE_PLATFORM_IOS",
228 }
229 }
230 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
232 match value {
233 "MOBILE_PLATFORM_UNSPECIFIED" => Some(Self::Unspecified),
234 "MOBILE_PLATFORM_ANDROID" => Some(Self::Android),
235 "MOBILE_PLATFORM_IOS" => Some(Self::Ios),
236 _ => None,
237 }
238 }
239}
240#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
241#[repr(i32)]
242pub enum DeviceConnectionKind {
243 Unspecified = 0,
244 Usb = 1,
245 Emulator = 2,
246 RemoteAdb = 3,
247}
248impl DeviceConnectionKind {
249 pub fn as_str_name(&self) -> &'static str {
254 match self {
255 Self::Unspecified => "DEVICE_CONNECTION_KIND_UNSPECIFIED",
256 Self::Usb => "DEVICE_CONNECTION_KIND_USB",
257 Self::Emulator => "DEVICE_CONNECTION_KIND_EMULATOR",
258 Self::RemoteAdb => "DEVICE_CONNECTION_KIND_REMOTE_ADB",
259 }
260 }
261 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
263 match value {
264 "DEVICE_CONNECTION_KIND_UNSPECIFIED" => Some(Self::Unspecified),
265 "DEVICE_CONNECTION_KIND_USB" => Some(Self::Usb),
266 "DEVICE_CONNECTION_KIND_EMULATOR" => Some(Self::Emulator),
267 "DEVICE_CONNECTION_KIND_REMOTE_ADB" => Some(Self::RemoteAdb),
268 _ => None,
269 }
270 }
271}
272#[derive(Clone, PartialEq, ::prost::Message)]
273pub struct LaunchBrowserCommand {
274 #[prost(enumeration = "BrowserKind", tag = "1")]
275 pub browser_kind: i32,
276 #[prost(string, optional, tag = "2")]
277 pub browser_binary: ::core::option::Option<::prost::alloc::string::String>,
278 #[prost(message, optional, tag = "3")]
279 pub retry_options: ::core::option::Option<CommandRetryOptions>,
280}
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct BrowserLaunchedEvent {
283 #[prost(enumeration = "BrowserKind", tag = "1")]
284 pub browser_kind: i32,
285 #[prost(string, tag = "2")]
286 pub browser: ::prost::alloc::string::String,
287 #[prost(string, tag = "3")]
288 pub note: ::prost::alloc::string::String,
289 #[prost(string, tag = "4")]
290 pub user_data_dir: ::prost::alloc::string::String,
291 #[prost(string, tag = "5")]
292 pub initial_page_session_id: ::prost::alloc::string::String,
293}
294#[derive(Clone, PartialEq, ::prost::Message)]
295pub struct LaunchChromeCommand {
296 #[prost(string, optional, tag = "1")]
297 pub chrome_binary: ::core::option::Option<::prost::alloc::string::String>,
298 #[prost(message, optional, tag = "2")]
299 pub retry_options: ::core::option::Option<CommandRetryOptions>,
300}
301#[derive(Clone, PartialEq, ::prost::Message)]
302pub struct ChromeLaunchedEvent {
303 #[prost(string, tag = "1")]
304 pub browser: ::prost::alloc::string::String,
305 #[prost(string, tag = "2")]
306 pub note: ::prost::alloc::string::String,
307 #[prost(string, tag = "3")]
308 pub cdp_websocket_url: ::prost::alloc::string::String,
309 #[prost(string, tag = "4")]
310 pub user_data_dir: ::prost::alloc::string::String,
311 #[prost(string, tag = "5")]
312 pub initial_page_session_id: ::prost::alloc::string::String,
313}
314#[derive(Clone, Copy, PartialEq, ::prost::Message)]
316pub struct RegisterDialogHook {}
317#[derive(Clone, PartialEq, ::prost::Message)]
318pub struct DialogHookResult {
319 #[prost(string, tag = "1")]
320 pub dialog_id: ::prost::alloc::string::String,
321 #[prost(string, tag = "2")]
322 pub r#type: ::prost::alloc::string::String,
323 #[prost(string, tag = "3")]
324 pub message: ::prost::alloc::string::String,
325 #[prost(string, tag = "4")]
326 pub default_value: ::prost::alloc::string::String,
327}
328#[derive(Clone, PartialEq, ::prost::Message)]
329pub struct HandleDialogCommand {
330 #[prost(string, tag = "1")]
331 pub dialog_id: ::prost::alloc::string::String,
332 #[prost(bool, tag = "2")]
333 pub accept: bool,
334 #[prost(string, optional, tag = "3")]
335 pub prompt_text: ::core::option::Option<::prost::alloc::string::String>,
336 #[prost(message, optional, tag = "4")]
338 pub retry_options: ::core::option::Option<CommandRetryOptions>,
339}
340#[derive(Clone, PartialEq, ::prost::Message)]
341pub struct DialogHandledEvent {
342 #[prost(string, tag = "1")]
343 pub dialog_id: ::prost::alloc::string::String,
344}
345#[derive(Clone, Copy, PartialEq, ::prost::Message)]
346pub struct RegisterNewPageHook {}
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct NewPageHookResult {
349 #[prost(string, tag = "1")]
350 pub context_session_id: ::prost::alloc::string::String,
351 #[prost(string, tag = "2")]
352 pub note: ::prost::alloc::string::String,
353}
354#[derive(Clone, Copy, PartialEq, ::prost::Message)]
355pub struct RegisterFileChooserHook {}
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct FileChooserHookResult {
358 #[prost(string, tag = "1")]
359 pub file_chooser_id: ::prost::alloc::string::String,
360 #[prost(bool, tag = "2")]
361 pub is_multiple: bool,
362 #[prost(string, tag = "3")]
363 pub note: ::prost::alloc::string::String,
364}
365#[derive(Clone, PartialEq, ::prost::Message)]
366pub struct SetFileChooserFilesCommand {
367 #[prost(string, tag = "1")]
368 pub file_chooser_id: ::prost::alloc::string::String,
369 #[prost(string, repeated, tag = "2")]
370 pub file_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
371 #[prost(message, optional, tag = "3")]
372 pub retry_options: ::core::option::Option<CommandRetryOptions>,
373}
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct FileChooserFilesSetEvent {
376 #[prost(string, tag = "1")]
377 pub file_chooser_id: ::prost::alloc::string::String,
378 #[prost(string, repeated, tag = "2")]
379 pub file_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
380 #[prost(string, tag = "3")]
381 pub note: ::prost::alloc::string::String,
382}
383#[derive(Clone, Copy, PartialEq, ::prost::Message)]
384pub struct RegisterDownloadHook {}
385#[derive(Clone, PartialEq, ::prost::Message)]
386pub struct DownloadHookResult {
387 #[prost(string, tag = "1")]
388 pub download_id: ::prost::alloc::string::String,
389 #[prost(string, tag = "2")]
390 pub url: ::prost::alloc::string::String,
391 #[prost(string, tag = "3")]
392 pub suggested_filename: ::prost::alloc::string::String,
393 #[prost(string, tag = "4")]
394 pub note: ::prost::alloc::string::String,
395}
396#[derive(Clone, PartialEq, ::prost::Message)]
397pub struct SaveDownloadCommand {
398 #[prost(string, tag = "1")]
399 pub download_id: ::prost::alloc::string::String,
400 #[prost(message, optional, tag = "2")]
401 pub retry_options: ::core::option::Option<CommandRetryOptions>,
402}
403#[derive(Clone, PartialEq, ::prost::Message)]
404pub struct DownloadSavedEvent {
405 #[prost(string, tag = "1")]
406 pub download_id: ::prost::alloc::string::String,
407 #[prost(string, tag = "2")]
408 pub file_id: ::prost::alloc::string::String,
409 #[prost(string, tag = "3")]
410 pub suggested_filename: ::prost::alloc::string::String,
411 #[prost(uint64, tag = "4")]
412 pub size: u64,
413 #[prost(string, tag = "5")]
414 pub note: ::prost::alloc::string::String,
415}
416#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct ResolveFrameCommand {
419 #[prost(string, tag = "1")]
420 pub css_selector: ::prost::alloc::string::String,
421 #[prost(message, optional, tag = "2")]
422 pub retry_options: ::core::option::Option<CommandRetryOptions>,
423}
424#[derive(Clone, PartialEq, ::prost::Message)]
425pub struct FrameResolvedEvent {
426 #[prost(string, tag = "1")]
427 pub context_session_id: ::prost::alloc::string::String,
428}
429#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
430#[repr(i32)]
431pub enum BrowserKind {
432 Unspecified = 0,
433 Chromium = 1,
434 Firefox = 2,
435}
436impl BrowserKind {
437 pub fn as_str_name(&self) -> &'static str {
442 match self {
443 Self::Unspecified => "BROWSER_KIND_UNSPECIFIED",
444 Self::Chromium => "BROWSER_KIND_CHROMIUM",
445 Self::Firefox => "BROWSER_KIND_FIREFOX",
446 }
447 }
448 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
450 match value {
451 "BROWSER_KIND_UNSPECIFIED" => Some(Self::Unspecified),
452 "BROWSER_KIND_CHROMIUM" => Some(Self::Chromium),
453 "BROWSER_KIND_FIREFOX" => Some(Self::Firefox),
454 _ => None,
455 }
456 }
457}
458#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct SurfaceSessionCommand {
460 #[prost(
461 oneof = "surface_session_command::Command",
462 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9"
463 )]
464 pub command: ::core::option::Option<surface_session_command::Command>,
465}
466pub mod surface_session_command {
468 #[derive(Clone, PartialEq, ::prost::Oneof)]
469 pub enum Command {
470 #[prost(message, tag = "1")]
471 LaunchChrome(super::LaunchChromeCommand),
472 #[prost(message, tag = "2")]
473 OpenContext(super::OpenContextCommand),
474 #[prost(message, tag = "3")]
475 Ping(super::SessionPingCommand),
476 #[prost(message, tag = "4")]
477 Close(super::CloseSurfaceSessionCommand),
478 #[prost(message, tag = "5")]
479 LaunchBrowser(super::LaunchBrowserCommand),
480 #[prost(message, tag = "6")]
481 ConnectMobile(super::ConnectMobileCommand),
482 #[prost(message, tag = "7")]
483 LaunchApp(super::LaunchAppCommand),
484 #[prost(message, tag = "8")]
485 ConnectDesktop(super::ConnectDesktopCommand),
486 #[prost(message, tag = "9")]
487 LaunchDesktopApp(super::LaunchDesktopAppCommand),
488 }
489}
490#[derive(Clone, Copy, PartialEq, ::prost::Message)]
491pub struct OpenContextCommand {
492 #[prost(message, optional, tag = "1")]
493 pub retry_options: ::core::option::Option<CommandRetryOptions>,
494}
495#[derive(Clone, PartialEq, ::prost::Message)]
496pub struct SessionPingCommand {
497 #[prost(string, tag = "1")]
498 pub message: ::prost::alloc::string::String,
499}
500#[derive(Clone, Copy, PartialEq, ::prost::Message)]
501pub struct CloseSurfaceSessionCommand {}
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct SurfaceSessionEvent {
504 #[prost(string, tag = "1")]
505 pub session_id: ::prost::alloc::string::String,
506 #[prost(
507 oneof = "surface_session_event::Event",
508 tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
509 )]
510 pub event: ::core::option::Option<surface_session_event::Event>,
511}
512pub mod surface_session_event {
514 #[derive(Clone, PartialEq, ::prost::Oneof)]
515 pub enum Event {
516 #[prost(message, tag = "2")]
517 ChromeLaunched(super::ChromeLaunchedEvent),
518 #[prost(message, tag = "3")]
519 ContextOpened(super::ContextOpenedEvent),
520 #[prost(message, tag = "4")]
521 Pong(super::SessionPongEvent),
522 #[prost(message, tag = "5")]
523 Closed(super::SurfaceSessionClosedEvent),
524 #[prost(message, tag = "6")]
525 Error(super::SurfaceSessionErrorEvent),
526 #[prost(message, tag = "7")]
527 BrowserLaunched(super::BrowserLaunchedEvent),
528 #[prost(message, tag = "8")]
529 MobileConnected(super::MobileConnectedEvent),
530 #[prost(message, tag = "9")]
531 AppLaunched(super::AppLaunchedEvent),
532 #[prost(message, tag = "10")]
533 DesktopConnected(super::DesktopConnectedEvent),
534 #[prost(message, tag = "11")]
535 DesktopAppLaunched(super::DesktopAppLaunchedEvent),
536 }
537}
538#[derive(Clone, PartialEq, ::prost::Message)]
539pub struct ContextOpenedEvent {
540 #[prost(string, tag = "1")]
541 pub context_session_id: ::prost::alloc::string::String,
542 #[prost(string, tag = "2")]
543 pub note: ::prost::alloc::string::String,
544}
545#[derive(Clone, PartialEq, ::prost::Message)]
546pub struct SessionPongEvent {
547 #[prost(string, tag = "1")]
548 pub message: ::prost::alloc::string::String,
549}
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct SurfaceSessionClosedEvent {
552 #[prost(string, tag = "1")]
553 pub reason: ::prost::alloc::string::String,
554}
555#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct SurfaceSessionErrorEvent {
557 #[prost(string, tag = "1")]
558 pub message: ::prost::alloc::string::String,
559}
560#[derive(Clone, PartialEq, ::prost::Message)]
561pub struct ContextSessionCommand {
562 #[prost(string, tag = "1")]
563 pub surface_session_id: ::prost::alloc::string::String,
564 #[prost(string, tag = "2")]
565 pub context_session_id: ::prost::alloc::string::String,
566 #[prost(
567 oneof = "context_session_command::Command",
568 tags = "3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28"
569 )]
570 pub command: ::core::option::Option<context_session_command::Command>,
571}
572pub mod context_session_command {
574 #[derive(Clone, PartialEq, ::prost::Oneof)]
575 pub enum Command {
576 #[prost(message, tag = "3")]
577 Ping(super::ContextSessionPingCommand),
578 #[prost(message, tag = "4")]
579 Close(super::CloseContextSessionCommand),
580 #[prost(message, tag = "5")]
581 Navigate(super::NavigatePageCommand),
582 #[prost(message, tag = "6")]
583 ClickElement(super::ClickElementCommand),
584 #[prost(message, tag = "7")]
585 CountElements(super::CountElementsCommand),
586 #[prost(message, tag = "8")]
587 HighlightElements(super::HighlightElementsCommand),
588 #[prost(message, tag = "9")]
589 FocusElement(super::FocusElementCommand),
590 #[prost(message, tag = "10")]
591 FillElement(super::FillElementCommand),
592 #[prost(message, tag = "11")]
593 HoverElement(super::HoverElementCommand),
594 #[prost(message, tag = "12")]
595 PressKey(super::PressKeyCommand),
596 #[prost(message, tag = "13")]
597 GetTextContent(super::GetTextContentCommand),
598 #[prost(message, tag = "14")]
599 GetInnerText(super::GetInnerTextCommand),
600 #[prost(message, tag = "15")]
601 WaitForSelector(super::WaitForSelectorCommand),
602 #[prost(message, tag = "16")]
603 Screenshot(super::ScreenshotCommand),
604 #[prost(message, tag = "17")]
605 AccessibilitySnapshot(super::AccessibilitySnapshotCommand),
606 #[prost(message, tag = "18")]
607 RegisterHook(super::RegisterHookCommand),
608 #[prost(message, tag = "19")]
609 WaitForHook(super::WaitForHookCommand),
610 #[prost(message, tag = "20")]
611 SetFileChooserFiles(super::SetFileChooserFilesCommand),
612 #[prost(message, tag = "21")]
613 SaveDownload(super::SaveDownloadCommand),
614 #[prost(message, tag = "22")]
615 UploadFileChunk(super::UploadFileChunkCommand),
616 #[prost(message, tag = "23")]
617 ReadFileChunk(super::ReadFileChunkCommand),
618 #[prost(message, tag = "24")]
619 SetMobileFileChooserFiles(super::SetMobileFileChooserFilesCommand),
620 #[prost(message, tag = "25")]
621 SaveMobileDownload(super::SaveMobileDownloadCommand),
622 #[prost(message, tag = "26")]
623 ResolveFrame(super::ResolveFrameCommand),
624 #[prost(message, tag = "27")]
625 Capture(super::CaptureCommand),
626 #[prost(message, tag = "28")]
627 HandleDialog(super::HandleDialogCommand),
628 }
629}
630#[derive(Clone, PartialEq, ::prost::Message)]
631pub struct ContextSessionPingCommand {
632 #[prost(string, tag = "1")]
633 pub message: ::prost::alloc::string::String,
634}
635#[derive(Clone, Copy, PartialEq, ::prost::Message)]
636pub struct CloseContextSessionCommand {}
637#[derive(Clone, PartialEq, ::prost::Message)]
638pub struct ContextSessionEvent {
639 #[prost(string, tag = "1")]
640 pub context_session_id: ::prost::alloc::string::String,
641 #[prost(
642 oneof = "context_session_event::Event",
643 tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30"
644 )]
645 pub event: ::core::option::Option<context_session_event::Event>,
646}
647pub mod context_session_event {
649 #[derive(Clone, PartialEq, ::prost::Oneof)]
650 pub enum Event {
651 #[prost(message, tag = "2")]
652 Attached(super::ContextSessionAttachedEvent),
653 #[prost(message, tag = "3")]
654 Pong(super::ContextSessionPongEvent),
655 #[prost(message, tag = "4")]
656 Closed(super::ContextSessionClosedEvent),
657 #[prost(message, tag = "5")]
658 Error(super::ContextSessionErrorEvent),
659 #[prost(message, tag = "6")]
660 Navigated(super::PageNavigatedEvent),
661 #[prost(message, tag = "7")]
662 ChromiumBidiInjection(super::ChromiumBidiInjectionEvent),
663 #[prost(message, tag = "8")]
664 ElementClicked(super::ElementClickedEvent),
665 #[prost(message, tag = "9")]
666 ElementCounted(super::ElementCountedEvent),
667 #[prost(message, tag = "10")]
668 ElementsHighlighted(super::ElementsHighlightedEvent),
669 #[prost(message, tag = "11")]
670 ElementFocused(super::ElementFocusedEvent),
671 #[prost(message, tag = "12")]
672 ElementFilled(super::ElementFilledEvent),
673 #[prost(message, tag = "13")]
674 ElementHovered(super::ElementHoveredEvent),
675 #[prost(message, tag = "14")]
676 KeyPressed(super::KeyPressedEvent),
677 #[prost(message, tag = "15")]
678 TextContentResolved(super::TextContentResolvedEvent),
679 #[prost(message, tag = "16")]
680 InnerTextResolved(super::InnerTextResolvedEvent),
681 #[prost(message, tag = "17")]
682 SelectorWaitSatisfied(super::SelectorWaitSatisfiedEvent),
683 #[prost(message, tag = "18")]
684 ScreenshotCaptured(super::ScreenshotCapturedEvent),
685 #[prost(message, tag = "19")]
686 AccessibilitySnapshotCaptured(super::AccessibilitySnapshotCapturedEvent),
687 #[prost(message, tag = "20")]
688 HookRegistered(super::HookRegisteredEvent),
689 #[prost(message, tag = "21")]
690 HookCompleted(super::HookCompletedEvent),
691 #[prost(message, tag = "22")]
692 FileChooserFilesSet(super::FileChooserFilesSetEvent),
693 #[prost(message, tag = "23")]
694 DownloadSaved(super::DownloadSavedEvent),
695 #[prost(message, tag = "24")]
696 FileUploaded(super::FileUploadedEvent),
697 #[prost(message, tag = "25")]
698 FileChunk(super::FileChunkEvent),
699 #[prost(message, tag = "26")]
700 MobileFileChooserFilesSet(super::MobileFileChooserFilesSetEvent),
701 #[prost(message, tag = "27")]
702 MobileDownloadSaved(super::MobileDownloadSavedEvent),
703 #[prost(message, tag = "28")]
704 FrameResolved(super::FrameResolvedEvent),
705 #[prost(message, tag = "29")]
706 CaptureResolved(super::CaptureResolvedEvent),
707 #[prost(message, tag = "30")]
708 DialogHandled(super::DialogHandledEvent),
709 }
710}
711#[derive(Clone, PartialEq, ::prost::Message)]
712pub struct ContextSessionAttachedEvent {
713 #[prost(string, tag = "1")]
714 pub note: ::prost::alloc::string::String,
715}
716#[derive(Clone, PartialEq, ::prost::Message)]
717pub struct ContextSessionPongEvent {
718 #[prost(string, tag = "1")]
719 pub message: ::prost::alloc::string::String,
720}
721#[derive(Clone, PartialEq, ::prost::Message)]
722pub struct ContextSessionClosedEvent {
723 #[prost(string, tag = "1")]
724 pub reason: ::prost::alloc::string::String,
725}
726#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct ContextSessionErrorEvent {
728 #[prost(string, tag = "1")]
729 pub message: ::prost::alloc::string::String,
730}
731#[derive(Clone, Copy, PartialEq, ::prost::Message)]
732pub struct RegisterHookCommand {
733 #[prost(oneof = "register_hook_command::Hook", tags = "1, 2, 3, 4, 5, 6")]
734 pub hook: ::core::option::Option<register_hook_command::Hook>,
735}
736pub mod register_hook_command {
738 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
739 pub enum Hook {
740 #[prost(message, tag = "1")]
741 NewPage(super::RegisterNewPageHook),
742 #[prost(message, tag = "2")]
743 FileChooser(super::RegisterFileChooserHook),
744 #[prost(message, tag = "3")]
745 Download(super::RegisterDownloadHook),
746 #[prost(message, tag = "4")]
747 MobileFileChooser(super::RegisterMobileFileChooserHook),
748 #[prost(message, tag = "5")]
749 MobileDownload(super::RegisterMobileDownloadHook),
750 #[prost(message, tag = "6")]
751 Dialog(super::RegisterDialogHook),
752 }
753}
754#[derive(Clone, PartialEq, ::prost::Message)]
755pub struct WaitForHookCommand {
756 #[prost(string, tag = "1")]
757 pub hook_id: ::prost::alloc::string::String,
758 #[prost(message, optional, tag = "2")]
759 pub retry_options: ::core::option::Option<CommandRetryOptions>,
760}
761#[derive(Clone, PartialEq, ::prost::Message)]
762pub struct HookRegisteredEvent {
763 #[prost(string, tag = "1")]
764 pub hook_id: ::prost::alloc::string::String,
765}
766#[derive(Clone, PartialEq, ::prost::Message)]
767pub struct HookCompletedEvent {
768 #[prost(string, tag = "1")]
769 pub hook_id: ::prost::alloc::string::String,
770 #[prost(oneof = "hook_completed_event::Result", tags = "2, 3, 4, 5, 6, 7")]
771 pub result: ::core::option::Option<hook_completed_event::Result>,
772}
773pub mod hook_completed_event {
775 #[derive(Clone, PartialEq, ::prost::Oneof)]
776 pub enum Result {
777 #[prost(message, tag = "2")]
778 NewPage(super::NewPageHookResult),
779 #[prost(message, tag = "3")]
780 FileChooser(super::FileChooserHookResult),
781 #[prost(message, tag = "4")]
782 Download(super::DownloadHookResult),
783 #[prost(message, tag = "5")]
784 MobileFileChooser(super::MobileFileChooserHookResult),
785 #[prost(message, tag = "6")]
786 MobileDownload(super::MobileDownloadHookResult),
787 #[prost(message, tag = "7")]
788 Dialog(super::DialogHookResult),
789 }
790}
791#[derive(Clone, PartialEq, ::prost::Message)]
792pub struct UploadFileChunkCommand {
793 #[prost(string, tag = "1")]
794 pub transfer_id: ::prost::alloc::string::String,
795 #[prost(string, tag = "2")]
796 pub name: ::prost::alloc::string::String,
797 #[prost(uint64, tag = "3")]
798 pub offset: u64,
799 #[prost(bytes = "vec", tag = "4")]
800 pub data: ::prost::alloc::vec::Vec<u8>,
801 #[prost(bool, tag = "5")]
802 pub last: bool,
803}
804#[derive(Clone, PartialEq, ::prost::Message)]
805pub struct FileUploadedEvent {
806 #[prost(string, tag = "1")]
807 pub transfer_id: ::prost::alloc::string::String,
808 #[prost(string, tag = "2")]
809 pub file_id: ::prost::alloc::string::String,
810 #[prost(string, tag = "3")]
811 pub name: ::prost::alloc::string::String,
812 #[prost(uint64, tag = "4")]
813 pub size: u64,
814}
815#[derive(Clone, PartialEq, ::prost::Message)]
816pub struct ReadFileChunkCommand {
817 #[prost(string, tag = "1")]
818 pub file_id: ::prost::alloc::string::String,
819 #[prost(uint64, tag = "2")]
820 pub offset: u64,
821 #[prost(uint32, tag = "3")]
822 pub max_bytes: u32,
823}
824#[derive(Clone, PartialEq, ::prost::Message)]
825pub struct FileChunkEvent {
826 #[prost(string, tag = "1")]
827 pub file_id: ::prost::alloc::string::String,
828 #[prost(uint64, tag = "2")]
829 pub offset: u64,
830 #[prost(bytes = "vec", tag = "3")]
831 pub data: ::prost::alloc::vec::Vec<u8>,
832 #[prost(bool, tag = "4")]
833 pub last: bool,
834}
835#[derive(Clone, PartialEq, ::prost::Message)]
836pub struct NavigatePageCommand {
837 #[prost(string, tag = "1")]
838 pub url: ::prost::alloc::string::String,
839 #[prost(message, optional, tag = "2")]
840 pub retry_options: ::core::option::Option<CommandRetryOptions>,
841}
842#[derive(Clone, PartialEq, ::prost::Message)]
843pub struct ClickElementCommand {
844 #[prost(string, tag = "1")]
845 pub css_selector: ::prost::alloc::string::String,
846 #[prost(message, optional, tag = "2")]
847 pub retry_options: ::core::option::Option<CommandRetryOptions>,
848 #[prost(string, optional, tag = "3")]
849 pub button: ::core::option::Option<::prost::alloc::string::String>,
850 #[prost(uint32, optional, tag = "4")]
851 pub click_count: ::core::option::Option<u32>,
852}
853#[derive(Clone, PartialEq, ::prost::Message)]
854pub struct CountElementsCommand {
855 #[prost(string, tag = "1")]
856 pub css_selector: ::prost::alloc::string::String,
857 #[prost(message, optional, tag = "2")]
858 pub retry_options: ::core::option::Option<CommandRetryOptions>,
859}
860#[derive(Clone, PartialEq, ::prost::Message)]
861pub struct HighlightElementsCommand {
862 #[prost(string, tag = "1")]
863 pub css_selector: ::prost::alloc::string::String,
864 #[prost(uint32, optional, tag = "2")]
865 pub duration_ms: ::core::option::Option<u32>,
866 #[prost(message, optional, tag = "3")]
867 pub retry_options: ::core::option::Option<CommandRetryOptions>,
868}
869#[derive(Clone, PartialEq, ::prost::Message)]
870pub struct FocusElementCommand {
871 #[prost(string, tag = "1")]
872 pub css_selector: ::prost::alloc::string::String,
873 #[prost(message, optional, tag = "2")]
874 pub retry_options: ::core::option::Option<CommandRetryOptions>,
875}
876#[derive(Clone, PartialEq, ::prost::Message)]
877pub struct FillElementCommand {
878 #[prost(string, tag = "1")]
879 pub css_selector: ::prost::alloc::string::String,
880 #[prost(string, tag = "2")]
881 pub value: ::prost::alloc::string::String,
882 #[prost(message, optional, tag = "3")]
883 pub retry_options: ::core::option::Option<CommandRetryOptions>,
884}
885#[derive(Clone, PartialEq, ::prost::Message)]
886pub struct HoverElementCommand {
887 #[prost(string, tag = "1")]
888 pub css_selector: ::prost::alloc::string::String,
889 #[prost(message, optional, tag = "2")]
890 pub retry_options: ::core::option::Option<CommandRetryOptions>,
891}
892#[derive(Clone, PartialEq, ::prost::Message)]
893pub struct PressKeyCommand {
894 #[prost(string, tag = "1")]
895 pub css_selector: ::prost::alloc::string::String,
896 #[prost(string, tag = "2")]
897 pub key: ::prost::alloc::string::String,
898 #[prost(string, optional, tag = "3")]
899 pub text: ::core::option::Option<::prost::alloc::string::String>,
900 #[prost(message, optional, tag = "4")]
901 pub retry_options: ::core::option::Option<CommandRetryOptions>,
902}
903#[derive(Clone, PartialEq, ::prost::Message)]
904pub struct GetTextContentCommand {
905 #[prost(string, tag = "1")]
906 pub css_selector: ::prost::alloc::string::String,
907 #[prost(message, optional, tag = "2")]
908 pub retry_options: ::core::option::Option<CommandRetryOptions>,
909}
910#[derive(Clone, PartialEq, ::prost::Message)]
911pub struct GetInnerTextCommand {
912 #[prost(string, tag = "1")]
913 pub css_selector: ::prost::alloc::string::String,
914 #[prost(message, optional, tag = "2")]
915 pub retry_options: ::core::option::Option<CommandRetryOptions>,
916}
917#[derive(Clone, PartialEq, ::prost::Message)]
918pub struct WaitForSelectorCommand {
919 #[prost(string, tag = "1")]
920 pub css_selector: ::prost::alloc::string::String,
921 #[prost(bool, optional, tag = "2")]
922 pub visible: ::core::option::Option<bool>,
923 #[prost(message, optional, tag = "3")]
924 pub retry_options: ::core::option::Option<CommandRetryOptions>,
925}
926#[derive(Clone, Copy, PartialEq, ::prost::Message)]
927pub struct ScreenshotCommand {
928 #[prost(message, optional, tag = "1")]
929 pub retry_options: ::core::option::Option<CommandRetryOptions>,
930 #[prost(bool, optional, tag = "2")]
931 pub full_page: ::core::option::Option<bool>,
932}
933#[derive(Clone, PartialEq, ::prost::Message)]
934pub struct PageNavigatedEvent {
935 #[prost(string, tag = "1")]
936 pub url: ::prost::alloc::string::String,
937 #[prost(string, tag = "2")]
938 pub note: ::prost::alloc::string::String,
939}
940#[derive(Clone, PartialEq, ::prost::Message)]
941pub struct ChromiumBidiInjectionEvent {
942 #[prost(string, tag = "1")]
943 pub note: ::prost::alloc::string::String,
944 #[prost(string, tag = "2")]
945 pub bidi_session_id: ::prost::alloc::string::String,
946 #[prost(string, tag = "3")]
947 pub mapper_target_id: ::prost::alloc::string::String,
948 #[prost(string, tag = "4")]
949 pub mapper_session_id: ::prost::alloc::string::String,
950 #[prost(string, tag = "5")]
951 pub package_version: ::prost::alloc::string::String,
952}
953#[derive(Clone, PartialEq, ::prost::Message)]
954pub struct ElementClickedEvent {
955 #[prost(string, tag = "1")]
956 pub css_selector: ::prost::alloc::string::String,
957 #[prost(string, tag = "2")]
958 pub note: ::prost::alloc::string::String,
959 #[prost(string, tag = "3")]
960 pub bidi_session_id: ::prost::alloc::string::String,
961}
962#[derive(Clone, PartialEq, ::prost::Message)]
963pub struct ElementCountedEvent {
964 #[prost(string, tag = "1")]
965 pub css_selector: ::prost::alloc::string::String,
966 #[prost(uint32, tag = "2")]
967 pub count: u32,
968 #[prost(string, tag = "3")]
969 pub note: ::prost::alloc::string::String,
970}
971#[derive(Clone, PartialEq, ::prost::Message)]
972pub struct ElementsHighlightedEvent {
973 #[prost(string, tag = "1")]
974 pub css_selector: ::prost::alloc::string::String,
975 #[prost(uint32, tag = "2")]
976 pub count: u32,
977 #[prost(string, tag = "3")]
978 pub note: ::prost::alloc::string::String,
979}
980#[derive(Clone, PartialEq, ::prost::Message)]
981pub struct ElementFocusedEvent {
982 #[prost(string, tag = "1")]
983 pub css_selector: ::prost::alloc::string::String,
984 #[prost(string, tag = "2")]
985 pub note: ::prost::alloc::string::String,
986}
987#[derive(Clone, PartialEq, ::prost::Message)]
988pub struct ElementFilledEvent {
989 #[prost(string, tag = "1")]
990 pub css_selector: ::prost::alloc::string::String,
991 #[prost(string, tag = "2")]
992 pub value: ::prost::alloc::string::String,
993 #[prost(string, tag = "3")]
994 pub note: ::prost::alloc::string::String,
995}
996#[derive(Clone, PartialEq, ::prost::Message)]
997pub struct ElementHoveredEvent {
998 #[prost(string, tag = "1")]
999 pub css_selector: ::prost::alloc::string::String,
1000 #[prost(string, tag = "2")]
1001 pub note: ::prost::alloc::string::String,
1002}
1003#[derive(Clone, PartialEq, ::prost::Message)]
1004pub struct KeyPressedEvent {
1005 #[prost(string, tag = "1")]
1006 pub css_selector: ::prost::alloc::string::String,
1007 #[prost(string, tag = "2")]
1008 pub key: ::prost::alloc::string::String,
1009 #[prost(string, tag = "3")]
1010 pub note: ::prost::alloc::string::String,
1011}
1012#[derive(Clone, PartialEq, ::prost::Message)]
1013pub struct TextContentResolvedEvent {
1014 #[prost(string, tag = "1")]
1015 pub css_selector: ::prost::alloc::string::String,
1016 #[prost(string, tag = "2")]
1017 pub text: ::prost::alloc::string::String,
1018 #[prost(string, tag = "3")]
1019 pub note: ::prost::alloc::string::String,
1020}
1021#[derive(Clone, PartialEq, ::prost::Message)]
1022pub struct InnerTextResolvedEvent {
1023 #[prost(string, tag = "1")]
1024 pub css_selector: ::prost::alloc::string::String,
1025 #[prost(string, tag = "2")]
1026 pub text: ::prost::alloc::string::String,
1027 #[prost(string, tag = "3")]
1028 pub note: ::prost::alloc::string::String,
1029}
1030#[derive(Clone, PartialEq, ::prost::Message)]
1031pub struct SelectorWaitSatisfiedEvent {
1032 #[prost(string, tag = "1")]
1033 pub css_selector: ::prost::alloc::string::String,
1034 #[prost(bool, tag = "2")]
1035 pub visible: bool,
1036 #[prost(string, tag = "3")]
1037 pub note: ::prost::alloc::string::String,
1038}
1039#[derive(Clone, PartialEq, ::prost::Message)]
1040pub struct ScreenshotCapturedEvent {
1041 #[prost(bytes = "vec", tag = "1")]
1042 pub png_data: ::prost::alloc::vec::Vec<u8>,
1043 #[prost(string, tag = "2")]
1044 pub note: ::prost::alloc::string::String,
1045}
1046#[derive(Clone, PartialEq, ::prost::Message)]
1048pub struct AccessibilitySnapshotCommand {
1049 #[prost(string, tag = "3")]
1052 pub mode: ::prost::alloc::string::String,
1053 #[prost(string, tag = "1")]
1054 pub format: ::prost::alloc::string::String,
1055 #[prost(message, optional, tag = "2")]
1056 pub retry_options: ::core::option::Option<CommandRetryOptions>,
1057}
1058#[derive(Clone, PartialEq, ::prost::Message)]
1060pub struct AccessibilitySnapshotCapturedEvent {
1061 #[prost(string, tag = "1")]
1062 pub snapshot: ::prost::alloc::string::String,
1063 #[prost(string, tag = "2")]
1064 pub format: ::prost::alloc::string::String,
1065}
1066#[derive(Clone, PartialEq, ::prost::Message)]
1067pub struct CaptureCommand {
1068 #[prost(enumeration = "CaptureKind", tag = "1")]
1069 pub kind: i32,
1070 #[prost(string, tag = "2")]
1071 pub css_selector: ::prost::alloc::string::String,
1072 #[prost(string, tag = "3")]
1073 pub attribute_name: ::prost::alloc::string::String,
1074 #[prost(message, optional, tag = "4")]
1075 pub retry_options: ::core::option::Option<CommandRetryOptions>,
1076}
1077#[derive(Clone, PartialEq, ::prost::Message)]
1078pub struct CapturedOption {
1079 #[prost(string, tag = "1")]
1080 pub value: ::prost::alloc::string::String,
1081 #[prost(string, tag = "2")]
1082 pub label: ::prost::alloc::string::String,
1083 #[prost(uint32, tag = "3")]
1084 pub index: u32,
1085}
1086#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1087pub struct BoundingBox {
1088 #[prost(double, tag = "1")]
1089 pub x: f64,
1090 #[prost(double, tag = "2")]
1091 pub y: f64,
1092 #[prost(double, tag = "3")]
1093 pub width: f64,
1094 #[prost(double, tag = "4")]
1095 pub height: f64,
1096}
1097#[derive(Clone, PartialEq, ::prost::Message)]
1098pub struct CaptureResolvedEvent {
1099 #[prost(string, optional, tag = "1")]
1101 pub value: ::core::option::Option<::prost::alloc::string::String>,
1102 #[prost(bool, optional, tag = "2")]
1103 pub checked: ::core::option::Option<bool>,
1104 #[prost(message, repeated, tag = "3")]
1105 pub selected_options: ::prost::alloc::vec::Vec<CapturedOption>,
1106 #[prost(message, optional, tag = "4")]
1108 pub bounding_box: ::core::option::Option<BoundingBox>,
1109}
1110#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1112#[repr(i32)]
1113pub enum CaptureKind {
1114 Unspecified = 0,
1115 Url = 1,
1116 InputValue = 2,
1117 SelectedOptions = 3,
1118 SelectedText = 4,
1119 Checked = 5,
1120 Attribute = 6,
1121 BoundingBox = 7,
1122}
1123impl CaptureKind {
1124 pub fn as_str_name(&self) -> &'static str {
1129 match self {
1130 Self::Unspecified => "CAPTURE_KIND_UNSPECIFIED",
1131 Self::Url => "CAPTURE_KIND_URL",
1132 Self::InputValue => "CAPTURE_KIND_INPUT_VALUE",
1133 Self::SelectedOptions => "CAPTURE_KIND_SELECTED_OPTIONS",
1134 Self::SelectedText => "CAPTURE_KIND_SELECTED_TEXT",
1135 Self::Checked => "CAPTURE_KIND_CHECKED",
1136 Self::Attribute => "CAPTURE_KIND_ATTRIBUTE",
1137 Self::BoundingBox => "CAPTURE_KIND_BOUNDING_BOX",
1138 }
1139 }
1140 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1142 match value {
1143 "CAPTURE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1144 "CAPTURE_KIND_URL" => Some(Self::Url),
1145 "CAPTURE_KIND_INPUT_VALUE" => Some(Self::InputValue),
1146 "CAPTURE_KIND_SELECTED_OPTIONS" => Some(Self::SelectedOptions),
1147 "CAPTURE_KIND_SELECTED_TEXT" => Some(Self::SelectedText),
1148 "CAPTURE_KIND_CHECKED" => Some(Self::Checked),
1149 "CAPTURE_KIND_ATTRIBUTE" => Some(Self::Attribute),
1150 "CAPTURE_KIND_BOUNDING_BOX" => Some(Self::BoundingBox),
1151 _ => None,
1152 }
1153 }
1154}
1155pub mod engine_service_client {
1157 #![allow(
1158 unused_variables,
1159 dead_code,
1160 missing_docs,
1161 clippy::wildcard_imports,
1162 clippy::let_unit_value,
1163 )]
1164 use tonic::codegen::*;
1165 use tonic::codegen::http::Uri;
1166 #[derive(Debug, Clone)]
1167 pub struct EngineServiceClient<T> {
1168 inner: tonic::client::Grpc<T>,
1169 }
1170 impl EngineServiceClient<tonic::transport::Channel> {
1171 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1173 where
1174 D: TryInto<tonic::transport::Endpoint>,
1175 D::Error: Into<StdError>,
1176 {
1177 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1178 Ok(Self::new(conn))
1179 }
1180 }
1181 impl<T> EngineServiceClient<T>
1182 where
1183 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1184 T::Error: Into<StdError>,
1185 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1186 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1187 {
1188 pub fn new(inner: T) -> Self {
1189 let inner = tonic::client::Grpc::new(inner);
1190 Self { inner }
1191 }
1192 pub fn with_origin(inner: T, origin: Uri) -> Self {
1193 let inner = tonic::client::Grpc::with_origin(inner, origin);
1194 Self { inner }
1195 }
1196 pub fn with_interceptor<F>(
1197 inner: T,
1198 interceptor: F,
1199 ) -> EngineServiceClient<InterceptedService<T, F>>
1200 where
1201 F: tonic::service::Interceptor,
1202 T::ResponseBody: Default,
1203 T: tonic::codegen::Service<
1204 http::Request<tonic::body::BoxBody>,
1205 Response = http::Response<
1206 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1207 >,
1208 >,
1209 <T as tonic::codegen::Service<
1210 http::Request<tonic::body::BoxBody>,
1211 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1212 {
1213 EngineServiceClient::new(InterceptedService::new(inner, interceptor))
1214 }
1215 #[must_use]
1220 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1221 self.inner = self.inner.send_compressed(encoding);
1222 self
1223 }
1224 #[must_use]
1226 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1227 self.inner = self.inner.accept_compressed(encoding);
1228 self
1229 }
1230 #[must_use]
1234 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1235 self.inner = self.inner.max_decoding_message_size(limit);
1236 self
1237 }
1238 #[must_use]
1242 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1243 self.inner = self.inner.max_encoding_message_size(limit);
1244 self
1245 }
1246 pub async fn ping(
1247 &mut self,
1248 request: impl tonic::IntoRequest<super::PingRequest>,
1249 ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
1250 self.inner
1251 .ready()
1252 .await
1253 .map_err(|e| {
1254 tonic::Status::unknown(
1255 format!("Service was not ready: {}", e.into()),
1256 )
1257 })?;
1258 let codec = tonic::codec::ProstCodec::default();
1259 let path = http::uri::PathAndQuery::from_static(
1260 "/allwright.engine.v1.EngineService/Ping",
1261 );
1262 let mut req = request.into_request();
1263 req.extensions_mut()
1264 .insert(GrpcMethod::new("allwright.engine.v1.EngineService", "Ping"));
1265 self.inner.unary(req, path, codec).await
1266 }
1267 pub async fn surface_session(
1268 &mut self,
1269 request: impl tonic::IntoStreamingRequest<
1270 Message = super::SurfaceSessionCommand,
1271 >,
1272 ) -> std::result::Result<
1273 tonic::Response<tonic::codec::Streaming<super::SurfaceSessionEvent>>,
1274 tonic::Status,
1275 > {
1276 self.inner
1277 .ready()
1278 .await
1279 .map_err(|e| {
1280 tonic::Status::unknown(
1281 format!("Service was not ready: {}", e.into()),
1282 )
1283 })?;
1284 let codec = tonic::codec::ProstCodec::default();
1285 let path = http::uri::PathAndQuery::from_static(
1286 "/allwright.engine.v1.EngineService/SurfaceSession",
1287 );
1288 let mut req = request.into_streaming_request();
1289 req.extensions_mut()
1290 .insert(
1291 GrpcMethod::new(
1292 "allwright.engine.v1.EngineService",
1293 "SurfaceSession",
1294 ),
1295 );
1296 self.inner.streaming(req, path, codec).await
1297 }
1298 pub async fn context_session(
1299 &mut self,
1300 request: impl tonic::IntoStreamingRequest<
1301 Message = super::ContextSessionCommand,
1302 >,
1303 ) -> std::result::Result<
1304 tonic::Response<tonic::codec::Streaming<super::ContextSessionEvent>>,
1305 tonic::Status,
1306 > {
1307 self.inner
1308 .ready()
1309 .await
1310 .map_err(|e| {
1311 tonic::Status::unknown(
1312 format!("Service was not ready: {}", e.into()),
1313 )
1314 })?;
1315 let codec = tonic::codec::ProstCodec::default();
1316 let path = http::uri::PathAndQuery::from_static(
1317 "/allwright.engine.v1.EngineService/ContextSession",
1318 );
1319 let mut req = request.into_streaming_request();
1320 req.extensions_mut()
1321 .insert(
1322 GrpcMethod::new(
1323 "allwright.engine.v1.EngineService",
1324 "ContextSession",
1325 ),
1326 );
1327 self.inner.streaming(req, path, codec).await
1328 }
1329 }
1330}
1331pub mod engine_service_server {
1333 #![allow(
1334 unused_variables,
1335 dead_code,
1336 missing_docs,
1337 clippy::wildcard_imports,
1338 clippy::let_unit_value,
1339 )]
1340 use tonic::codegen::*;
1341 #[async_trait]
1343 pub trait EngineService: std::marker::Send + std::marker::Sync + 'static {
1344 async fn ping(
1345 &self,
1346 request: tonic::Request<super::PingRequest>,
1347 ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status>;
1348 type SurfaceSessionStream: tonic::codegen::tokio_stream::Stream<
1350 Item = std::result::Result<super::SurfaceSessionEvent, tonic::Status>,
1351 >
1352 + std::marker::Send
1353 + 'static;
1354 async fn surface_session(
1355 &self,
1356 request: tonic::Request<tonic::Streaming<super::SurfaceSessionCommand>>,
1357 ) -> std::result::Result<
1358 tonic::Response<Self::SurfaceSessionStream>,
1359 tonic::Status,
1360 >;
1361 type ContextSessionStream: tonic::codegen::tokio_stream::Stream<
1363 Item = std::result::Result<super::ContextSessionEvent, tonic::Status>,
1364 >
1365 + std::marker::Send
1366 + 'static;
1367 async fn context_session(
1368 &self,
1369 request: tonic::Request<tonic::Streaming<super::ContextSessionCommand>>,
1370 ) -> std::result::Result<
1371 tonic::Response<Self::ContextSessionStream>,
1372 tonic::Status,
1373 >;
1374 }
1375 #[derive(Debug)]
1376 pub struct EngineServiceServer<T> {
1377 inner: Arc<T>,
1378 accept_compression_encodings: EnabledCompressionEncodings,
1379 send_compression_encodings: EnabledCompressionEncodings,
1380 max_decoding_message_size: Option<usize>,
1381 max_encoding_message_size: Option<usize>,
1382 }
1383 impl<T> EngineServiceServer<T> {
1384 pub fn new(inner: T) -> Self {
1385 Self::from_arc(Arc::new(inner))
1386 }
1387 pub fn from_arc(inner: Arc<T>) -> Self {
1388 Self {
1389 inner,
1390 accept_compression_encodings: Default::default(),
1391 send_compression_encodings: Default::default(),
1392 max_decoding_message_size: None,
1393 max_encoding_message_size: None,
1394 }
1395 }
1396 pub fn with_interceptor<F>(
1397 inner: T,
1398 interceptor: F,
1399 ) -> InterceptedService<Self, F>
1400 where
1401 F: tonic::service::Interceptor,
1402 {
1403 InterceptedService::new(Self::new(inner), interceptor)
1404 }
1405 #[must_use]
1407 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1408 self.accept_compression_encodings.enable(encoding);
1409 self
1410 }
1411 #[must_use]
1413 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1414 self.send_compression_encodings.enable(encoding);
1415 self
1416 }
1417 #[must_use]
1421 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1422 self.max_decoding_message_size = Some(limit);
1423 self
1424 }
1425 #[must_use]
1429 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1430 self.max_encoding_message_size = Some(limit);
1431 self
1432 }
1433 }
1434 impl<T, B> tonic::codegen::Service<http::Request<B>> for EngineServiceServer<T>
1435 where
1436 T: EngineService,
1437 B: Body + std::marker::Send + 'static,
1438 B::Error: Into<StdError> + std::marker::Send + 'static,
1439 {
1440 type Response = http::Response<tonic::body::BoxBody>;
1441 type Error = std::convert::Infallible;
1442 type Future = BoxFuture<Self::Response, Self::Error>;
1443 fn poll_ready(
1444 &mut self,
1445 _cx: &mut Context<'_>,
1446 ) -> Poll<std::result::Result<(), Self::Error>> {
1447 Poll::Ready(Ok(()))
1448 }
1449 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1450 match req.uri().path() {
1451 "/allwright.engine.v1.EngineService/Ping" => {
1452 #[allow(non_camel_case_types)]
1453 struct PingSvc<T: EngineService>(pub Arc<T>);
1454 impl<
1455 T: EngineService,
1456 > tonic::server::UnaryService<super::PingRequest> for PingSvc<T> {
1457 type Response = super::PingResponse;
1458 type Future = BoxFuture<
1459 tonic::Response<Self::Response>,
1460 tonic::Status,
1461 >;
1462 fn call(
1463 &mut self,
1464 request: tonic::Request<super::PingRequest>,
1465 ) -> Self::Future {
1466 let inner = Arc::clone(&self.0);
1467 let fut = async move {
1468 <T as EngineService>::ping(&inner, request).await
1469 };
1470 Box::pin(fut)
1471 }
1472 }
1473 let accept_compression_encodings = self.accept_compression_encodings;
1474 let send_compression_encodings = self.send_compression_encodings;
1475 let max_decoding_message_size = self.max_decoding_message_size;
1476 let max_encoding_message_size = self.max_encoding_message_size;
1477 let inner = self.inner.clone();
1478 let fut = async move {
1479 let method = PingSvc(inner);
1480 let codec = tonic::codec::ProstCodec::default();
1481 let mut grpc = tonic::server::Grpc::new(codec)
1482 .apply_compression_config(
1483 accept_compression_encodings,
1484 send_compression_encodings,
1485 )
1486 .apply_max_message_size_config(
1487 max_decoding_message_size,
1488 max_encoding_message_size,
1489 );
1490 let res = grpc.unary(method, req).await;
1491 Ok(res)
1492 };
1493 Box::pin(fut)
1494 }
1495 "/allwright.engine.v1.EngineService/SurfaceSession" => {
1496 #[allow(non_camel_case_types)]
1497 struct SurfaceSessionSvc<T: EngineService>(pub Arc<T>);
1498 impl<
1499 T: EngineService,
1500 > tonic::server::StreamingService<super::SurfaceSessionCommand>
1501 for SurfaceSessionSvc<T> {
1502 type Response = super::SurfaceSessionEvent;
1503 type ResponseStream = T::SurfaceSessionStream;
1504 type Future = BoxFuture<
1505 tonic::Response<Self::ResponseStream>,
1506 tonic::Status,
1507 >;
1508 fn call(
1509 &mut self,
1510 request: tonic::Request<
1511 tonic::Streaming<super::SurfaceSessionCommand>,
1512 >,
1513 ) -> Self::Future {
1514 let inner = Arc::clone(&self.0);
1515 let fut = async move {
1516 <T as EngineService>::surface_session(&inner, request).await
1517 };
1518 Box::pin(fut)
1519 }
1520 }
1521 let accept_compression_encodings = self.accept_compression_encodings;
1522 let send_compression_encodings = self.send_compression_encodings;
1523 let max_decoding_message_size = self.max_decoding_message_size;
1524 let max_encoding_message_size = self.max_encoding_message_size;
1525 let inner = self.inner.clone();
1526 let fut = async move {
1527 let method = SurfaceSessionSvc(inner);
1528 let codec = tonic::codec::ProstCodec::default();
1529 let mut grpc = tonic::server::Grpc::new(codec)
1530 .apply_compression_config(
1531 accept_compression_encodings,
1532 send_compression_encodings,
1533 )
1534 .apply_max_message_size_config(
1535 max_decoding_message_size,
1536 max_encoding_message_size,
1537 );
1538 let res = grpc.streaming(method, req).await;
1539 Ok(res)
1540 };
1541 Box::pin(fut)
1542 }
1543 "/allwright.engine.v1.EngineService/ContextSession" => {
1544 #[allow(non_camel_case_types)]
1545 struct ContextSessionSvc<T: EngineService>(pub Arc<T>);
1546 impl<
1547 T: EngineService,
1548 > tonic::server::StreamingService<super::ContextSessionCommand>
1549 for ContextSessionSvc<T> {
1550 type Response = super::ContextSessionEvent;
1551 type ResponseStream = T::ContextSessionStream;
1552 type Future = BoxFuture<
1553 tonic::Response<Self::ResponseStream>,
1554 tonic::Status,
1555 >;
1556 fn call(
1557 &mut self,
1558 request: tonic::Request<
1559 tonic::Streaming<super::ContextSessionCommand>,
1560 >,
1561 ) -> Self::Future {
1562 let inner = Arc::clone(&self.0);
1563 let fut = async move {
1564 <T as EngineService>::context_session(&inner, request).await
1565 };
1566 Box::pin(fut)
1567 }
1568 }
1569 let accept_compression_encodings = self.accept_compression_encodings;
1570 let send_compression_encodings = self.send_compression_encodings;
1571 let max_decoding_message_size = self.max_decoding_message_size;
1572 let max_encoding_message_size = self.max_encoding_message_size;
1573 let inner = self.inner.clone();
1574 let fut = async move {
1575 let method = ContextSessionSvc(inner);
1576 let codec = tonic::codec::ProstCodec::default();
1577 let mut grpc = tonic::server::Grpc::new(codec)
1578 .apply_compression_config(
1579 accept_compression_encodings,
1580 send_compression_encodings,
1581 )
1582 .apply_max_message_size_config(
1583 max_decoding_message_size,
1584 max_encoding_message_size,
1585 );
1586 let res = grpc.streaming(method, req).await;
1587 Ok(res)
1588 };
1589 Box::pin(fut)
1590 }
1591 _ => {
1592 Box::pin(async move {
1593 let mut response = http::Response::new(empty_body());
1594 let headers = response.headers_mut();
1595 headers
1596 .insert(
1597 tonic::Status::GRPC_STATUS,
1598 (tonic::Code::Unimplemented as i32).into(),
1599 );
1600 headers
1601 .insert(
1602 http::header::CONTENT_TYPE,
1603 tonic::metadata::GRPC_CONTENT_TYPE,
1604 );
1605 Ok(response)
1606 })
1607 }
1608 }
1609 }
1610 }
1611 impl<T> Clone for EngineServiceServer<T> {
1612 fn clone(&self) -> Self {
1613 let inner = self.inner.clone();
1614 Self {
1615 inner,
1616 accept_compression_encodings: self.accept_compression_encodings,
1617 send_compression_encodings: self.send_compression_encodings,
1618 max_decoding_message_size: self.max_decoding_message_size,
1619 max_encoding_message_size: self.max_encoding_message_size,
1620 }
1621 }
1622 }
1623 pub const SERVICE_NAME: &str = "allwright.engine.v1.EngineService";
1625 impl<T> tonic::server::NamedService for EngineServiceServer<T> {
1626 const NAME: &'static str = SERVICE_NAME;
1627 }
1628}