Skip to main content

allwright/
allwright.engine.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct PingRequest {}
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct PingResponse {
6    #[prost(string, tag = "1")]
7    pub message: ::prost::alloc::string::String,
8    #[prost(string, tag = "2")]
9    pub version: ::prost::alloc::string::String,
10}
11#[derive(Clone, Copy, PartialEq, ::prost::Message)]
12pub struct CommandRetryOptions {
13    #[prost(uint32, optional, tag = "1")]
14    pub timeout_ms: ::core::option::Option<u32>,
15    #[prost(uint32, optional, tag = "2")]
16    pub retry_interval_ms: ::core::option::Option<u32>,
17}
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct ConnectMobileCommand {
20    #[prost(enumeration = "MobilePlatform", tag = "1")]
21    pub platform: i32,
22    #[prost(string, optional, tag = "2")]
23    pub device: ::core::option::Option<::prost::alloc::string::String>,
24    #[prost(string, optional, tag = "3")]
25    pub adb_endpoint: ::core::option::Option<::prost::alloc::string::String>,
26    #[prost(bool, tag = "4")]
27    pub preserve_app_state: bool,
28    #[prost(message, optional, tag = "5")]
29    pub retry_options: ::core::option::Option<CommandRetryOptions>,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct MobileConnectedEvent {
33    #[prost(enumeration = "MobilePlatform", tag = "1")]
34    pub platform: i32,
35    #[prost(string, tag = "2")]
36    pub device_name: ::prost::alloc::string::String,
37    #[prost(string, tag = "3")]
38    pub note: ::prost::alloc::string::String,
39    #[prost(string, tag = "4")]
40    pub device_id: ::prost::alloc::string::String,
41    #[prost(enumeration = "DeviceConnectionKind", tag = "5")]
42    pub connection_kind: i32,
43    #[prost(string, tag = "6")]
44    pub backend: ::prost::alloc::string::String,
45    #[prost(string, tag = "7")]
46    pub device_session_id: ::prost::alloc::string::String,
47    #[prost(string, tag = "8")]
48    pub initial_app_session_id: ::prost::alloc::string::String,
49    #[prost(string, optional, tag = "9")]
50    pub package_name: ::core::option::Option<::prost::alloc::string::String>,
51    #[prost(string, optional, tag = "10")]
52    pub activity_name: ::core::option::Option<::prost::alloc::string::String>,
53}
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct LaunchAppCommand {
56    #[prost(string, optional, tag = "1")]
57    pub apk_path: ::core::option::Option<::prost::alloc::string::String>,
58    #[prost(string, optional, tag = "2")]
59    pub app_id: ::core::option::Option<::prost::alloc::string::String>,
60    #[prost(string, optional, tag = "3")]
61    pub launch_activity: ::core::option::Option<::prost::alloc::string::String>,
62    #[prost(bool, tag = "4")]
63    pub stop_before_launch: bool,
64    #[prost(message, optional, tag = "5")]
65    pub retry_options: ::core::option::Option<CommandRetryOptions>,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct AppLaunchedEvent {
69    #[prost(string, tag = "1")]
70    pub app_session_id: ::prost::alloc::string::String,
71    #[prost(string, tag = "2")]
72    pub note: ::prost::alloc::string::String,
73    #[prost(string, optional, tag = "3")]
74    pub package_name: ::core::option::Option<::prost::alloc::string::String>,
75    #[prost(string, optional, tag = "4")]
76    pub activity_name: ::core::option::Option<::prost::alloc::string::String>,
77    #[prost(string, optional, tag = "5")]
78    pub webview_context: ::core::option::Option<::prost::alloc::string::String>,
79}
80#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
81#[repr(i32)]
82pub enum MobilePlatform {
83    Unspecified = 0,
84    Android = 1,
85    Ios = 2,
86}
87impl MobilePlatform {
88    /// String value of the enum field names used in the ProtoBuf definition.
89    ///
90    /// The values are not transformed in any way and thus are considered stable
91    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
92    pub fn as_str_name(&self) -> &'static str {
93        match self {
94            Self::Unspecified => "MOBILE_PLATFORM_UNSPECIFIED",
95            Self::Android => "MOBILE_PLATFORM_ANDROID",
96            Self::Ios => "MOBILE_PLATFORM_IOS",
97        }
98    }
99    /// Creates an enum from field names used in the ProtoBuf definition.
100    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
101        match value {
102            "MOBILE_PLATFORM_UNSPECIFIED" => Some(Self::Unspecified),
103            "MOBILE_PLATFORM_ANDROID" => Some(Self::Android),
104            "MOBILE_PLATFORM_IOS" => Some(Self::Ios),
105            _ => None,
106        }
107    }
108}
109#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
110#[repr(i32)]
111pub enum DeviceConnectionKind {
112    Unspecified = 0,
113    Usb = 1,
114    Emulator = 2,
115    RemoteAdb = 3,
116}
117impl DeviceConnectionKind {
118    /// String value of the enum field names used in the ProtoBuf definition.
119    ///
120    /// The values are not transformed in any way and thus are considered stable
121    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
122    pub fn as_str_name(&self) -> &'static str {
123        match self {
124            Self::Unspecified => "DEVICE_CONNECTION_KIND_UNSPECIFIED",
125            Self::Usb => "DEVICE_CONNECTION_KIND_USB",
126            Self::Emulator => "DEVICE_CONNECTION_KIND_EMULATOR",
127            Self::RemoteAdb => "DEVICE_CONNECTION_KIND_REMOTE_ADB",
128        }
129    }
130    /// Creates an enum from field names used in the ProtoBuf definition.
131    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
132        match value {
133            "DEVICE_CONNECTION_KIND_UNSPECIFIED" => Some(Self::Unspecified),
134            "DEVICE_CONNECTION_KIND_USB" => Some(Self::Usb),
135            "DEVICE_CONNECTION_KIND_EMULATOR" => Some(Self::Emulator),
136            "DEVICE_CONNECTION_KIND_REMOTE_ADB" => Some(Self::RemoteAdb),
137            _ => None,
138        }
139    }
140}
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct LaunchBrowserCommand {
143    #[prost(enumeration = "BrowserKind", tag = "1")]
144    pub browser_kind: i32,
145    #[prost(string, optional, tag = "2")]
146    pub browser_binary: ::core::option::Option<::prost::alloc::string::String>,
147    #[prost(message, optional, tag = "3")]
148    pub retry_options: ::core::option::Option<CommandRetryOptions>,
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct BrowserLaunchedEvent {
152    #[prost(enumeration = "BrowserKind", tag = "1")]
153    pub browser_kind: i32,
154    #[prost(string, tag = "2")]
155    pub browser: ::prost::alloc::string::String,
156    #[prost(string, tag = "3")]
157    pub note: ::prost::alloc::string::String,
158    #[prost(string, tag = "4")]
159    pub user_data_dir: ::prost::alloc::string::String,
160    #[prost(string, tag = "5")]
161    pub initial_page_session_id: ::prost::alloc::string::String,
162}
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct LaunchChromeCommand {
165    #[prost(string, optional, tag = "1")]
166    pub chrome_binary: ::core::option::Option<::prost::alloc::string::String>,
167    #[prost(message, optional, tag = "2")]
168    pub retry_options: ::core::option::Option<CommandRetryOptions>,
169}
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct ChromeLaunchedEvent {
172    #[prost(string, tag = "1")]
173    pub browser: ::prost::alloc::string::String,
174    #[prost(string, tag = "2")]
175    pub note: ::prost::alloc::string::String,
176    #[prost(string, tag = "3")]
177    pub cdp_websocket_url: ::prost::alloc::string::String,
178    #[prost(string, tag = "4")]
179    pub user_data_dir: ::prost::alloc::string::String,
180    #[prost(string, tag = "5")]
181    pub initial_page_session_id: ::prost::alloc::string::String,
182}
183#[derive(Clone, Copy, PartialEq, ::prost::Message)]
184pub struct RegisterNewPageHook {}
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct NewPageHookResult {
187    #[prost(string, tag = "1")]
188    pub context_session_id: ::prost::alloc::string::String,
189    #[prost(string, tag = "2")]
190    pub note: ::prost::alloc::string::String,
191}
192#[derive(Clone, Copy, PartialEq, ::prost::Message)]
193pub struct RegisterFileChooserHook {}
194#[derive(Clone, PartialEq, ::prost::Message)]
195pub struct FileChooserHookResult {
196    #[prost(string, tag = "1")]
197    pub file_chooser_id: ::prost::alloc::string::String,
198    #[prost(bool, tag = "2")]
199    pub is_multiple: bool,
200    #[prost(string, tag = "3")]
201    pub note: ::prost::alloc::string::String,
202}
203#[derive(Clone, PartialEq, ::prost::Message)]
204pub struct SetFileChooserFilesCommand {
205    #[prost(string, tag = "1")]
206    pub file_chooser_id: ::prost::alloc::string::String,
207    #[prost(string, repeated, tag = "2")]
208    pub files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
209    #[prost(message, optional, tag = "3")]
210    pub retry_options: ::core::option::Option<CommandRetryOptions>,
211}
212#[derive(Clone, PartialEq, ::prost::Message)]
213pub struct FileChooserFilesSetEvent {
214    #[prost(string, tag = "1")]
215    pub file_chooser_id: ::prost::alloc::string::String,
216    #[prost(string, repeated, tag = "2")]
217    pub files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
218    #[prost(string, tag = "3")]
219    pub note: ::prost::alloc::string::String,
220}
221#[derive(Clone, Copy, PartialEq, ::prost::Message)]
222pub struct RegisterDownloadHook {}
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct DownloadHookResult {
225    #[prost(string, tag = "1")]
226    pub download_id: ::prost::alloc::string::String,
227    #[prost(string, tag = "2")]
228    pub url: ::prost::alloc::string::String,
229    #[prost(string, tag = "3")]
230    pub suggested_filename: ::prost::alloc::string::String,
231    #[prost(string, tag = "4")]
232    pub note: ::prost::alloc::string::String,
233}
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct SaveDownloadCommand {
236    #[prost(string, tag = "1")]
237    pub download_id: ::prost::alloc::string::String,
238    #[prost(string, tag = "2")]
239    pub path: ::prost::alloc::string::String,
240    #[prost(message, optional, tag = "3")]
241    pub retry_options: ::core::option::Option<CommandRetryOptions>,
242}
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct DownloadSavedEvent {
245    #[prost(string, tag = "1")]
246    pub download_id: ::prost::alloc::string::String,
247    #[prost(string, tag = "2")]
248    pub path: ::prost::alloc::string::String,
249    #[prost(string, tag = "3")]
250    pub note: ::prost::alloc::string::String,
251}
252#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
253#[repr(i32)]
254pub enum BrowserKind {
255    Unspecified = 0,
256    Chromium = 1,
257    Firefox = 2,
258}
259impl BrowserKind {
260    /// String value of the enum field names used in the ProtoBuf definition.
261    ///
262    /// The values are not transformed in any way and thus are considered stable
263    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
264    pub fn as_str_name(&self) -> &'static str {
265        match self {
266            Self::Unspecified => "BROWSER_KIND_UNSPECIFIED",
267            Self::Chromium => "BROWSER_KIND_CHROMIUM",
268            Self::Firefox => "BROWSER_KIND_FIREFOX",
269        }
270    }
271    /// Creates an enum from field names used in the ProtoBuf definition.
272    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
273        match value {
274            "BROWSER_KIND_UNSPECIFIED" => Some(Self::Unspecified),
275            "BROWSER_KIND_CHROMIUM" => Some(Self::Chromium),
276            "BROWSER_KIND_FIREFOX" => Some(Self::Firefox),
277            _ => None,
278        }
279    }
280}
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct SurfaceSessionCommand {
283    #[prost(oneof = "surface_session_command::Command", tags = "1, 2, 3, 4, 5, 6, 7")]
284    pub command: ::core::option::Option<surface_session_command::Command>,
285}
286/// Nested message and enum types in `SurfaceSessionCommand`.
287pub mod surface_session_command {
288    #[derive(Clone, PartialEq, ::prost::Oneof)]
289    pub enum Command {
290        #[prost(message, tag = "1")]
291        LaunchChrome(super::LaunchChromeCommand),
292        #[prost(message, tag = "2")]
293        OpenContext(super::OpenContextCommand),
294        #[prost(message, tag = "3")]
295        Ping(super::SessionPingCommand),
296        #[prost(message, tag = "4")]
297        Close(super::CloseSurfaceSessionCommand),
298        #[prost(message, tag = "5")]
299        LaunchBrowser(super::LaunchBrowserCommand),
300        #[prost(message, tag = "6")]
301        ConnectMobile(super::ConnectMobileCommand),
302        #[prost(message, tag = "7")]
303        LaunchApp(super::LaunchAppCommand),
304    }
305}
306#[derive(Clone, Copy, PartialEq, ::prost::Message)]
307pub struct OpenContextCommand {
308    #[prost(message, optional, tag = "1")]
309    pub retry_options: ::core::option::Option<CommandRetryOptions>,
310}
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct SessionPingCommand {
313    #[prost(string, tag = "1")]
314    pub message: ::prost::alloc::string::String,
315}
316#[derive(Clone, Copy, PartialEq, ::prost::Message)]
317pub struct CloseSurfaceSessionCommand {}
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct SurfaceSessionEvent {
320    #[prost(string, tag = "1")]
321    pub session_id: ::prost::alloc::string::String,
322    #[prost(oneof = "surface_session_event::Event", tags = "2, 3, 4, 5, 6, 7, 8, 9")]
323    pub event: ::core::option::Option<surface_session_event::Event>,
324}
325/// Nested message and enum types in `SurfaceSessionEvent`.
326pub mod surface_session_event {
327    #[derive(Clone, PartialEq, ::prost::Oneof)]
328    pub enum Event {
329        #[prost(message, tag = "2")]
330        ChromeLaunched(super::ChromeLaunchedEvent),
331        #[prost(message, tag = "3")]
332        ContextOpened(super::ContextOpenedEvent),
333        #[prost(message, tag = "4")]
334        Pong(super::SessionPongEvent),
335        #[prost(message, tag = "5")]
336        Closed(super::SurfaceSessionClosedEvent),
337        #[prost(message, tag = "6")]
338        Error(super::SurfaceSessionErrorEvent),
339        #[prost(message, tag = "7")]
340        BrowserLaunched(super::BrowserLaunchedEvent),
341        #[prost(message, tag = "8")]
342        MobileConnected(super::MobileConnectedEvent),
343        #[prost(message, tag = "9")]
344        AppLaunched(super::AppLaunchedEvent),
345    }
346}
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct ContextOpenedEvent {
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, PartialEq, ::prost::Message)]
355pub struct SessionPongEvent {
356    #[prost(string, tag = "1")]
357    pub message: ::prost::alloc::string::String,
358}
359#[derive(Clone, PartialEq, ::prost::Message)]
360pub struct SurfaceSessionClosedEvent {
361    #[prost(string, tag = "1")]
362    pub reason: ::prost::alloc::string::String,
363}
364#[derive(Clone, PartialEq, ::prost::Message)]
365pub struct SurfaceSessionErrorEvent {
366    #[prost(string, tag = "1")]
367    pub message: ::prost::alloc::string::String,
368}
369#[derive(Clone, PartialEq, ::prost::Message)]
370pub struct ContextSessionCommand {
371    #[prost(string, tag = "1")]
372    pub surface_session_id: ::prost::alloc::string::String,
373    #[prost(string, tag = "2")]
374    pub context_session_id: ::prost::alloc::string::String,
375    #[prost(
376        oneof = "context_session_command::Command",
377        tags = "3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21"
378    )]
379    pub command: ::core::option::Option<context_session_command::Command>,
380}
381/// Nested message and enum types in `ContextSessionCommand`.
382pub mod context_session_command {
383    #[derive(Clone, PartialEq, ::prost::Oneof)]
384    pub enum Command {
385        #[prost(message, tag = "3")]
386        Ping(super::ContextSessionPingCommand),
387        #[prost(message, tag = "4")]
388        Close(super::CloseContextSessionCommand),
389        #[prost(message, tag = "5")]
390        Navigate(super::NavigatePageCommand),
391        #[prost(message, tag = "6")]
392        ClickElement(super::ClickElementCommand),
393        #[prost(message, tag = "7")]
394        CountElements(super::CountElementsCommand),
395        #[prost(message, tag = "8")]
396        HighlightElements(super::HighlightElementsCommand),
397        #[prost(message, tag = "9")]
398        FocusElement(super::FocusElementCommand),
399        #[prost(message, tag = "10")]
400        FillElement(super::FillElementCommand),
401        #[prost(message, tag = "11")]
402        HoverElement(super::HoverElementCommand),
403        #[prost(message, tag = "12")]
404        PressKey(super::PressKeyCommand),
405        #[prost(message, tag = "13")]
406        GetTextContent(super::GetTextContentCommand),
407        #[prost(message, tag = "14")]
408        GetInnerText(super::GetInnerTextCommand),
409        #[prost(message, tag = "15")]
410        WaitForSelector(super::WaitForSelectorCommand),
411        #[prost(message, tag = "16")]
412        Screenshot(super::ScreenshotCommand),
413        #[prost(message, tag = "17")]
414        AccessibilitySnapshot(super::AccessibilitySnapshotCommand),
415        #[prost(message, tag = "18")]
416        RegisterHook(super::RegisterHookCommand),
417        #[prost(message, tag = "19")]
418        WaitForHook(super::WaitForHookCommand),
419        #[prost(message, tag = "20")]
420        SetFileChooserFiles(super::SetFileChooserFilesCommand),
421        #[prost(message, tag = "21")]
422        SaveDownload(super::SaveDownloadCommand),
423    }
424}
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct ContextSessionPingCommand {
427    #[prost(string, tag = "1")]
428    pub message: ::prost::alloc::string::String,
429}
430#[derive(Clone, Copy, PartialEq, ::prost::Message)]
431pub struct CloseContextSessionCommand {}
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct ContextSessionEvent {
434    #[prost(string, tag = "1")]
435    pub context_session_id: ::prost::alloc::string::String,
436    #[prost(
437        oneof = "context_session_event::Event",
438        tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23"
439    )]
440    pub event: ::core::option::Option<context_session_event::Event>,
441}
442/// Nested message and enum types in `ContextSessionEvent`.
443pub mod context_session_event {
444    #[derive(Clone, PartialEq, ::prost::Oneof)]
445    pub enum Event {
446        #[prost(message, tag = "2")]
447        Attached(super::ContextSessionAttachedEvent),
448        #[prost(message, tag = "3")]
449        Pong(super::ContextSessionPongEvent),
450        #[prost(message, tag = "4")]
451        Closed(super::ContextSessionClosedEvent),
452        #[prost(message, tag = "5")]
453        Error(super::ContextSessionErrorEvent),
454        #[prost(message, tag = "6")]
455        Navigated(super::PageNavigatedEvent),
456        #[prost(message, tag = "7")]
457        ChromiumBidiInjection(super::ChromiumBidiInjectionEvent),
458        #[prost(message, tag = "8")]
459        ElementClicked(super::ElementClickedEvent),
460        #[prost(message, tag = "9")]
461        ElementCounted(super::ElementCountedEvent),
462        #[prost(message, tag = "10")]
463        ElementsHighlighted(super::ElementsHighlightedEvent),
464        #[prost(message, tag = "11")]
465        ElementFocused(super::ElementFocusedEvent),
466        #[prost(message, tag = "12")]
467        ElementFilled(super::ElementFilledEvent),
468        #[prost(message, tag = "13")]
469        ElementHovered(super::ElementHoveredEvent),
470        #[prost(message, tag = "14")]
471        KeyPressed(super::KeyPressedEvent),
472        #[prost(message, tag = "15")]
473        TextContentResolved(super::TextContentResolvedEvent),
474        #[prost(message, tag = "16")]
475        InnerTextResolved(super::InnerTextResolvedEvent),
476        #[prost(message, tag = "17")]
477        SelectorWaitSatisfied(super::SelectorWaitSatisfiedEvent),
478        #[prost(message, tag = "18")]
479        ScreenshotCaptured(super::ScreenshotCapturedEvent),
480        #[prost(message, tag = "19")]
481        AccessibilitySnapshotCaptured(super::AccessibilitySnapshotCapturedEvent),
482        #[prost(message, tag = "20")]
483        HookRegistered(super::HookRegisteredEvent),
484        #[prost(message, tag = "21")]
485        HookCompleted(super::HookCompletedEvent),
486        #[prost(message, tag = "22")]
487        FileChooserFilesSet(super::FileChooserFilesSetEvent),
488        #[prost(message, tag = "23")]
489        DownloadSaved(super::DownloadSavedEvent),
490    }
491}
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct ContextSessionAttachedEvent {
494    #[prost(string, tag = "1")]
495    pub note: ::prost::alloc::string::String,
496}
497#[derive(Clone, PartialEq, ::prost::Message)]
498pub struct ContextSessionPongEvent {
499    #[prost(string, tag = "1")]
500    pub message: ::prost::alloc::string::String,
501}
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct ContextSessionClosedEvent {
504    #[prost(string, tag = "1")]
505    pub reason: ::prost::alloc::string::String,
506}
507#[derive(Clone, PartialEq, ::prost::Message)]
508pub struct ContextSessionErrorEvent {
509    #[prost(string, tag = "1")]
510    pub message: ::prost::alloc::string::String,
511}
512#[derive(Clone, Copy, PartialEq, ::prost::Message)]
513pub struct RegisterHookCommand {
514    #[prost(oneof = "register_hook_command::Hook", tags = "1, 2, 3")]
515    pub hook: ::core::option::Option<register_hook_command::Hook>,
516}
517/// Nested message and enum types in `RegisterHookCommand`.
518pub mod register_hook_command {
519    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
520    pub enum Hook {
521        #[prost(message, tag = "1")]
522        NewPage(super::RegisterNewPageHook),
523        #[prost(message, tag = "2")]
524        FileChooser(super::RegisterFileChooserHook),
525        #[prost(message, tag = "3")]
526        Download(super::RegisterDownloadHook),
527    }
528}
529#[derive(Clone, PartialEq, ::prost::Message)]
530pub struct WaitForHookCommand {
531    #[prost(string, tag = "1")]
532    pub hook_id: ::prost::alloc::string::String,
533    #[prost(message, optional, tag = "2")]
534    pub retry_options: ::core::option::Option<CommandRetryOptions>,
535}
536#[derive(Clone, PartialEq, ::prost::Message)]
537pub struct HookRegisteredEvent {
538    #[prost(string, tag = "1")]
539    pub hook_id: ::prost::alloc::string::String,
540}
541#[derive(Clone, PartialEq, ::prost::Message)]
542pub struct HookCompletedEvent {
543    #[prost(string, tag = "1")]
544    pub hook_id: ::prost::alloc::string::String,
545    #[prost(oneof = "hook_completed_event::Result", tags = "2, 3, 4")]
546    pub result: ::core::option::Option<hook_completed_event::Result>,
547}
548/// Nested message and enum types in `HookCompletedEvent`.
549pub mod hook_completed_event {
550    #[derive(Clone, PartialEq, ::prost::Oneof)]
551    pub enum Result {
552        #[prost(message, tag = "2")]
553        NewPage(super::NewPageHookResult),
554        #[prost(message, tag = "3")]
555        FileChooser(super::FileChooserHookResult),
556        #[prost(message, tag = "4")]
557        Download(super::DownloadHookResult),
558    }
559}
560#[derive(Clone, PartialEq, ::prost::Message)]
561pub struct NavigatePageCommand {
562    #[prost(string, tag = "1")]
563    pub url: ::prost::alloc::string::String,
564    #[prost(message, optional, tag = "2")]
565    pub retry_options: ::core::option::Option<CommandRetryOptions>,
566}
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct ClickElementCommand {
569    #[prost(string, tag = "1")]
570    pub css_selector: ::prost::alloc::string::String,
571    #[prost(message, optional, tag = "2")]
572    pub retry_options: ::core::option::Option<CommandRetryOptions>,
573}
574#[derive(Clone, PartialEq, ::prost::Message)]
575pub struct CountElementsCommand {
576    #[prost(string, tag = "1")]
577    pub css_selector: ::prost::alloc::string::String,
578    #[prost(message, optional, tag = "2")]
579    pub retry_options: ::core::option::Option<CommandRetryOptions>,
580}
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct HighlightElementsCommand {
583    #[prost(string, tag = "1")]
584    pub css_selector: ::prost::alloc::string::String,
585    #[prost(uint32, optional, tag = "2")]
586    pub duration_ms: ::core::option::Option<u32>,
587    #[prost(message, optional, tag = "3")]
588    pub retry_options: ::core::option::Option<CommandRetryOptions>,
589}
590#[derive(Clone, PartialEq, ::prost::Message)]
591pub struct FocusElementCommand {
592    #[prost(string, tag = "1")]
593    pub css_selector: ::prost::alloc::string::String,
594    #[prost(message, optional, tag = "2")]
595    pub retry_options: ::core::option::Option<CommandRetryOptions>,
596}
597#[derive(Clone, PartialEq, ::prost::Message)]
598pub struct FillElementCommand {
599    #[prost(string, tag = "1")]
600    pub css_selector: ::prost::alloc::string::String,
601    #[prost(string, tag = "2")]
602    pub value: ::prost::alloc::string::String,
603    #[prost(message, optional, tag = "3")]
604    pub retry_options: ::core::option::Option<CommandRetryOptions>,
605}
606#[derive(Clone, PartialEq, ::prost::Message)]
607pub struct HoverElementCommand {
608    #[prost(string, tag = "1")]
609    pub css_selector: ::prost::alloc::string::String,
610    #[prost(message, optional, tag = "2")]
611    pub retry_options: ::core::option::Option<CommandRetryOptions>,
612}
613#[derive(Clone, PartialEq, ::prost::Message)]
614pub struct PressKeyCommand {
615    #[prost(string, tag = "1")]
616    pub css_selector: ::prost::alloc::string::String,
617    #[prost(string, tag = "2")]
618    pub key: ::prost::alloc::string::String,
619    #[prost(string, optional, tag = "3")]
620    pub text: ::core::option::Option<::prost::alloc::string::String>,
621    #[prost(message, optional, tag = "4")]
622    pub retry_options: ::core::option::Option<CommandRetryOptions>,
623}
624#[derive(Clone, PartialEq, ::prost::Message)]
625pub struct GetTextContentCommand {
626    #[prost(string, tag = "1")]
627    pub css_selector: ::prost::alloc::string::String,
628    #[prost(message, optional, tag = "2")]
629    pub retry_options: ::core::option::Option<CommandRetryOptions>,
630}
631#[derive(Clone, PartialEq, ::prost::Message)]
632pub struct GetInnerTextCommand {
633    #[prost(string, tag = "1")]
634    pub css_selector: ::prost::alloc::string::String,
635    #[prost(message, optional, tag = "2")]
636    pub retry_options: ::core::option::Option<CommandRetryOptions>,
637}
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct WaitForSelectorCommand {
640    #[prost(string, tag = "1")]
641    pub css_selector: ::prost::alloc::string::String,
642    #[prost(bool, optional, tag = "2")]
643    pub visible: ::core::option::Option<bool>,
644    #[prost(message, optional, tag = "3")]
645    pub retry_options: ::core::option::Option<CommandRetryOptions>,
646}
647#[derive(Clone, Copy, PartialEq, ::prost::Message)]
648pub struct ScreenshotCommand {
649    #[prost(message, optional, tag = "1")]
650    pub retry_options: ::core::option::Option<CommandRetryOptions>,
651    #[prost(bool, optional, tag = "2")]
652    pub full_page: ::core::option::Option<bool>,
653}
654#[derive(Clone, PartialEq, ::prost::Message)]
655pub struct PageNavigatedEvent {
656    #[prost(string, tag = "1")]
657    pub url: ::prost::alloc::string::String,
658    #[prost(string, tag = "2")]
659    pub note: ::prost::alloc::string::String,
660}
661#[derive(Clone, PartialEq, ::prost::Message)]
662pub struct ChromiumBidiInjectionEvent {
663    #[prost(string, tag = "1")]
664    pub note: ::prost::alloc::string::String,
665    #[prost(string, tag = "2")]
666    pub bidi_session_id: ::prost::alloc::string::String,
667    #[prost(string, tag = "3")]
668    pub mapper_target_id: ::prost::alloc::string::String,
669    #[prost(string, tag = "4")]
670    pub mapper_session_id: ::prost::alloc::string::String,
671    #[prost(string, tag = "5")]
672    pub package_version: ::prost::alloc::string::String,
673}
674#[derive(Clone, PartialEq, ::prost::Message)]
675pub struct ElementClickedEvent {
676    #[prost(string, tag = "1")]
677    pub css_selector: ::prost::alloc::string::String,
678    #[prost(string, tag = "2")]
679    pub note: ::prost::alloc::string::String,
680    #[prost(string, tag = "3")]
681    pub bidi_session_id: ::prost::alloc::string::String,
682}
683#[derive(Clone, PartialEq, ::prost::Message)]
684pub struct ElementCountedEvent {
685    #[prost(string, tag = "1")]
686    pub css_selector: ::prost::alloc::string::String,
687    #[prost(uint32, tag = "2")]
688    pub count: u32,
689    #[prost(string, tag = "3")]
690    pub note: ::prost::alloc::string::String,
691}
692#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct ElementsHighlightedEvent {
694    #[prost(string, tag = "1")]
695    pub css_selector: ::prost::alloc::string::String,
696    #[prost(uint32, tag = "2")]
697    pub count: u32,
698    #[prost(string, tag = "3")]
699    pub note: ::prost::alloc::string::String,
700}
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct ElementFocusedEvent {
703    #[prost(string, tag = "1")]
704    pub css_selector: ::prost::alloc::string::String,
705    #[prost(string, tag = "2")]
706    pub note: ::prost::alloc::string::String,
707}
708#[derive(Clone, PartialEq, ::prost::Message)]
709pub struct ElementFilledEvent {
710    #[prost(string, tag = "1")]
711    pub css_selector: ::prost::alloc::string::String,
712    #[prost(string, tag = "2")]
713    pub value: ::prost::alloc::string::String,
714    #[prost(string, tag = "3")]
715    pub note: ::prost::alloc::string::String,
716}
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct ElementHoveredEvent {
719    #[prost(string, tag = "1")]
720    pub css_selector: ::prost::alloc::string::String,
721    #[prost(string, tag = "2")]
722    pub note: ::prost::alloc::string::String,
723}
724#[derive(Clone, PartialEq, ::prost::Message)]
725pub struct KeyPressedEvent {
726    #[prost(string, tag = "1")]
727    pub css_selector: ::prost::alloc::string::String,
728    #[prost(string, tag = "2")]
729    pub key: ::prost::alloc::string::String,
730    #[prost(string, tag = "3")]
731    pub note: ::prost::alloc::string::String,
732}
733#[derive(Clone, PartialEq, ::prost::Message)]
734pub struct TextContentResolvedEvent {
735    #[prost(string, tag = "1")]
736    pub css_selector: ::prost::alloc::string::String,
737    #[prost(string, tag = "2")]
738    pub text: ::prost::alloc::string::String,
739    #[prost(string, tag = "3")]
740    pub note: ::prost::alloc::string::String,
741}
742#[derive(Clone, PartialEq, ::prost::Message)]
743pub struct InnerTextResolvedEvent {
744    #[prost(string, tag = "1")]
745    pub css_selector: ::prost::alloc::string::String,
746    #[prost(string, tag = "2")]
747    pub text: ::prost::alloc::string::String,
748    #[prost(string, tag = "3")]
749    pub note: ::prost::alloc::string::String,
750}
751#[derive(Clone, PartialEq, ::prost::Message)]
752pub struct SelectorWaitSatisfiedEvent {
753    #[prost(string, tag = "1")]
754    pub css_selector: ::prost::alloc::string::String,
755    #[prost(bool, tag = "2")]
756    pub visible: bool,
757    #[prost(string, tag = "3")]
758    pub note: ::prost::alloc::string::String,
759}
760#[derive(Clone, PartialEq, ::prost::Message)]
761pub struct ScreenshotCapturedEvent {
762    #[prost(bytes = "vec", tag = "1")]
763    pub png_data: ::prost::alloc::vec::Vec<u8>,
764    #[prost(string, tag = "2")]
765    pub note: ::prost::alloc::string::String,
766}
767/// Empty format defaults to JSON. Accepted values are "json" and "yaml".
768#[derive(Clone, PartialEq, ::prost::Message)]
769pub struct AccessibilitySnapshotCommand {
770    /// Empty mode defaults to default. AI assigns queryable references; reference storage is surface-owned.
771    /// Supported: default, ai, autoexpect, codegen.
772    #[prost(string, tag = "3")]
773    pub mode: ::prost::alloc::string::String,
774    #[prost(string, tag = "1")]
775    pub format: ::prost::alloc::string::String,
776    #[prost(message, optional, tag = "2")]
777    pub retry_options: ::core::option::Option<CommandRetryOptions>,
778}
779/// Both formats encode the same versioned, structured document.
780#[derive(Clone, PartialEq, ::prost::Message)]
781pub struct AccessibilitySnapshotCapturedEvent {
782    #[prost(string, tag = "1")]
783    pub snapshot: ::prost::alloc::string::String,
784    #[prost(string, tag = "2")]
785    pub format: ::prost::alloc::string::String,
786}
787/// Generated client implementations.
788pub mod engine_service_client {
789    #![allow(
790        unused_variables,
791        dead_code,
792        missing_docs,
793        clippy::wildcard_imports,
794        clippy::let_unit_value,
795    )]
796    use tonic::codegen::*;
797    use tonic::codegen::http::Uri;
798    #[derive(Debug, Clone)]
799    pub struct EngineServiceClient<T> {
800        inner: tonic::client::Grpc<T>,
801    }
802    impl EngineServiceClient<tonic::transport::Channel> {
803        /// Attempt to create a new client by connecting to a given endpoint.
804        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
805        where
806            D: TryInto<tonic::transport::Endpoint>,
807            D::Error: Into<StdError>,
808        {
809            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
810            Ok(Self::new(conn))
811        }
812    }
813    impl<T> EngineServiceClient<T>
814    where
815        T: tonic::client::GrpcService<tonic::body::BoxBody>,
816        T::Error: Into<StdError>,
817        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
818        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
819    {
820        pub fn new(inner: T) -> Self {
821            let inner = tonic::client::Grpc::new(inner);
822            Self { inner }
823        }
824        pub fn with_origin(inner: T, origin: Uri) -> Self {
825            let inner = tonic::client::Grpc::with_origin(inner, origin);
826            Self { inner }
827        }
828        pub fn with_interceptor<F>(
829            inner: T,
830            interceptor: F,
831        ) -> EngineServiceClient<InterceptedService<T, F>>
832        where
833            F: tonic::service::Interceptor,
834            T::ResponseBody: Default,
835            T: tonic::codegen::Service<
836                http::Request<tonic::body::BoxBody>,
837                Response = http::Response<
838                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
839                >,
840            >,
841            <T as tonic::codegen::Service<
842                http::Request<tonic::body::BoxBody>,
843            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
844        {
845            EngineServiceClient::new(InterceptedService::new(inner, interceptor))
846        }
847        /// Compress requests with the given encoding.
848        ///
849        /// This requires the server to support it otherwise it might respond with an
850        /// error.
851        #[must_use]
852        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
853            self.inner = self.inner.send_compressed(encoding);
854            self
855        }
856        /// Enable decompressing responses.
857        #[must_use]
858        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
859            self.inner = self.inner.accept_compressed(encoding);
860            self
861        }
862        /// Limits the maximum size of a decoded message.
863        ///
864        /// Default: `4MB`
865        #[must_use]
866        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
867            self.inner = self.inner.max_decoding_message_size(limit);
868            self
869        }
870        /// Limits the maximum size of an encoded message.
871        ///
872        /// Default: `usize::MAX`
873        #[must_use]
874        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
875            self.inner = self.inner.max_encoding_message_size(limit);
876            self
877        }
878        pub async fn ping(
879            &mut self,
880            request: impl tonic::IntoRequest<super::PingRequest>,
881        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
882            self.inner
883                .ready()
884                .await
885                .map_err(|e| {
886                    tonic::Status::unknown(
887                        format!("Service was not ready: {}", e.into()),
888                    )
889                })?;
890            let codec = tonic::codec::ProstCodec::default();
891            let path = http::uri::PathAndQuery::from_static(
892                "/allwright.engine.v1.EngineService/Ping",
893            );
894            let mut req = request.into_request();
895            req.extensions_mut()
896                .insert(GrpcMethod::new("allwright.engine.v1.EngineService", "Ping"));
897            self.inner.unary(req, path, codec).await
898        }
899        pub async fn surface_session(
900            &mut self,
901            request: impl tonic::IntoStreamingRequest<
902                Message = super::SurfaceSessionCommand,
903            >,
904        ) -> std::result::Result<
905            tonic::Response<tonic::codec::Streaming<super::SurfaceSessionEvent>>,
906            tonic::Status,
907        > {
908            self.inner
909                .ready()
910                .await
911                .map_err(|e| {
912                    tonic::Status::unknown(
913                        format!("Service was not ready: {}", e.into()),
914                    )
915                })?;
916            let codec = tonic::codec::ProstCodec::default();
917            let path = http::uri::PathAndQuery::from_static(
918                "/allwright.engine.v1.EngineService/SurfaceSession",
919            );
920            let mut req = request.into_streaming_request();
921            req.extensions_mut()
922                .insert(
923                    GrpcMethod::new(
924                        "allwright.engine.v1.EngineService",
925                        "SurfaceSession",
926                    ),
927                );
928            self.inner.streaming(req, path, codec).await
929        }
930        pub async fn context_session(
931            &mut self,
932            request: impl tonic::IntoStreamingRequest<
933                Message = super::ContextSessionCommand,
934            >,
935        ) -> std::result::Result<
936            tonic::Response<tonic::codec::Streaming<super::ContextSessionEvent>>,
937            tonic::Status,
938        > {
939            self.inner
940                .ready()
941                .await
942                .map_err(|e| {
943                    tonic::Status::unknown(
944                        format!("Service was not ready: {}", e.into()),
945                    )
946                })?;
947            let codec = tonic::codec::ProstCodec::default();
948            let path = http::uri::PathAndQuery::from_static(
949                "/allwright.engine.v1.EngineService/ContextSession",
950            );
951            let mut req = request.into_streaming_request();
952            req.extensions_mut()
953                .insert(
954                    GrpcMethod::new(
955                        "allwright.engine.v1.EngineService",
956                        "ContextSession",
957                    ),
958                );
959            self.inner.streaming(req, path, codec).await
960        }
961    }
962}
963/// Generated server implementations.
964pub mod engine_service_server {
965    #![allow(
966        unused_variables,
967        dead_code,
968        missing_docs,
969        clippy::wildcard_imports,
970        clippy::let_unit_value,
971    )]
972    use tonic::codegen::*;
973    /// Generated trait containing gRPC methods that should be implemented for use with EngineServiceServer.
974    #[async_trait]
975    pub trait EngineService: std::marker::Send + std::marker::Sync + 'static {
976        async fn ping(
977            &self,
978            request: tonic::Request<super::PingRequest>,
979        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status>;
980        /// Server streaming response type for the SurfaceSession method.
981        type SurfaceSessionStream: tonic::codegen::tokio_stream::Stream<
982                Item = std::result::Result<super::SurfaceSessionEvent, tonic::Status>,
983            >
984            + std::marker::Send
985            + 'static;
986        async fn surface_session(
987            &self,
988            request: tonic::Request<tonic::Streaming<super::SurfaceSessionCommand>>,
989        ) -> std::result::Result<
990            tonic::Response<Self::SurfaceSessionStream>,
991            tonic::Status,
992        >;
993        /// Server streaming response type for the ContextSession method.
994        type ContextSessionStream: tonic::codegen::tokio_stream::Stream<
995                Item = std::result::Result<super::ContextSessionEvent, tonic::Status>,
996            >
997            + std::marker::Send
998            + 'static;
999        async fn context_session(
1000            &self,
1001            request: tonic::Request<tonic::Streaming<super::ContextSessionCommand>>,
1002        ) -> std::result::Result<
1003            tonic::Response<Self::ContextSessionStream>,
1004            tonic::Status,
1005        >;
1006    }
1007    #[derive(Debug)]
1008    pub struct EngineServiceServer<T> {
1009        inner: Arc<T>,
1010        accept_compression_encodings: EnabledCompressionEncodings,
1011        send_compression_encodings: EnabledCompressionEncodings,
1012        max_decoding_message_size: Option<usize>,
1013        max_encoding_message_size: Option<usize>,
1014    }
1015    impl<T> EngineServiceServer<T> {
1016        pub fn new(inner: T) -> Self {
1017            Self::from_arc(Arc::new(inner))
1018        }
1019        pub fn from_arc(inner: Arc<T>) -> Self {
1020            Self {
1021                inner,
1022                accept_compression_encodings: Default::default(),
1023                send_compression_encodings: Default::default(),
1024                max_decoding_message_size: None,
1025                max_encoding_message_size: None,
1026            }
1027        }
1028        pub fn with_interceptor<F>(
1029            inner: T,
1030            interceptor: F,
1031        ) -> InterceptedService<Self, F>
1032        where
1033            F: tonic::service::Interceptor,
1034        {
1035            InterceptedService::new(Self::new(inner), interceptor)
1036        }
1037        /// Enable decompressing requests with the given encoding.
1038        #[must_use]
1039        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1040            self.accept_compression_encodings.enable(encoding);
1041            self
1042        }
1043        /// Compress responses with the given encoding, if the client supports it.
1044        #[must_use]
1045        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1046            self.send_compression_encodings.enable(encoding);
1047            self
1048        }
1049        /// Limits the maximum size of a decoded message.
1050        ///
1051        /// Default: `4MB`
1052        #[must_use]
1053        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1054            self.max_decoding_message_size = Some(limit);
1055            self
1056        }
1057        /// Limits the maximum size of an encoded message.
1058        ///
1059        /// Default: `usize::MAX`
1060        #[must_use]
1061        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1062            self.max_encoding_message_size = Some(limit);
1063            self
1064        }
1065    }
1066    impl<T, B> tonic::codegen::Service<http::Request<B>> for EngineServiceServer<T>
1067    where
1068        T: EngineService,
1069        B: Body + std::marker::Send + 'static,
1070        B::Error: Into<StdError> + std::marker::Send + 'static,
1071    {
1072        type Response = http::Response<tonic::body::BoxBody>;
1073        type Error = std::convert::Infallible;
1074        type Future = BoxFuture<Self::Response, Self::Error>;
1075        fn poll_ready(
1076            &mut self,
1077            _cx: &mut Context<'_>,
1078        ) -> Poll<std::result::Result<(), Self::Error>> {
1079            Poll::Ready(Ok(()))
1080        }
1081        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1082            match req.uri().path() {
1083                "/allwright.engine.v1.EngineService/Ping" => {
1084                    #[allow(non_camel_case_types)]
1085                    struct PingSvc<T: EngineService>(pub Arc<T>);
1086                    impl<
1087                        T: EngineService,
1088                    > tonic::server::UnaryService<super::PingRequest> for PingSvc<T> {
1089                        type Response = super::PingResponse;
1090                        type Future = BoxFuture<
1091                            tonic::Response<Self::Response>,
1092                            tonic::Status,
1093                        >;
1094                        fn call(
1095                            &mut self,
1096                            request: tonic::Request<super::PingRequest>,
1097                        ) -> Self::Future {
1098                            let inner = Arc::clone(&self.0);
1099                            let fut = async move {
1100                                <T as EngineService>::ping(&inner, request).await
1101                            };
1102                            Box::pin(fut)
1103                        }
1104                    }
1105                    let accept_compression_encodings = self.accept_compression_encodings;
1106                    let send_compression_encodings = self.send_compression_encodings;
1107                    let max_decoding_message_size = self.max_decoding_message_size;
1108                    let max_encoding_message_size = self.max_encoding_message_size;
1109                    let inner = self.inner.clone();
1110                    let fut = async move {
1111                        let method = PingSvc(inner);
1112                        let codec = tonic::codec::ProstCodec::default();
1113                        let mut grpc = tonic::server::Grpc::new(codec)
1114                            .apply_compression_config(
1115                                accept_compression_encodings,
1116                                send_compression_encodings,
1117                            )
1118                            .apply_max_message_size_config(
1119                                max_decoding_message_size,
1120                                max_encoding_message_size,
1121                            );
1122                        let res = grpc.unary(method, req).await;
1123                        Ok(res)
1124                    };
1125                    Box::pin(fut)
1126                }
1127                "/allwright.engine.v1.EngineService/SurfaceSession" => {
1128                    #[allow(non_camel_case_types)]
1129                    struct SurfaceSessionSvc<T: EngineService>(pub Arc<T>);
1130                    impl<
1131                        T: EngineService,
1132                    > tonic::server::StreamingService<super::SurfaceSessionCommand>
1133                    for SurfaceSessionSvc<T> {
1134                        type Response = super::SurfaceSessionEvent;
1135                        type ResponseStream = T::SurfaceSessionStream;
1136                        type Future = BoxFuture<
1137                            tonic::Response<Self::ResponseStream>,
1138                            tonic::Status,
1139                        >;
1140                        fn call(
1141                            &mut self,
1142                            request: tonic::Request<
1143                                tonic::Streaming<super::SurfaceSessionCommand>,
1144                            >,
1145                        ) -> Self::Future {
1146                            let inner = Arc::clone(&self.0);
1147                            let fut = async move {
1148                                <T as EngineService>::surface_session(&inner, request).await
1149                            };
1150                            Box::pin(fut)
1151                        }
1152                    }
1153                    let accept_compression_encodings = self.accept_compression_encodings;
1154                    let send_compression_encodings = self.send_compression_encodings;
1155                    let max_decoding_message_size = self.max_decoding_message_size;
1156                    let max_encoding_message_size = self.max_encoding_message_size;
1157                    let inner = self.inner.clone();
1158                    let fut = async move {
1159                        let method = SurfaceSessionSvc(inner);
1160                        let codec = tonic::codec::ProstCodec::default();
1161                        let mut grpc = tonic::server::Grpc::new(codec)
1162                            .apply_compression_config(
1163                                accept_compression_encodings,
1164                                send_compression_encodings,
1165                            )
1166                            .apply_max_message_size_config(
1167                                max_decoding_message_size,
1168                                max_encoding_message_size,
1169                            );
1170                        let res = grpc.streaming(method, req).await;
1171                        Ok(res)
1172                    };
1173                    Box::pin(fut)
1174                }
1175                "/allwright.engine.v1.EngineService/ContextSession" => {
1176                    #[allow(non_camel_case_types)]
1177                    struct ContextSessionSvc<T: EngineService>(pub Arc<T>);
1178                    impl<
1179                        T: EngineService,
1180                    > tonic::server::StreamingService<super::ContextSessionCommand>
1181                    for ContextSessionSvc<T> {
1182                        type Response = super::ContextSessionEvent;
1183                        type ResponseStream = T::ContextSessionStream;
1184                        type Future = BoxFuture<
1185                            tonic::Response<Self::ResponseStream>,
1186                            tonic::Status,
1187                        >;
1188                        fn call(
1189                            &mut self,
1190                            request: tonic::Request<
1191                                tonic::Streaming<super::ContextSessionCommand>,
1192                            >,
1193                        ) -> Self::Future {
1194                            let inner = Arc::clone(&self.0);
1195                            let fut = async move {
1196                                <T as EngineService>::context_session(&inner, request).await
1197                            };
1198                            Box::pin(fut)
1199                        }
1200                    }
1201                    let accept_compression_encodings = self.accept_compression_encodings;
1202                    let send_compression_encodings = self.send_compression_encodings;
1203                    let max_decoding_message_size = self.max_decoding_message_size;
1204                    let max_encoding_message_size = self.max_encoding_message_size;
1205                    let inner = self.inner.clone();
1206                    let fut = async move {
1207                        let method = ContextSessionSvc(inner);
1208                        let codec = tonic::codec::ProstCodec::default();
1209                        let mut grpc = tonic::server::Grpc::new(codec)
1210                            .apply_compression_config(
1211                                accept_compression_encodings,
1212                                send_compression_encodings,
1213                            )
1214                            .apply_max_message_size_config(
1215                                max_decoding_message_size,
1216                                max_encoding_message_size,
1217                            );
1218                        let res = grpc.streaming(method, req).await;
1219                        Ok(res)
1220                    };
1221                    Box::pin(fut)
1222                }
1223                _ => {
1224                    Box::pin(async move {
1225                        let mut response = http::Response::new(empty_body());
1226                        let headers = response.headers_mut();
1227                        headers
1228                            .insert(
1229                                tonic::Status::GRPC_STATUS,
1230                                (tonic::Code::Unimplemented as i32).into(),
1231                            );
1232                        headers
1233                            .insert(
1234                                http::header::CONTENT_TYPE,
1235                                tonic::metadata::GRPC_CONTENT_TYPE,
1236                            );
1237                        Ok(response)
1238                    })
1239                }
1240            }
1241        }
1242    }
1243    impl<T> Clone for EngineServiceServer<T> {
1244        fn clone(&self) -> Self {
1245            let inner = self.inner.clone();
1246            Self {
1247                inner,
1248                accept_compression_encodings: self.accept_compression_encodings,
1249                send_compression_encodings: self.send_compression_encodings,
1250                max_decoding_message_size: self.max_decoding_message_size,
1251                max_encoding_message_size: self.max_encoding_message_size,
1252            }
1253        }
1254    }
1255    /// Generated gRPC service name
1256    pub const SERVICE_NAME: &str = "allwright.engine.v1.EngineService";
1257    impl<T> tonic::server::NamedService for EngineServiceServer<T> {
1258        const NAME: &'static str = SERVICE_NAME;
1259    }
1260}