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}
849#[derive(Clone, PartialEq, ::prost::Message)]
850pub struct CountElementsCommand {
851 #[prost(string, tag = "1")]
852 pub css_selector: ::prost::alloc::string::String,
853 #[prost(message, optional, tag = "2")]
854 pub retry_options: ::core::option::Option<CommandRetryOptions>,
855}
856#[derive(Clone, PartialEq, ::prost::Message)]
857pub struct HighlightElementsCommand {
858 #[prost(string, tag = "1")]
859 pub css_selector: ::prost::alloc::string::String,
860 #[prost(uint32, optional, tag = "2")]
861 pub duration_ms: ::core::option::Option<u32>,
862 #[prost(message, optional, tag = "3")]
863 pub retry_options: ::core::option::Option<CommandRetryOptions>,
864}
865#[derive(Clone, PartialEq, ::prost::Message)]
866pub struct FocusElementCommand {
867 #[prost(string, tag = "1")]
868 pub css_selector: ::prost::alloc::string::String,
869 #[prost(message, optional, tag = "2")]
870 pub retry_options: ::core::option::Option<CommandRetryOptions>,
871}
872#[derive(Clone, PartialEq, ::prost::Message)]
873pub struct FillElementCommand {
874 #[prost(string, tag = "1")]
875 pub css_selector: ::prost::alloc::string::String,
876 #[prost(string, tag = "2")]
877 pub value: ::prost::alloc::string::String,
878 #[prost(message, optional, tag = "3")]
879 pub retry_options: ::core::option::Option<CommandRetryOptions>,
880}
881#[derive(Clone, PartialEq, ::prost::Message)]
882pub struct HoverElementCommand {
883 #[prost(string, tag = "1")]
884 pub css_selector: ::prost::alloc::string::String,
885 #[prost(message, optional, tag = "2")]
886 pub retry_options: ::core::option::Option<CommandRetryOptions>,
887}
888#[derive(Clone, PartialEq, ::prost::Message)]
889pub struct PressKeyCommand {
890 #[prost(string, tag = "1")]
891 pub css_selector: ::prost::alloc::string::String,
892 #[prost(string, tag = "2")]
893 pub key: ::prost::alloc::string::String,
894 #[prost(string, optional, tag = "3")]
895 pub text: ::core::option::Option<::prost::alloc::string::String>,
896 #[prost(message, optional, tag = "4")]
897 pub retry_options: ::core::option::Option<CommandRetryOptions>,
898}
899#[derive(Clone, PartialEq, ::prost::Message)]
900pub struct GetTextContentCommand {
901 #[prost(string, tag = "1")]
902 pub css_selector: ::prost::alloc::string::String,
903 #[prost(message, optional, tag = "2")]
904 pub retry_options: ::core::option::Option<CommandRetryOptions>,
905}
906#[derive(Clone, PartialEq, ::prost::Message)]
907pub struct GetInnerTextCommand {
908 #[prost(string, tag = "1")]
909 pub css_selector: ::prost::alloc::string::String,
910 #[prost(message, optional, tag = "2")]
911 pub retry_options: ::core::option::Option<CommandRetryOptions>,
912}
913#[derive(Clone, PartialEq, ::prost::Message)]
914pub struct WaitForSelectorCommand {
915 #[prost(string, tag = "1")]
916 pub css_selector: ::prost::alloc::string::String,
917 #[prost(bool, optional, tag = "2")]
918 pub visible: ::core::option::Option<bool>,
919 #[prost(message, optional, tag = "3")]
920 pub retry_options: ::core::option::Option<CommandRetryOptions>,
921}
922#[derive(Clone, Copy, PartialEq, ::prost::Message)]
923pub struct ScreenshotCommand {
924 #[prost(message, optional, tag = "1")]
925 pub retry_options: ::core::option::Option<CommandRetryOptions>,
926 #[prost(bool, optional, tag = "2")]
927 pub full_page: ::core::option::Option<bool>,
928}
929#[derive(Clone, PartialEq, ::prost::Message)]
930pub struct PageNavigatedEvent {
931 #[prost(string, tag = "1")]
932 pub url: ::prost::alloc::string::String,
933 #[prost(string, tag = "2")]
934 pub note: ::prost::alloc::string::String,
935}
936#[derive(Clone, PartialEq, ::prost::Message)]
937pub struct ChromiumBidiInjectionEvent {
938 #[prost(string, tag = "1")]
939 pub note: ::prost::alloc::string::String,
940 #[prost(string, tag = "2")]
941 pub bidi_session_id: ::prost::alloc::string::String,
942 #[prost(string, tag = "3")]
943 pub mapper_target_id: ::prost::alloc::string::String,
944 #[prost(string, tag = "4")]
945 pub mapper_session_id: ::prost::alloc::string::String,
946 #[prost(string, tag = "5")]
947 pub package_version: ::prost::alloc::string::String,
948}
949#[derive(Clone, PartialEq, ::prost::Message)]
950pub struct ElementClickedEvent {
951 #[prost(string, tag = "1")]
952 pub css_selector: ::prost::alloc::string::String,
953 #[prost(string, tag = "2")]
954 pub note: ::prost::alloc::string::String,
955 #[prost(string, tag = "3")]
956 pub bidi_session_id: ::prost::alloc::string::String,
957}
958#[derive(Clone, PartialEq, ::prost::Message)]
959pub struct ElementCountedEvent {
960 #[prost(string, tag = "1")]
961 pub css_selector: ::prost::alloc::string::String,
962 #[prost(uint32, tag = "2")]
963 pub count: u32,
964 #[prost(string, tag = "3")]
965 pub note: ::prost::alloc::string::String,
966}
967#[derive(Clone, PartialEq, ::prost::Message)]
968pub struct ElementsHighlightedEvent {
969 #[prost(string, tag = "1")]
970 pub css_selector: ::prost::alloc::string::String,
971 #[prost(uint32, tag = "2")]
972 pub count: u32,
973 #[prost(string, tag = "3")]
974 pub note: ::prost::alloc::string::String,
975}
976#[derive(Clone, PartialEq, ::prost::Message)]
977pub struct ElementFocusedEvent {
978 #[prost(string, tag = "1")]
979 pub css_selector: ::prost::alloc::string::String,
980 #[prost(string, tag = "2")]
981 pub note: ::prost::alloc::string::String,
982}
983#[derive(Clone, PartialEq, ::prost::Message)]
984pub struct ElementFilledEvent {
985 #[prost(string, tag = "1")]
986 pub css_selector: ::prost::alloc::string::String,
987 #[prost(string, tag = "2")]
988 pub value: ::prost::alloc::string::String,
989 #[prost(string, tag = "3")]
990 pub note: ::prost::alloc::string::String,
991}
992#[derive(Clone, PartialEq, ::prost::Message)]
993pub struct ElementHoveredEvent {
994 #[prost(string, tag = "1")]
995 pub css_selector: ::prost::alloc::string::String,
996 #[prost(string, tag = "2")]
997 pub note: ::prost::alloc::string::String,
998}
999#[derive(Clone, PartialEq, ::prost::Message)]
1000pub struct KeyPressedEvent {
1001 #[prost(string, tag = "1")]
1002 pub css_selector: ::prost::alloc::string::String,
1003 #[prost(string, tag = "2")]
1004 pub key: ::prost::alloc::string::String,
1005 #[prost(string, tag = "3")]
1006 pub note: ::prost::alloc::string::String,
1007}
1008#[derive(Clone, PartialEq, ::prost::Message)]
1009pub struct TextContentResolvedEvent {
1010 #[prost(string, tag = "1")]
1011 pub css_selector: ::prost::alloc::string::String,
1012 #[prost(string, tag = "2")]
1013 pub text: ::prost::alloc::string::String,
1014 #[prost(string, tag = "3")]
1015 pub note: ::prost::alloc::string::String,
1016}
1017#[derive(Clone, PartialEq, ::prost::Message)]
1018pub struct InnerTextResolvedEvent {
1019 #[prost(string, tag = "1")]
1020 pub css_selector: ::prost::alloc::string::String,
1021 #[prost(string, tag = "2")]
1022 pub text: ::prost::alloc::string::String,
1023 #[prost(string, tag = "3")]
1024 pub note: ::prost::alloc::string::String,
1025}
1026#[derive(Clone, PartialEq, ::prost::Message)]
1027pub struct SelectorWaitSatisfiedEvent {
1028 #[prost(string, tag = "1")]
1029 pub css_selector: ::prost::alloc::string::String,
1030 #[prost(bool, tag = "2")]
1031 pub visible: bool,
1032 #[prost(string, tag = "3")]
1033 pub note: ::prost::alloc::string::String,
1034}
1035#[derive(Clone, PartialEq, ::prost::Message)]
1036pub struct ScreenshotCapturedEvent {
1037 #[prost(bytes = "vec", tag = "1")]
1038 pub png_data: ::prost::alloc::vec::Vec<u8>,
1039 #[prost(string, tag = "2")]
1040 pub note: ::prost::alloc::string::String,
1041}
1042#[derive(Clone, PartialEq, ::prost::Message)]
1044pub struct AccessibilitySnapshotCommand {
1045 #[prost(string, tag = "3")]
1048 pub mode: ::prost::alloc::string::String,
1049 #[prost(string, tag = "1")]
1050 pub format: ::prost::alloc::string::String,
1051 #[prost(message, optional, tag = "2")]
1052 pub retry_options: ::core::option::Option<CommandRetryOptions>,
1053}
1054#[derive(Clone, PartialEq, ::prost::Message)]
1056pub struct AccessibilitySnapshotCapturedEvent {
1057 #[prost(string, tag = "1")]
1058 pub snapshot: ::prost::alloc::string::String,
1059 #[prost(string, tag = "2")]
1060 pub format: ::prost::alloc::string::String,
1061}
1062#[derive(Clone, PartialEq, ::prost::Message)]
1063pub struct CaptureCommand {
1064 #[prost(enumeration = "CaptureKind", tag = "1")]
1065 pub kind: i32,
1066 #[prost(string, tag = "2")]
1067 pub css_selector: ::prost::alloc::string::String,
1068 #[prost(string, tag = "3")]
1069 pub attribute_name: ::prost::alloc::string::String,
1070 #[prost(message, optional, tag = "4")]
1071 pub retry_options: ::core::option::Option<CommandRetryOptions>,
1072}
1073#[derive(Clone, PartialEq, ::prost::Message)]
1074pub struct CapturedOption {
1075 #[prost(string, tag = "1")]
1076 pub value: ::prost::alloc::string::String,
1077 #[prost(string, tag = "2")]
1078 pub label: ::prost::alloc::string::String,
1079 #[prost(uint32, tag = "3")]
1080 pub index: u32,
1081}
1082#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1083pub struct BoundingBox {
1084 #[prost(double, tag = "1")]
1085 pub x: f64,
1086 #[prost(double, tag = "2")]
1087 pub y: f64,
1088 #[prost(double, tag = "3")]
1089 pub width: f64,
1090 #[prost(double, tag = "4")]
1091 pub height: f64,
1092}
1093#[derive(Clone, PartialEq, ::prost::Message)]
1094pub struct CaptureResolvedEvent {
1095 #[prost(string, optional, tag = "1")]
1097 pub value: ::core::option::Option<::prost::alloc::string::String>,
1098 #[prost(bool, optional, tag = "2")]
1099 pub checked: ::core::option::Option<bool>,
1100 #[prost(message, repeated, tag = "3")]
1101 pub selected_options: ::prost::alloc::vec::Vec<CapturedOption>,
1102 #[prost(message, optional, tag = "4")]
1104 pub bounding_box: ::core::option::Option<BoundingBox>,
1105}
1106#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1108#[repr(i32)]
1109pub enum CaptureKind {
1110 Unspecified = 0,
1111 Url = 1,
1112 InputValue = 2,
1113 SelectedOptions = 3,
1114 SelectedText = 4,
1115 Checked = 5,
1116 Attribute = 6,
1117 BoundingBox = 7,
1118}
1119impl CaptureKind {
1120 pub fn as_str_name(&self) -> &'static str {
1125 match self {
1126 Self::Unspecified => "CAPTURE_KIND_UNSPECIFIED",
1127 Self::Url => "CAPTURE_KIND_URL",
1128 Self::InputValue => "CAPTURE_KIND_INPUT_VALUE",
1129 Self::SelectedOptions => "CAPTURE_KIND_SELECTED_OPTIONS",
1130 Self::SelectedText => "CAPTURE_KIND_SELECTED_TEXT",
1131 Self::Checked => "CAPTURE_KIND_CHECKED",
1132 Self::Attribute => "CAPTURE_KIND_ATTRIBUTE",
1133 Self::BoundingBox => "CAPTURE_KIND_BOUNDING_BOX",
1134 }
1135 }
1136 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1138 match value {
1139 "CAPTURE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1140 "CAPTURE_KIND_URL" => Some(Self::Url),
1141 "CAPTURE_KIND_INPUT_VALUE" => Some(Self::InputValue),
1142 "CAPTURE_KIND_SELECTED_OPTIONS" => Some(Self::SelectedOptions),
1143 "CAPTURE_KIND_SELECTED_TEXT" => Some(Self::SelectedText),
1144 "CAPTURE_KIND_CHECKED" => Some(Self::Checked),
1145 "CAPTURE_KIND_ATTRIBUTE" => Some(Self::Attribute),
1146 "CAPTURE_KIND_BOUNDING_BOX" => Some(Self::BoundingBox),
1147 _ => None,
1148 }
1149 }
1150}
1151pub mod engine_service_client {
1153 #![allow(
1154 unused_variables,
1155 dead_code,
1156 missing_docs,
1157 clippy::wildcard_imports,
1158 clippy::let_unit_value,
1159 )]
1160 use tonic::codegen::*;
1161 use tonic::codegen::http::Uri;
1162 #[derive(Debug, Clone)]
1163 pub struct EngineServiceClient<T> {
1164 inner: tonic::client::Grpc<T>,
1165 }
1166 impl EngineServiceClient<tonic::transport::Channel> {
1167 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1169 where
1170 D: TryInto<tonic::transport::Endpoint>,
1171 D::Error: Into<StdError>,
1172 {
1173 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1174 Ok(Self::new(conn))
1175 }
1176 }
1177 impl<T> EngineServiceClient<T>
1178 where
1179 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1180 T::Error: Into<StdError>,
1181 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1182 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1183 {
1184 pub fn new(inner: T) -> Self {
1185 let inner = tonic::client::Grpc::new(inner);
1186 Self { inner }
1187 }
1188 pub fn with_origin(inner: T, origin: Uri) -> Self {
1189 let inner = tonic::client::Grpc::with_origin(inner, origin);
1190 Self { inner }
1191 }
1192 pub fn with_interceptor<F>(
1193 inner: T,
1194 interceptor: F,
1195 ) -> EngineServiceClient<InterceptedService<T, F>>
1196 where
1197 F: tonic::service::Interceptor,
1198 T::ResponseBody: Default,
1199 T: tonic::codegen::Service<
1200 http::Request<tonic::body::BoxBody>,
1201 Response = http::Response<
1202 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1203 >,
1204 >,
1205 <T as tonic::codegen::Service<
1206 http::Request<tonic::body::BoxBody>,
1207 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1208 {
1209 EngineServiceClient::new(InterceptedService::new(inner, interceptor))
1210 }
1211 #[must_use]
1216 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1217 self.inner = self.inner.send_compressed(encoding);
1218 self
1219 }
1220 #[must_use]
1222 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1223 self.inner = self.inner.accept_compressed(encoding);
1224 self
1225 }
1226 #[must_use]
1230 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1231 self.inner = self.inner.max_decoding_message_size(limit);
1232 self
1233 }
1234 #[must_use]
1238 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1239 self.inner = self.inner.max_encoding_message_size(limit);
1240 self
1241 }
1242 pub async fn ping(
1243 &mut self,
1244 request: impl tonic::IntoRequest<super::PingRequest>,
1245 ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
1246 self.inner
1247 .ready()
1248 .await
1249 .map_err(|e| {
1250 tonic::Status::unknown(
1251 format!("Service was not ready: {}", e.into()),
1252 )
1253 })?;
1254 let codec = tonic::codec::ProstCodec::default();
1255 let path = http::uri::PathAndQuery::from_static(
1256 "/allwright.engine.v1.EngineService/Ping",
1257 );
1258 let mut req = request.into_request();
1259 req.extensions_mut()
1260 .insert(GrpcMethod::new("allwright.engine.v1.EngineService", "Ping"));
1261 self.inner.unary(req, path, codec).await
1262 }
1263 pub async fn surface_session(
1264 &mut self,
1265 request: impl tonic::IntoStreamingRequest<
1266 Message = super::SurfaceSessionCommand,
1267 >,
1268 ) -> std::result::Result<
1269 tonic::Response<tonic::codec::Streaming<super::SurfaceSessionEvent>>,
1270 tonic::Status,
1271 > {
1272 self.inner
1273 .ready()
1274 .await
1275 .map_err(|e| {
1276 tonic::Status::unknown(
1277 format!("Service was not ready: {}", e.into()),
1278 )
1279 })?;
1280 let codec = tonic::codec::ProstCodec::default();
1281 let path = http::uri::PathAndQuery::from_static(
1282 "/allwright.engine.v1.EngineService/SurfaceSession",
1283 );
1284 let mut req = request.into_streaming_request();
1285 req.extensions_mut()
1286 .insert(
1287 GrpcMethod::new(
1288 "allwright.engine.v1.EngineService",
1289 "SurfaceSession",
1290 ),
1291 );
1292 self.inner.streaming(req, path, codec).await
1293 }
1294 pub async fn context_session(
1295 &mut self,
1296 request: impl tonic::IntoStreamingRequest<
1297 Message = super::ContextSessionCommand,
1298 >,
1299 ) -> std::result::Result<
1300 tonic::Response<tonic::codec::Streaming<super::ContextSessionEvent>>,
1301 tonic::Status,
1302 > {
1303 self.inner
1304 .ready()
1305 .await
1306 .map_err(|e| {
1307 tonic::Status::unknown(
1308 format!("Service was not ready: {}", e.into()),
1309 )
1310 })?;
1311 let codec = tonic::codec::ProstCodec::default();
1312 let path = http::uri::PathAndQuery::from_static(
1313 "/allwright.engine.v1.EngineService/ContextSession",
1314 );
1315 let mut req = request.into_streaming_request();
1316 req.extensions_mut()
1317 .insert(
1318 GrpcMethod::new(
1319 "allwright.engine.v1.EngineService",
1320 "ContextSession",
1321 ),
1322 );
1323 self.inner.streaming(req, path, codec).await
1324 }
1325 }
1326}
1327pub mod engine_service_server {
1329 #![allow(
1330 unused_variables,
1331 dead_code,
1332 missing_docs,
1333 clippy::wildcard_imports,
1334 clippy::let_unit_value,
1335 )]
1336 use tonic::codegen::*;
1337 #[async_trait]
1339 pub trait EngineService: std::marker::Send + std::marker::Sync + 'static {
1340 async fn ping(
1341 &self,
1342 request: tonic::Request<super::PingRequest>,
1343 ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status>;
1344 type SurfaceSessionStream: tonic::codegen::tokio_stream::Stream<
1346 Item = std::result::Result<super::SurfaceSessionEvent, tonic::Status>,
1347 >
1348 + std::marker::Send
1349 + 'static;
1350 async fn surface_session(
1351 &self,
1352 request: tonic::Request<tonic::Streaming<super::SurfaceSessionCommand>>,
1353 ) -> std::result::Result<
1354 tonic::Response<Self::SurfaceSessionStream>,
1355 tonic::Status,
1356 >;
1357 type ContextSessionStream: tonic::codegen::tokio_stream::Stream<
1359 Item = std::result::Result<super::ContextSessionEvent, tonic::Status>,
1360 >
1361 + std::marker::Send
1362 + 'static;
1363 async fn context_session(
1364 &self,
1365 request: tonic::Request<tonic::Streaming<super::ContextSessionCommand>>,
1366 ) -> std::result::Result<
1367 tonic::Response<Self::ContextSessionStream>,
1368 tonic::Status,
1369 >;
1370 }
1371 #[derive(Debug)]
1372 pub struct EngineServiceServer<T> {
1373 inner: Arc<T>,
1374 accept_compression_encodings: EnabledCompressionEncodings,
1375 send_compression_encodings: EnabledCompressionEncodings,
1376 max_decoding_message_size: Option<usize>,
1377 max_encoding_message_size: Option<usize>,
1378 }
1379 impl<T> EngineServiceServer<T> {
1380 pub fn new(inner: T) -> Self {
1381 Self::from_arc(Arc::new(inner))
1382 }
1383 pub fn from_arc(inner: Arc<T>) -> Self {
1384 Self {
1385 inner,
1386 accept_compression_encodings: Default::default(),
1387 send_compression_encodings: Default::default(),
1388 max_decoding_message_size: None,
1389 max_encoding_message_size: None,
1390 }
1391 }
1392 pub fn with_interceptor<F>(
1393 inner: T,
1394 interceptor: F,
1395 ) -> InterceptedService<Self, F>
1396 where
1397 F: tonic::service::Interceptor,
1398 {
1399 InterceptedService::new(Self::new(inner), interceptor)
1400 }
1401 #[must_use]
1403 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1404 self.accept_compression_encodings.enable(encoding);
1405 self
1406 }
1407 #[must_use]
1409 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1410 self.send_compression_encodings.enable(encoding);
1411 self
1412 }
1413 #[must_use]
1417 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1418 self.max_decoding_message_size = Some(limit);
1419 self
1420 }
1421 #[must_use]
1425 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1426 self.max_encoding_message_size = Some(limit);
1427 self
1428 }
1429 }
1430 impl<T, B> tonic::codegen::Service<http::Request<B>> for EngineServiceServer<T>
1431 where
1432 T: EngineService,
1433 B: Body + std::marker::Send + 'static,
1434 B::Error: Into<StdError> + std::marker::Send + 'static,
1435 {
1436 type Response = http::Response<tonic::body::BoxBody>;
1437 type Error = std::convert::Infallible;
1438 type Future = BoxFuture<Self::Response, Self::Error>;
1439 fn poll_ready(
1440 &mut self,
1441 _cx: &mut Context<'_>,
1442 ) -> Poll<std::result::Result<(), Self::Error>> {
1443 Poll::Ready(Ok(()))
1444 }
1445 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1446 match req.uri().path() {
1447 "/allwright.engine.v1.EngineService/Ping" => {
1448 #[allow(non_camel_case_types)]
1449 struct PingSvc<T: EngineService>(pub Arc<T>);
1450 impl<
1451 T: EngineService,
1452 > tonic::server::UnaryService<super::PingRequest> for PingSvc<T> {
1453 type Response = super::PingResponse;
1454 type Future = BoxFuture<
1455 tonic::Response<Self::Response>,
1456 tonic::Status,
1457 >;
1458 fn call(
1459 &mut self,
1460 request: tonic::Request<super::PingRequest>,
1461 ) -> Self::Future {
1462 let inner = Arc::clone(&self.0);
1463 let fut = async move {
1464 <T as EngineService>::ping(&inner, request).await
1465 };
1466 Box::pin(fut)
1467 }
1468 }
1469 let accept_compression_encodings = self.accept_compression_encodings;
1470 let send_compression_encodings = self.send_compression_encodings;
1471 let max_decoding_message_size = self.max_decoding_message_size;
1472 let max_encoding_message_size = self.max_encoding_message_size;
1473 let inner = self.inner.clone();
1474 let fut = async move {
1475 let method = PingSvc(inner);
1476 let codec = tonic::codec::ProstCodec::default();
1477 let mut grpc = tonic::server::Grpc::new(codec)
1478 .apply_compression_config(
1479 accept_compression_encodings,
1480 send_compression_encodings,
1481 )
1482 .apply_max_message_size_config(
1483 max_decoding_message_size,
1484 max_encoding_message_size,
1485 );
1486 let res = grpc.unary(method, req).await;
1487 Ok(res)
1488 };
1489 Box::pin(fut)
1490 }
1491 "/allwright.engine.v1.EngineService/SurfaceSession" => {
1492 #[allow(non_camel_case_types)]
1493 struct SurfaceSessionSvc<T: EngineService>(pub Arc<T>);
1494 impl<
1495 T: EngineService,
1496 > tonic::server::StreamingService<super::SurfaceSessionCommand>
1497 for SurfaceSessionSvc<T> {
1498 type Response = super::SurfaceSessionEvent;
1499 type ResponseStream = T::SurfaceSessionStream;
1500 type Future = BoxFuture<
1501 tonic::Response<Self::ResponseStream>,
1502 tonic::Status,
1503 >;
1504 fn call(
1505 &mut self,
1506 request: tonic::Request<
1507 tonic::Streaming<super::SurfaceSessionCommand>,
1508 >,
1509 ) -> Self::Future {
1510 let inner = Arc::clone(&self.0);
1511 let fut = async move {
1512 <T as EngineService>::surface_session(&inner, request).await
1513 };
1514 Box::pin(fut)
1515 }
1516 }
1517 let accept_compression_encodings = self.accept_compression_encodings;
1518 let send_compression_encodings = self.send_compression_encodings;
1519 let max_decoding_message_size = self.max_decoding_message_size;
1520 let max_encoding_message_size = self.max_encoding_message_size;
1521 let inner = self.inner.clone();
1522 let fut = async move {
1523 let method = SurfaceSessionSvc(inner);
1524 let codec = tonic::codec::ProstCodec::default();
1525 let mut grpc = tonic::server::Grpc::new(codec)
1526 .apply_compression_config(
1527 accept_compression_encodings,
1528 send_compression_encodings,
1529 )
1530 .apply_max_message_size_config(
1531 max_decoding_message_size,
1532 max_encoding_message_size,
1533 );
1534 let res = grpc.streaming(method, req).await;
1535 Ok(res)
1536 };
1537 Box::pin(fut)
1538 }
1539 "/allwright.engine.v1.EngineService/ContextSession" => {
1540 #[allow(non_camel_case_types)]
1541 struct ContextSessionSvc<T: EngineService>(pub Arc<T>);
1542 impl<
1543 T: EngineService,
1544 > tonic::server::StreamingService<super::ContextSessionCommand>
1545 for ContextSessionSvc<T> {
1546 type Response = super::ContextSessionEvent;
1547 type ResponseStream = T::ContextSessionStream;
1548 type Future = BoxFuture<
1549 tonic::Response<Self::ResponseStream>,
1550 tonic::Status,
1551 >;
1552 fn call(
1553 &mut self,
1554 request: tonic::Request<
1555 tonic::Streaming<super::ContextSessionCommand>,
1556 >,
1557 ) -> Self::Future {
1558 let inner = Arc::clone(&self.0);
1559 let fut = async move {
1560 <T as EngineService>::context_session(&inner, request).await
1561 };
1562 Box::pin(fut)
1563 }
1564 }
1565 let accept_compression_encodings = self.accept_compression_encodings;
1566 let send_compression_encodings = self.send_compression_encodings;
1567 let max_decoding_message_size = self.max_decoding_message_size;
1568 let max_encoding_message_size = self.max_encoding_message_size;
1569 let inner = self.inner.clone();
1570 let fut = async move {
1571 let method = ContextSessionSvc(inner);
1572 let codec = tonic::codec::ProstCodec::default();
1573 let mut grpc = tonic::server::Grpc::new(codec)
1574 .apply_compression_config(
1575 accept_compression_encodings,
1576 send_compression_encodings,
1577 )
1578 .apply_max_message_size_config(
1579 max_decoding_message_size,
1580 max_encoding_message_size,
1581 );
1582 let res = grpc.streaming(method, req).await;
1583 Ok(res)
1584 };
1585 Box::pin(fut)
1586 }
1587 _ => {
1588 Box::pin(async move {
1589 let mut response = http::Response::new(empty_body());
1590 let headers = response.headers_mut();
1591 headers
1592 .insert(
1593 tonic::Status::GRPC_STATUS,
1594 (tonic::Code::Unimplemented as i32).into(),
1595 );
1596 headers
1597 .insert(
1598 http::header::CONTENT_TYPE,
1599 tonic::metadata::GRPC_CONTENT_TYPE,
1600 );
1601 Ok(response)
1602 })
1603 }
1604 }
1605 }
1606 }
1607 impl<T> Clone for EngineServiceServer<T> {
1608 fn clone(&self) -> Self {
1609 let inner = self.inner.clone();
1610 Self {
1611 inner,
1612 accept_compression_encodings: self.accept_compression_encodings,
1613 send_compression_encodings: self.send_compression_encodings,
1614 max_decoding_message_size: self.max_decoding_message_size,
1615 max_encoding_message_size: self.max_encoding_message_size,
1616 }
1617 }
1618 }
1619 pub const SERVICE_NAME: &str = "allwright.engine.v1.EngineService";
1621 impl<T> tonic::server::NamedService for EngineServiceServer<T> {
1622 const NAME: &'static str = SERVICE_NAME;
1623 }
1624}