Skip to main content

allwright/
allwright.engine.v1.rs

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