1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct AuthenticationRequest {
5 #[prost(string, tag = "1")]
6 pub request_id: ::prost::alloc::string::String,
7 #[prost(string, tag = "2")]
8 pub username: ::prost::alloc::string::String,
9 #[prost(string, tag = "3")]
10 pub password: ::prost::alloc::string::String,
11 #[prost(string, tag = "4")]
13 pub provider: ::prost::alloc::string::String,
14}
15#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
16pub struct AuthenticationResponse {
17 #[prost(string, tag = "1")]
18 pub request_id: ::prost::alloc::string::String,
19 #[prost(bool, tag = "2")]
20 pub success: bool,
21 #[prost(string, tag = "3")]
22 pub token: ::prost::alloc::string::String,
23 #[prost(string, tag = "4")]
24 pub error: ::prost::alloc::string::String,
25}
26#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
28pub struct UpdateCheckRequest {
29 #[prost(string, tag = "1")]
30 pub request_id: ::prost::alloc::string::String,
31 #[prost(string, tag = "2")]
32 pub current_version: ::prost::alloc::string::String,
33 #[prost(string, tag = "3")]
35 pub channel: ::prost::alloc::string::String,
36}
37#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
38pub struct UpdateCheckResponse {
39 #[prost(string, tag = "1")]
40 pub request_id: ::prost::alloc::string::String,
41 #[prost(bool, tag = "2")]
42 pub update_available: bool,
43 #[prost(string, tag = "3")]
44 pub version: ::prost::alloc::string::String,
45 #[prost(string, tag = "4")]
46 pub download_url: ::prost::alloc::string::String,
47 #[prost(string, tag = "5")]
48 pub release_notes: ::prost::alloc::string::String,
49 #[prost(string, tag = "6")]
50 pub error: ::prost::alloc::string::String,
51}
52#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
53pub struct ApplyUpdateRequest {
54 #[prost(string, tag = "1")]
55 pub request_id: ::prost::alloc::string::String,
56 #[prost(string, tag = "2")]
57 pub version: ::prost::alloc::string::String,
58 #[prost(string, tag = "3")]
59 pub update_path: ::prost::alloc::string::String,
60}
61#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
62pub struct ApplyUpdateResponse {
63 #[prost(string, tag = "1")]
64 pub request_id: ::prost::alloc::string::String,
65 #[prost(bool, tag = "2")]
66 pub success: bool,
67 #[prost(string, tag = "3")]
68 pub error: ::prost::alloc::string::String,
69}
70#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct DownloadRequest {
73 #[prost(string, tag = "1")]
74 pub request_id: ::prost::alloc::string::String,
75 #[prost(string, tag = "2")]
76 pub url: ::prost::alloc::string::String,
77 #[prost(string, tag = "3")]
78 pub destination_path: ::prost::alloc::string::String,
79 #[prost(string, tag = "4")]
81 pub checksum: ::prost::alloc::string::String,
82 #[prost(map = "string, string", tag = "5")]
83 pub headers: ::std::collections::HashMap<
84 ::prost::alloc::string::String,
85 ::prost::alloc::string::String,
86 >,
87}
88#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
89pub struct DownloadResponse {
90 #[prost(string, tag = "1")]
91 pub request_id: ::prost::alloc::string::String,
92 #[prost(bool, tag = "2")]
93 pub success: bool,
94 #[prost(string, tag = "3")]
95 pub file_path: ::prost::alloc::string::String,
96 #[prost(uint64, tag = "4")]
97 pub file_size: u64,
98 #[prost(string, tag = "5")]
99 pub checksum: ::prost::alloc::string::String,
100 #[prost(string, tag = "6")]
101 pub error: ::prost::alloc::string::String,
102}
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct DownloadStreamRequest {
105 #[prost(string, tag = "1")]
106 pub request_id: ::prost::alloc::string::String,
107 #[prost(string, tag = "2")]
108 pub url: ::prost::alloc::string::String,
109 #[prost(map = "string, string", tag = "3")]
110 pub headers: ::std::collections::HashMap<
111 ::prost::alloc::string::String,
112 ::prost::alloc::string::String,
113 >,
114}
115#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
116pub struct DownloadStreamResponse {
117 #[prost(string, tag = "1")]
118 pub request_id: ::prost::alloc::string::String,
119 #[prost(bytes = "vec", tag = "2")]
120 pub chunk: ::prost::alloc::vec::Vec<u8>,
121 #[prost(uint64, tag = "3")]
122 pub total_size: u64,
123 #[prost(uint64, tag = "4")]
124 pub downloaded: u64,
125 #[prost(bool, tag = "5")]
126 pub completed: bool,
127 #[prost(string, tag = "6")]
128 pub error: ::prost::alloc::string::String,
129}
130#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
132pub struct IndexRequest {
133 #[prost(string, tag = "1")]
134 pub request_id: ::prost::alloc::string::String,
135 #[prost(string, tag = "2")]
136 pub path: ::prost::alloc::string::String,
137 #[prost(string, repeated, tag = "3")]
139 pub patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
140 #[prost(string, repeated, tag = "4")]
142 pub exclude_patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
143 #[prost(uint32, tag = "5")]
144 pub max_depth: u32,
145}
146#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
147pub struct IndexResponse {
148 #[prost(string, tag = "1")]
149 pub request_id: ::prost::alloc::string::String,
150 #[prost(bool, tag = "2")]
151 pub success: bool,
152 #[prost(uint32, tag = "3")]
153 pub files_indexed: u32,
154 #[prost(uint64, tag = "4")]
155 pub total_size: u64,
156 #[prost(string, tag = "5")]
157 pub error: ::prost::alloc::string::String,
158}
159#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
160pub struct SearchRequest {
161 #[prost(string, tag = "1")]
162 pub request_id: ::prost::alloc::string::String,
163 #[prost(string, tag = "2")]
164 pub query: ::prost::alloc::string::String,
165 #[prost(string, tag = "3")]
166 pub path: ::prost::alloc::string::String,
167 #[prost(uint32, tag = "4")]
168 pub max_results: u32,
169}
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct SearchResponse {
172 #[prost(string, tag = "1")]
173 pub request_id: ::prost::alloc::string::String,
174 #[prost(message, repeated, tag = "2")]
175 pub results: ::prost::alloc::vec::Vec<FileResult>,
176 #[prost(uint32, tag = "3")]
177 pub total_results: u32,
178 #[prost(string, tag = "4")]
179 pub error: ::prost::alloc::string::String,
180}
181#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
182pub struct FileResult {
183 #[prost(string, tag = "1")]
184 pub path: ::prost::alloc::string::String,
185 #[prost(uint64, tag = "2")]
186 pub size: u64,
187 #[prost(string, tag = "3")]
188 pub match_preview: ::prost::alloc::string::String,
189 #[prost(uint32, tag = "4")]
190 pub line_number: u32,
191}
192#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
193pub struct FileInfoRequest {
194 #[prost(string, tag = "1")]
195 pub request_id: ::prost::alloc::string::String,
196 #[prost(string, tag = "2")]
197 pub path: ::prost::alloc::string::String,
198}
199#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
200pub struct FileInfoResponse {
201 #[prost(string, tag = "1")]
202 pub request_id: ::prost::alloc::string::String,
203 #[prost(bool, tag = "2")]
204 pub exists: bool,
205 #[prost(uint64, tag = "3")]
206 pub size: u64,
207 #[prost(string, tag = "4")]
208 pub mime_type: ::prost::alloc::string::String,
209 #[prost(string, tag = "5")]
210 pub checksum: ::prost::alloc::string::String,
211 #[prost(uint64, tag = "6")]
212 pub modified_time: u64,
213 #[prost(string, tag = "7")]
214 pub error: ::prost::alloc::string::String,
215}
216#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
218pub struct StatusRequest {
219 #[prost(string, tag = "1")]
220 pub request_id: ::prost::alloc::string::String,
221}
222#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct StatusResponse {
224 #[prost(string, tag = "1")]
225 pub version: ::prost::alloc::string::String,
226 #[prost(uint64, tag = "2")]
227 pub uptime_seconds: u64,
228 #[prost(uint64, tag = "3")]
229 pub total_requests: u64,
230 #[prost(uint64, tag = "4")]
231 pub successful_requests: u64,
232 #[prost(uint64, tag = "5")]
233 pub failed_requests: u64,
234 #[prost(double, tag = "6")]
235 pub average_response_time: f64,
236 #[prost(double, tag = "7")]
237 pub memory_usage_mb: f64,
238 #[prost(double, tag = "8")]
239 pub cpu_usage_percent: f64,
240 #[prost(uint32, tag = "9")]
241 pub active_requests: u32,
242}
243#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
244pub struct HealthCheckRequest {}
245#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
246pub struct HealthCheckResponse {
247 #[prost(bool, tag = "1")]
248 pub healthy: bool,
249 #[prost(uint64, tag = "2")]
250 pub timestamp: u64,
251}
252#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
253pub struct MetricsRequest {
254 #[prost(string, tag = "1")]
255 pub request_id: ::prost::alloc::string::String,
256 #[prost(string, tag = "2")]
258 pub metric_type: ::prost::alloc::string::String,
259}
260#[derive(Clone, PartialEq, ::prost::Message)]
261pub struct MetricsResponse {
262 #[prost(string, tag = "1")]
263 pub request_id: ::prost::alloc::string::String,
264 #[prost(map = "string, string", tag = "2")]
265 pub metrics: ::std::collections::HashMap<
266 ::prost::alloc::string::String,
267 ::prost::alloc::string::String,
268 >,
269 #[prost(string, tag = "3")]
270 pub error: ::prost::alloc::string::String,
271}
272#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
274pub struct ResourceUsageRequest {
275 #[prost(string, tag = "1")]
276 pub request_id: ::prost::alloc::string::String,
277}
278#[derive(Clone, PartialEq, ::prost::Message)]
279pub struct ResourceUsageResponse {
280 #[prost(string, tag = "1")]
281 pub request_id: ::prost::alloc::string::String,
282 #[prost(double, tag = "2")]
283 pub memory_usage_mb: f64,
284 #[prost(double, tag = "3")]
285 pub cpu_usage_percent: f64,
286 #[prost(double, tag = "4")]
287 pub disk_usage_mb: f64,
288 #[prost(double, tag = "5")]
289 pub network_usage_mbps: f64,
290 #[prost(string, tag = "6")]
291 pub error: ::prost::alloc::string::String,
292}
293#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
294pub struct ResourceLimitsRequest {
295 #[prost(string, tag = "1")]
296 pub request_id: ::prost::alloc::string::String,
297 #[prost(uint32, tag = "2")]
298 pub memory_limit_mb: u32,
299 #[prost(uint32, tag = "3")]
300 pub cpu_limit_percent: u32,
301 #[prost(uint32, tag = "4")]
302 pub disk_limit_mb: u32,
303}
304#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
305pub struct ResourceLimitsResponse {
306 #[prost(string, tag = "1")]
307 pub request_id: ::prost::alloc::string::String,
308 #[prost(bool, tag = "2")]
309 pub success: bool,
310 #[prost(string, tag = "3")]
311 pub error: ::prost::alloc::string::String,
312}
313#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
315pub struct ConfigurationRequest {
316 #[prost(string, tag = "1")]
317 pub request_id: ::prost::alloc::string::String,
318 #[prost(string, tag = "2")]
320 pub section: ::prost::alloc::string::String,
321}
322#[derive(Clone, PartialEq, ::prost::Message)]
323pub struct ConfigurationResponse {
324 #[prost(string, tag = "1")]
325 pub request_id: ::prost::alloc::string::String,
326 #[prost(map = "string, string", tag = "2")]
327 pub configuration: ::std::collections::HashMap<
328 ::prost::alloc::string::String,
329 ::prost::alloc::string::String,
330 >,
331 #[prost(string, tag = "3")]
332 pub error: ::prost::alloc::string::String,
333}
334#[derive(Clone, PartialEq, ::prost::Message)]
335pub struct UpdateConfigurationRequest {
336 #[prost(string, tag = "1")]
337 pub request_id: ::prost::alloc::string::String,
338 #[prost(string, tag = "2")]
339 pub section: ::prost::alloc::string::String,
340 #[prost(map = "string, string", tag = "3")]
341 pub updates: ::std::collections::HashMap<
342 ::prost::alloc::string::String,
343 ::prost::alloc::string::String,
344 >,
345}
346#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
347pub struct UpdateConfigurationResponse {
348 #[prost(string, tag = "1")]
349 pub request_id: ::prost::alloc::string::String,
350 #[prost(bool, tag = "2")]
351 pub success: bool,
352 #[prost(string, tag = "3")]
353 pub error: ::prost::alloc::string::String,
354}
355pub mod air_service_client {
357 #![allow(
358 unused_variables,
359 dead_code,
360 missing_docs,
361 clippy::wildcard_imports,
362 clippy::let_unit_value,
363 )]
364 use tonic::codegen::*;
365 use tonic::codegen::http::Uri;
366 #[derive(Debug, Clone)]
368 pub struct AirServiceClient<T> {
369 inner: tonic::client::Grpc<T>,
370 }
371 impl AirServiceClient<tonic::transport::Channel> {
372 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
374 where
375 D: TryInto<tonic::transport::Endpoint>,
376 D::Error: Into<StdError>,
377 {
378 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
379 Ok(Self::new(conn))
380 }
381 }
382 impl<T> AirServiceClient<T>
383 where
384 T: tonic::client::GrpcService<tonic::body::Body>,
385 T::Error: Into<StdError>,
386 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
387 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
388 {
389 pub fn new(inner: T) -> Self {
390 let inner = tonic::client::Grpc::new(inner);
391 Self { inner }
392 }
393 pub fn with_origin(inner: T, origin: Uri) -> Self {
394 let inner = tonic::client::Grpc::with_origin(inner, origin);
395 Self { inner }
396 }
397 pub fn with_interceptor<F>(
398 inner: T,
399 interceptor: F,
400 ) -> AirServiceClient<InterceptedService<T, F>>
401 where
402 F: tonic::service::Interceptor,
403 T::ResponseBody: Default,
404 T: tonic::codegen::Service<
405 http::Request<tonic::body::Body>,
406 Response = http::Response<
407 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
408 >,
409 >,
410 <T as tonic::codegen::Service<
411 http::Request<tonic::body::Body>,
412 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
413 {
414 AirServiceClient::new(InterceptedService::new(inner, interceptor))
415 }
416 #[must_use]
421 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
422 self.inner = self.inner.send_compressed(encoding);
423 self
424 }
425 #[must_use]
427 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
428 self.inner = self.inner.accept_compressed(encoding);
429 self
430 }
431 #[must_use]
435 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
436 self.inner = self.inner.max_decoding_message_size(limit);
437 self
438 }
439 #[must_use]
443 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
444 self.inner = self.inner.max_encoding_message_size(limit);
445 self
446 }
447 pub async fn authenticate(
449 &mut self,
450 request: impl tonic::IntoRequest<super::AuthenticationRequest>,
451 ) -> std::result::Result<
452 tonic::Response<super::AuthenticationResponse>,
453 tonic::Status,
454 > {
455 self.inner
456 .ready()
457 .await
458 .map_err(|e| {
459 tonic::Status::unknown(
460 format!("Service was not ready: {}", e.into()),
461 )
462 })?;
463 let codec = tonic_prost::ProstCodec::default();
464 let path = http::uri::PathAndQuery::from_static(
465 "/Air.AirService/Authenticate",
466 );
467 let mut req = request.into_request();
468 req.extensions_mut()
469 .insert(GrpcMethod::new("Air.AirService", "Authenticate"));
470 self.inner.unary(req, path, codec).await
471 }
472 pub async fn check_for_updates(
474 &mut self,
475 request: impl tonic::IntoRequest<super::UpdateCheckRequest>,
476 ) -> std::result::Result<
477 tonic::Response<super::UpdateCheckResponse>,
478 tonic::Status,
479 > {
480 self.inner
481 .ready()
482 .await
483 .map_err(|e| {
484 tonic::Status::unknown(
485 format!("Service was not ready: {}", e.into()),
486 )
487 })?;
488 let codec = tonic_prost::ProstCodec::default();
489 let path = http::uri::PathAndQuery::from_static(
490 "/Air.AirService/CheckForUpdates",
491 );
492 let mut req = request.into_request();
493 req.extensions_mut()
494 .insert(GrpcMethod::new("Air.AirService", "CheckForUpdates"));
495 self.inner.unary(req, path, codec).await
496 }
497 pub async fn download_update(
498 &mut self,
499 request: impl tonic::IntoRequest<super::DownloadRequest>,
500 ) -> std::result::Result<
501 tonic::Response<super::DownloadResponse>,
502 tonic::Status,
503 > {
504 self.inner
505 .ready()
506 .await
507 .map_err(|e| {
508 tonic::Status::unknown(
509 format!("Service was not ready: {}", e.into()),
510 )
511 })?;
512 let codec = tonic_prost::ProstCodec::default();
513 let path = http::uri::PathAndQuery::from_static(
514 "/Air.AirService/DownloadUpdate",
515 );
516 let mut req = request.into_request();
517 req.extensions_mut()
518 .insert(GrpcMethod::new("Air.AirService", "DownloadUpdate"));
519 self.inner.unary(req, path, codec).await
520 }
521 pub async fn apply_update(
522 &mut self,
523 request: impl tonic::IntoRequest<super::ApplyUpdateRequest>,
524 ) -> std::result::Result<
525 tonic::Response<super::ApplyUpdateResponse>,
526 tonic::Status,
527 > {
528 self.inner
529 .ready()
530 .await
531 .map_err(|e| {
532 tonic::Status::unknown(
533 format!("Service was not ready: {}", e.into()),
534 )
535 })?;
536 let codec = tonic_prost::ProstCodec::default();
537 let path = http::uri::PathAndQuery::from_static(
538 "/Air.AirService/ApplyUpdate",
539 );
540 let mut req = request.into_request();
541 req.extensions_mut()
542 .insert(GrpcMethod::new("Air.AirService", "ApplyUpdate"));
543 self.inner.unary(req, path, codec).await
544 }
545 pub async fn download_file(
547 &mut self,
548 request: impl tonic::IntoRequest<super::DownloadRequest>,
549 ) -> std::result::Result<
550 tonic::Response<super::DownloadResponse>,
551 tonic::Status,
552 > {
553 self.inner
554 .ready()
555 .await
556 .map_err(|e| {
557 tonic::Status::unknown(
558 format!("Service was not ready: {}", e.into()),
559 )
560 })?;
561 let codec = tonic_prost::ProstCodec::default();
562 let path = http::uri::PathAndQuery::from_static(
563 "/Air.AirService/DownloadFile",
564 );
565 let mut req = request.into_request();
566 req.extensions_mut()
567 .insert(GrpcMethod::new("Air.AirService", "DownloadFile"));
568 self.inner.unary(req, path, codec).await
569 }
570 pub async fn download_stream(
571 &mut self,
572 request: impl tonic::IntoRequest<super::DownloadStreamRequest>,
573 ) -> std::result::Result<
574 tonic::Response<tonic::codec::Streaming<super::DownloadStreamResponse>>,
575 tonic::Status,
576 > {
577 self.inner
578 .ready()
579 .await
580 .map_err(|e| {
581 tonic::Status::unknown(
582 format!("Service was not ready: {}", e.into()),
583 )
584 })?;
585 let codec = tonic_prost::ProstCodec::default();
586 let path = http::uri::PathAndQuery::from_static(
587 "/Air.AirService/DownloadStream",
588 );
589 let mut req = request.into_request();
590 req.extensions_mut()
591 .insert(GrpcMethod::new("Air.AirService", "DownloadStream"));
592 self.inner.server_streaming(req, path, codec).await
593 }
594 pub async fn index_files(
596 &mut self,
597 request: impl tonic::IntoRequest<super::IndexRequest>,
598 ) -> std::result::Result<tonic::Response<super::IndexResponse>, tonic::Status> {
599 self.inner
600 .ready()
601 .await
602 .map_err(|e| {
603 tonic::Status::unknown(
604 format!("Service was not ready: {}", e.into()),
605 )
606 })?;
607 let codec = tonic_prost::ProstCodec::default();
608 let path = http::uri::PathAndQuery::from_static(
609 "/Air.AirService/IndexFiles",
610 );
611 let mut req = request.into_request();
612 req.extensions_mut().insert(GrpcMethod::new("Air.AirService", "IndexFiles"));
613 self.inner.unary(req, path, codec).await
614 }
615 pub async fn search_files(
616 &mut self,
617 request: impl tonic::IntoRequest<super::SearchRequest>,
618 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
619 self.inner
620 .ready()
621 .await
622 .map_err(|e| {
623 tonic::Status::unknown(
624 format!("Service was not ready: {}", e.into()),
625 )
626 })?;
627 let codec = tonic_prost::ProstCodec::default();
628 let path = http::uri::PathAndQuery::from_static(
629 "/Air.AirService/SearchFiles",
630 );
631 let mut req = request.into_request();
632 req.extensions_mut()
633 .insert(GrpcMethod::new("Air.AirService", "SearchFiles"));
634 self.inner.unary(req, path, codec).await
635 }
636 pub async fn get_file_info(
637 &mut self,
638 request: impl tonic::IntoRequest<super::FileInfoRequest>,
639 ) -> std::result::Result<
640 tonic::Response<super::FileInfoResponse>,
641 tonic::Status,
642 > {
643 self.inner
644 .ready()
645 .await
646 .map_err(|e| {
647 tonic::Status::unknown(
648 format!("Service was not ready: {}", e.into()),
649 )
650 })?;
651 let codec = tonic_prost::ProstCodec::default();
652 let path = http::uri::PathAndQuery::from_static(
653 "/Air.AirService/GetFileInfo",
654 );
655 let mut req = request.into_request();
656 req.extensions_mut()
657 .insert(GrpcMethod::new("Air.AirService", "GetFileInfo"));
658 self.inner.unary(req, path, codec).await
659 }
660 pub async fn get_status(
662 &mut self,
663 request: impl tonic::IntoRequest<super::StatusRequest>,
664 ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status> {
665 self.inner
666 .ready()
667 .await
668 .map_err(|e| {
669 tonic::Status::unknown(
670 format!("Service was not ready: {}", e.into()),
671 )
672 })?;
673 let codec = tonic_prost::ProstCodec::default();
674 let path = http::uri::PathAndQuery::from_static("/Air.AirService/GetStatus");
675 let mut req = request.into_request();
676 req.extensions_mut().insert(GrpcMethod::new("Air.AirService", "GetStatus"));
677 self.inner.unary(req, path, codec).await
678 }
679 pub async fn health_check(
680 &mut self,
681 request: impl tonic::IntoRequest<super::HealthCheckRequest>,
682 ) -> std::result::Result<
683 tonic::Response<super::HealthCheckResponse>,
684 tonic::Status,
685 > {
686 self.inner
687 .ready()
688 .await
689 .map_err(|e| {
690 tonic::Status::unknown(
691 format!("Service was not ready: {}", e.into()),
692 )
693 })?;
694 let codec = tonic_prost::ProstCodec::default();
695 let path = http::uri::PathAndQuery::from_static(
696 "/Air.AirService/HealthCheck",
697 );
698 let mut req = request.into_request();
699 req.extensions_mut()
700 .insert(GrpcMethod::new("Air.AirService", "HealthCheck"));
701 self.inner.unary(req, path, codec).await
702 }
703 pub async fn get_metrics(
704 &mut self,
705 request: impl tonic::IntoRequest<super::MetricsRequest>,
706 ) -> std::result::Result<
707 tonic::Response<super::MetricsResponse>,
708 tonic::Status,
709 > {
710 self.inner
711 .ready()
712 .await
713 .map_err(|e| {
714 tonic::Status::unknown(
715 format!("Service was not ready: {}", e.into()),
716 )
717 })?;
718 let codec = tonic_prost::ProstCodec::default();
719 let path = http::uri::PathAndQuery::from_static(
720 "/Air.AirService/GetMetrics",
721 );
722 let mut req = request.into_request();
723 req.extensions_mut().insert(GrpcMethod::new("Air.AirService", "GetMetrics"));
724 self.inner.unary(req, path, codec).await
725 }
726 pub async fn get_resource_usage(
728 &mut self,
729 request: impl tonic::IntoRequest<super::ResourceUsageRequest>,
730 ) -> std::result::Result<
731 tonic::Response<super::ResourceUsageResponse>,
732 tonic::Status,
733 > {
734 self.inner
735 .ready()
736 .await
737 .map_err(|e| {
738 tonic::Status::unknown(
739 format!("Service was not ready: {}", e.into()),
740 )
741 })?;
742 let codec = tonic_prost::ProstCodec::default();
743 let path = http::uri::PathAndQuery::from_static(
744 "/Air.AirService/GetResourceUsage",
745 );
746 let mut req = request.into_request();
747 req.extensions_mut()
748 .insert(GrpcMethod::new("Air.AirService", "GetResourceUsage"));
749 self.inner.unary(req, path, codec).await
750 }
751 pub async fn set_resource_limits(
752 &mut self,
753 request: impl tonic::IntoRequest<super::ResourceLimitsRequest>,
754 ) -> std::result::Result<
755 tonic::Response<super::ResourceLimitsResponse>,
756 tonic::Status,
757 > {
758 self.inner
759 .ready()
760 .await
761 .map_err(|e| {
762 tonic::Status::unknown(
763 format!("Service was not ready: {}", e.into()),
764 )
765 })?;
766 let codec = tonic_prost::ProstCodec::default();
767 let path = http::uri::PathAndQuery::from_static(
768 "/Air.AirService/SetResourceLimits",
769 );
770 let mut req = request.into_request();
771 req.extensions_mut()
772 .insert(GrpcMethod::new("Air.AirService", "SetResourceLimits"));
773 self.inner.unary(req, path, codec).await
774 }
775 pub async fn get_configuration(
777 &mut self,
778 request: impl tonic::IntoRequest<super::ConfigurationRequest>,
779 ) -> std::result::Result<
780 tonic::Response<super::ConfigurationResponse>,
781 tonic::Status,
782 > {
783 self.inner
784 .ready()
785 .await
786 .map_err(|e| {
787 tonic::Status::unknown(
788 format!("Service was not ready: {}", e.into()),
789 )
790 })?;
791 let codec = tonic_prost::ProstCodec::default();
792 let path = http::uri::PathAndQuery::from_static(
793 "/Air.AirService/GetConfiguration",
794 );
795 let mut req = request.into_request();
796 req.extensions_mut()
797 .insert(GrpcMethod::new("Air.AirService", "GetConfiguration"));
798 self.inner.unary(req, path, codec).await
799 }
800 pub async fn update_configuration(
801 &mut self,
802 request: impl tonic::IntoRequest<super::UpdateConfigurationRequest>,
803 ) -> std::result::Result<
804 tonic::Response<super::UpdateConfigurationResponse>,
805 tonic::Status,
806 > {
807 self.inner
808 .ready()
809 .await
810 .map_err(|e| {
811 tonic::Status::unknown(
812 format!("Service was not ready: {}", e.into()),
813 )
814 })?;
815 let codec = tonic_prost::ProstCodec::default();
816 let path = http::uri::PathAndQuery::from_static(
817 "/Air.AirService/UpdateConfiguration",
818 );
819 let mut req = request.into_request();
820 req.extensions_mut()
821 .insert(GrpcMethod::new("Air.AirService", "UpdateConfiguration"));
822 self.inner.unary(req, path, codec).await
823 }
824 }
825}
826pub mod air_service_server {
828 #![allow(
829 unused_variables,
830 dead_code,
831 missing_docs,
832 clippy::wildcard_imports,
833 clippy::let_unit_value,
834 )]
835 use tonic::codegen::*;
836 #[async_trait]
838 pub trait AirService: std::marker::Send + std::marker::Sync + 'static {
839 async fn authenticate(
841 &self,
842 request: tonic::Request<super::AuthenticationRequest>,
843 ) -> std::result::Result<
844 tonic::Response<super::AuthenticationResponse>,
845 tonic::Status,
846 >;
847 async fn check_for_updates(
849 &self,
850 request: tonic::Request<super::UpdateCheckRequest>,
851 ) -> std::result::Result<
852 tonic::Response<super::UpdateCheckResponse>,
853 tonic::Status,
854 >;
855 async fn download_update(
856 &self,
857 request: tonic::Request<super::DownloadRequest>,
858 ) -> std::result::Result<
859 tonic::Response<super::DownloadResponse>,
860 tonic::Status,
861 >;
862 async fn apply_update(
863 &self,
864 request: tonic::Request<super::ApplyUpdateRequest>,
865 ) -> std::result::Result<
866 tonic::Response<super::ApplyUpdateResponse>,
867 tonic::Status,
868 >;
869 async fn download_file(
871 &self,
872 request: tonic::Request<super::DownloadRequest>,
873 ) -> std::result::Result<
874 tonic::Response<super::DownloadResponse>,
875 tonic::Status,
876 >;
877 type DownloadStreamStream: tonic::codegen::tokio_stream::Stream<
879 Item = std::result::Result<super::DownloadStreamResponse, tonic::Status>,
880 >
881 + std::marker::Send
882 + 'static;
883 async fn download_stream(
884 &self,
885 request: tonic::Request<super::DownloadStreamRequest>,
886 ) -> std::result::Result<
887 tonic::Response<Self::DownloadStreamStream>,
888 tonic::Status,
889 >;
890 async fn index_files(
892 &self,
893 request: tonic::Request<super::IndexRequest>,
894 ) -> std::result::Result<tonic::Response<super::IndexResponse>, tonic::Status>;
895 async fn search_files(
896 &self,
897 request: tonic::Request<super::SearchRequest>,
898 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
899 async fn get_file_info(
900 &self,
901 request: tonic::Request<super::FileInfoRequest>,
902 ) -> std::result::Result<
903 tonic::Response<super::FileInfoResponse>,
904 tonic::Status,
905 >;
906 async fn get_status(
908 &self,
909 request: tonic::Request<super::StatusRequest>,
910 ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status>;
911 async fn health_check(
912 &self,
913 request: tonic::Request<super::HealthCheckRequest>,
914 ) -> std::result::Result<
915 tonic::Response<super::HealthCheckResponse>,
916 tonic::Status,
917 >;
918 async fn get_metrics(
919 &self,
920 request: tonic::Request<super::MetricsRequest>,
921 ) -> std::result::Result<tonic::Response<super::MetricsResponse>, tonic::Status>;
922 async fn get_resource_usage(
924 &self,
925 request: tonic::Request<super::ResourceUsageRequest>,
926 ) -> std::result::Result<
927 tonic::Response<super::ResourceUsageResponse>,
928 tonic::Status,
929 >;
930 async fn set_resource_limits(
931 &self,
932 request: tonic::Request<super::ResourceLimitsRequest>,
933 ) -> std::result::Result<
934 tonic::Response<super::ResourceLimitsResponse>,
935 tonic::Status,
936 >;
937 async fn get_configuration(
939 &self,
940 request: tonic::Request<super::ConfigurationRequest>,
941 ) -> std::result::Result<
942 tonic::Response<super::ConfigurationResponse>,
943 tonic::Status,
944 >;
945 async fn update_configuration(
946 &self,
947 request: tonic::Request<super::UpdateConfigurationRequest>,
948 ) -> std::result::Result<
949 tonic::Response<super::UpdateConfigurationResponse>,
950 tonic::Status,
951 >;
952 }
953 #[derive(Debug)]
955 pub struct AirServiceServer<T> {
956 inner: Arc<T>,
957 accept_compression_encodings: EnabledCompressionEncodings,
958 send_compression_encodings: EnabledCompressionEncodings,
959 max_decoding_message_size: Option<usize>,
960 max_encoding_message_size: Option<usize>,
961 }
962 impl<T> AirServiceServer<T> {
963 pub fn new(inner: T) -> Self {
964 Self::from_arc(Arc::new(inner))
965 }
966 pub fn from_arc(inner: Arc<T>) -> Self {
967 Self {
968 inner,
969 accept_compression_encodings: Default::default(),
970 send_compression_encodings: Default::default(),
971 max_decoding_message_size: None,
972 max_encoding_message_size: None,
973 }
974 }
975 pub fn with_interceptor<F>(
976 inner: T,
977 interceptor: F,
978 ) -> InterceptedService<Self, F>
979 where
980 F: tonic::service::Interceptor,
981 {
982 InterceptedService::new(Self::new(inner), interceptor)
983 }
984 #[must_use]
986 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
987 self.accept_compression_encodings.enable(encoding);
988 self
989 }
990 #[must_use]
992 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
993 self.send_compression_encodings.enable(encoding);
994 self
995 }
996 #[must_use]
1000 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1001 self.max_decoding_message_size = Some(limit);
1002 self
1003 }
1004 #[must_use]
1008 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1009 self.max_encoding_message_size = Some(limit);
1010 self
1011 }
1012 }
1013 impl<T, B> tonic::codegen::Service<http::Request<B>> for AirServiceServer<T>
1014 where
1015 T: AirService,
1016 B: Body + std::marker::Send + 'static,
1017 B::Error: Into<StdError> + std::marker::Send + 'static,
1018 {
1019 type Response = http::Response<tonic::body::Body>;
1020 type Error = std::convert::Infallible;
1021 type Future = BoxFuture<Self::Response, Self::Error>;
1022 fn poll_ready(
1023 &mut self,
1024 _cx: &mut Context<'_>,
1025 ) -> Poll<std::result::Result<(), Self::Error>> {
1026 Poll::Ready(Ok(()))
1027 }
1028 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1029 match req.uri().path() {
1030 "/Air.AirService/Authenticate" => {
1031 #[allow(non_camel_case_types)]
1032 struct AuthenticateSvc<T: AirService>(pub Arc<T>);
1033 impl<
1034 T: AirService,
1035 > tonic::server::UnaryService<super::AuthenticationRequest>
1036 for AuthenticateSvc<T> {
1037 type Response = super::AuthenticationResponse;
1038 type Future = BoxFuture<
1039 tonic::Response<Self::Response>,
1040 tonic::Status,
1041 >;
1042 fn call(
1043 &mut self,
1044 request: tonic::Request<super::AuthenticationRequest>,
1045 ) -> Self::Future {
1046 let inner = Arc::clone(&self.0);
1047 let fut = async move {
1048 <T as AirService>::authenticate(&inner, request).await
1049 };
1050 Box::pin(fut)
1051 }
1052 }
1053 let accept_compression_encodings = self.accept_compression_encodings;
1054 let send_compression_encodings = self.send_compression_encodings;
1055 let max_decoding_message_size = self.max_decoding_message_size;
1056 let max_encoding_message_size = self.max_encoding_message_size;
1057 let inner = self.inner.clone();
1058 let fut = async move {
1059 let method = AuthenticateSvc(inner);
1060 let codec = tonic_prost::ProstCodec::default();
1061 let mut grpc = tonic::server::Grpc::new(codec)
1062 .apply_compression_config(
1063 accept_compression_encodings,
1064 send_compression_encodings,
1065 )
1066 .apply_max_message_size_config(
1067 max_decoding_message_size,
1068 max_encoding_message_size,
1069 );
1070 let res = grpc.unary(method, req).await;
1071 Ok(res)
1072 };
1073 Box::pin(fut)
1074 }
1075 "/Air.AirService/CheckForUpdates" => {
1076 #[allow(non_camel_case_types)]
1077 struct CheckForUpdatesSvc<T: AirService>(pub Arc<T>);
1078 impl<
1079 T: AirService,
1080 > tonic::server::UnaryService<super::UpdateCheckRequest>
1081 for CheckForUpdatesSvc<T> {
1082 type Response = super::UpdateCheckResponse;
1083 type Future = BoxFuture<
1084 tonic::Response<Self::Response>,
1085 tonic::Status,
1086 >;
1087 fn call(
1088 &mut self,
1089 request: tonic::Request<super::UpdateCheckRequest>,
1090 ) -> Self::Future {
1091 let inner = Arc::clone(&self.0);
1092 let fut = async move {
1093 <T as AirService>::check_for_updates(&inner, request).await
1094 };
1095 Box::pin(fut)
1096 }
1097 }
1098 let accept_compression_encodings = self.accept_compression_encodings;
1099 let send_compression_encodings = self.send_compression_encodings;
1100 let max_decoding_message_size = self.max_decoding_message_size;
1101 let max_encoding_message_size = self.max_encoding_message_size;
1102 let inner = self.inner.clone();
1103 let fut = async move {
1104 let method = CheckForUpdatesSvc(inner);
1105 let codec = tonic_prost::ProstCodec::default();
1106 let mut grpc = tonic::server::Grpc::new(codec)
1107 .apply_compression_config(
1108 accept_compression_encodings,
1109 send_compression_encodings,
1110 )
1111 .apply_max_message_size_config(
1112 max_decoding_message_size,
1113 max_encoding_message_size,
1114 );
1115 let res = grpc.unary(method, req).await;
1116 Ok(res)
1117 };
1118 Box::pin(fut)
1119 }
1120 "/Air.AirService/DownloadUpdate" => {
1121 #[allow(non_camel_case_types)]
1122 struct DownloadUpdateSvc<T: AirService>(pub Arc<T>);
1123 impl<
1124 T: AirService,
1125 > tonic::server::UnaryService<super::DownloadRequest>
1126 for DownloadUpdateSvc<T> {
1127 type Response = super::DownloadResponse;
1128 type Future = BoxFuture<
1129 tonic::Response<Self::Response>,
1130 tonic::Status,
1131 >;
1132 fn call(
1133 &mut self,
1134 request: tonic::Request<super::DownloadRequest>,
1135 ) -> Self::Future {
1136 let inner = Arc::clone(&self.0);
1137 let fut = async move {
1138 <T as AirService>::download_update(&inner, request).await
1139 };
1140 Box::pin(fut)
1141 }
1142 }
1143 let accept_compression_encodings = self.accept_compression_encodings;
1144 let send_compression_encodings = self.send_compression_encodings;
1145 let max_decoding_message_size = self.max_decoding_message_size;
1146 let max_encoding_message_size = self.max_encoding_message_size;
1147 let inner = self.inner.clone();
1148 let fut = async move {
1149 let method = DownloadUpdateSvc(inner);
1150 let codec = tonic_prost::ProstCodec::default();
1151 let mut grpc = tonic::server::Grpc::new(codec)
1152 .apply_compression_config(
1153 accept_compression_encodings,
1154 send_compression_encodings,
1155 )
1156 .apply_max_message_size_config(
1157 max_decoding_message_size,
1158 max_encoding_message_size,
1159 );
1160 let res = grpc.unary(method, req).await;
1161 Ok(res)
1162 };
1163 Box::pin(fut)
1164 }
1165 "/Air.AirService/ApplyUpdate" => {
1166 #[allow(non_camel_case_types)]
1167 struct ApplyUpdateSvc<T: AirService>(pub Arc<T>);
1168 impl<
1169 T: AirService,
1170 > tonic::server::UnaryService<super::ApplyUpdateRequest>
1171 for ApplyUpdateSvc<T> {
1172 type Response = super::ApplyUpdateResponse;
1173 type Future = BoxFuture<
1174 tonic::Response<Self::Response>,
1175 tonic::Status,
1176 >;
1177 fn call(
1178 &mut self,
1179 request: tonic::Request<super::ApplyUpdateRequest>,
1180 ) -> Self::Future {
1181 let inner = Arc::clone(&self.0);
1182 let fut = async move {
1183 <T as AirService>::apply_update(&inner, request).await
1184 };
1185 Box::pin(fut)
1186 }
1187 }
1188 let accept_compression_encodings = self.accept_compression_encodings;
1189 let send_compression_encodings = self.send_compression_encodings;
1190 let max_decoding_message_size = self.max_decoding_message_size;
1191 let max_encoding_message_size = self.max_encoding_message_size;
1192 let inner = self.inner.clone();
1193 let fut = async move {
1194 let method = ApplyUpdateSvc(inner);
1195 let codec = tonic_prost::ProstCodec::default();
1196 let mut grpc = tonic::server::Grpc::new(codec)
1197 .apply_compression_config(
1198 accept_compression_encodings,
1199 send_compression_encodings,
1200 )
1201 .apply_max_message_size_config(
1202 max_decoding_message_size,
1203 max_encoding_message_size,
1204 );
1205 let res = grpc.unary(method, req).await;
1206 Ok(res)
1207 };
1208 Box::pin(fut)
1209 }
1210 "/Air.AirService/DownloadFile" => {
1211 #[allow(non_camel_case_types)]
1212 struct DownloadFileSvc<T: AirService>(pub Arc<T>);
1213 impl<
1214 T: AirService,
1215 > tonic::server::UnaryService<super::DownloadRequest>
1216 for DownloadFileSvc<T> {
1217 type Response = super::DownloadResponse;
1218 type Future = BoxFuture<
1219 tonic::Response<Self::Response>,
1220 tonic::Status,
1221 >;
1222 fn call(
1223 &mut self,
1224 request: tonic::Request<super::DownloadRequest>,
1225 ) -> Self::Future {
1226 let inner = Arc::clone(&self.0);
1227 let fut = async move {
1228 <T as AirService>::download_file(&inner, request).await
1229 };
1230 Box::pin(fut)
1231 }
1232 }
1233 let accept_compression_encodings = self.accept_compression_encodings;
1234 let send_compression_encodings = self.send_compression_encodings;
1235 let max_decoding_message_size = self.max_decoding_message_size;
1236 let max_encoding_message_size = self.max_encoding_message_size;
1237 let inner = self.inner.clone();
1238 let fut = async move {
1239 let method = DownloadFileSvc(inner);
1240 let codec = tonic_prost::ProstCodec::default();
1241 let mut grpc = tonic::server::Grpc::new(codec)
1242 .apply_compression_config(
1243 accept_compression_encodings,
1244 send_compression_encodings,
1245 )
1246 .apply_max_message_size_config(
1247 max_decoding_message_size,
1248 max_encoding_message_size,
1249 );
1250 let res = grpc.unary(method, req).await;
1251 Ok(res)
1252 };
1253 Box::pin(fut)
1254 }
1255 "/Air.AirService/DownloadStream" => {
1256 #[allow(non_camel_case_types)]
1257 struct DownloadStreamSvc<T: AirService>(pub Arc<T>);
1258 impl<
1259 T: AirService,
1260 > tonic::server::ServerStreamingService<super::DownloadStreamRequest>
1261 for DownloadStreamSvc<T> {
1262 type Response = super::DownloadStreamResponse;
1263 type ResponseStream = T::DownloadStreamStream;
1264 type Future = BoxFuture<
1265 tonic::Response<Self::ResponseStream>,
1266 tonic::Status,
1267 >;
1268 fn call(
1269 &mut self,
1270 request: tonic::Request<super::DownloadStreamRequest>,
1271 ) -> Self::Future {
1272 let inner = Arc::clone(&self.0);
1273 let fut = async move {
1274 <T as AirService>::download_stream(&inner, request).await
1275 };
1276 Box::pin(fut)
1277 }
1278 }
1279 let accept_compression_encodings = self.accept_compression_encodings;
1280 let send_compression_encodings = self.send_compression_encodings;
1281 let max_decoding_message_size = self.max_decoding_message_size;
1282 let max_encoding_message_size = self.max_encoding_message_size;
1283 let inner = self.inner.clone();
1284 let fut = async move {
1285 let method = DownloadStreamSvc(inner);
1286 let codec = tonic_prost::ProstCodec::default();
1287 let mut grpc = tonic::server::Grpc::new(codec)
1288 .apply_compression_config(
1289 accept_compression_encodings,
1290 send_compression_encodings,
1291 )
1292 .apply_max_message_size_config(
1293 max_decoding_message_size,
1294 max_encoding_message_size,
1295 );
1296 let res = grpc.server_streaming(method, req).await;
1297 Ok(res)
1298 };
1299 Box::pin(fut)
1300 }
1301 "/Air.AirService/IndexFiles" => {
1302 #[allow(non_camel_case_types)]
1303 struct IndexFilesSvc<T: AirService>(pub Arc<T>);
1304 impl<T: AirService> tonic::server::UnaryService<super::IndexRequest>
1305 for IndexFilesSvc<T> {
1306 type Response = super::IndexResponse;
1307 type Future = BoxFuture<
1308 tonic::Response<Self::Response>,
1309 tonic::Status,
1310 >;
1311 fn call(
1312 &mut self,
1313 request: tonic::Request<super::IndexRequest>,
1314 ) -> Self::Future {
1315 let inner = Arc::clone(&self.0);
1316 let fut = async move {
1317 <T as AirService>::index_files(&inner, request).await
1318 };
1319 Box::pin(fut)
1320 }
1321 }
1322 let accept_compression_encodings = self.accept_compression_encodings;
1323 let send_compression_encodings = self.send_compression_encodings;
1324 let max_decoding_message_size = self.max_decoding_message_size;
1325 let max_encoding_message_size = self.max_encoding_message_size;
1326 let inner = self.inner.clone();
1327 let fut = async move {
1328 let method = IndexFilesSvc(inner);
1329 let codec = tonic_prost::ProstCodec::default();
1330 let mut grpc = tonic::server::Grpc::new(codec)
1331 .apply_compression_config(
1332 accept_compression_encodings,
1333 send_compression_encodings,
1334 )
1335 .apply_max_message_size_config(
1336 max_decoding_message_size,
1337 max_encoding_message_size,
1338 );
1339 let res = grpc.unary(method, req).await;
1340 Ok(res)
1341 };
1342 Box::pin(fut)
1343 }
1344 "/Air.AirService/SearchFiles" => {
1345 #[allow(non_camel_case_types)]
1346 struct SearchFilesSvc<T: AirService>(pub Arc<T>);
1347 impl<T: AirService> tonic::server::UnaryService<super::SearchRequest>
1348 for SearchFilesSvc<T> {
1349 type Response = super::SearchResponse;
1350 type Future = BoxFuture<
1351 tonic::Response<Self::Response>,
1352 tonic::Status,
1353 >;
1354 fn call(
1355 &mut self,
1356 request: tonic::Request<super::SearchRequest>,
1357 ) -> Self::Future {
1358 let inner = Arc::clone(&self.0);
1359 let fut = async move {
1360 <T as AirService>::search_files(&inner, request).await
1361 };
1362 Box::pin(fut)
1363 }
1364 }
1365 let accept_compression_encodings = self.accept_compression_encodings;
1366 let send_compression_encodings = self.send_compression_encodings;
1367 let max_decoding_message_size = self.max_decoding_message_size;
1368 let max_encoding_message_size = self.max_encoding_message_size;
1369 let inner = self.inner.clone();
1370 let fut = async move {
1371 let method = SearchFilesSvc(inner);
1372 let codec = tonic_prost::ProstCodec::default();
1373 let mut grpc = tonic::server::Grpc::new(codec)
1374 .apply_compression_config(
1375 accept_compression_encodings,
1376 send_compression_encodings,
1377 )
1378 .apply_max_message_size_config(
1379 max_decoding_message_size,
1380 max_encoding_message_size,
1381 );
1382 let res = grpc.unary(method, req).await;
1383 Ok(res)
1384 };
1385 Box::pin(fut)
1386 }
1387 "/Air.AirService/GetFileInfo" => {
1388 #[allow(non_camel_case_types)]
1389 struct GetFileInfoSvc<T: AirService>(pub Arc<T>);
1390 impl<
1391 T: AirService,
1392 > tonic::server::UnaryService<super::FileInfoRequest>
1393 for GetFileInfoSvc<T> {
1394 type Response = super::FileInfoResponse;
1395 type Future = BoxFuture<
1396 tonic::Response<Self::Response>,
1397 tonic::Status,
1398 >;
1399 fn call(
1400 &mut self,
1401 request: tonic::Request<super::FileInfoRequest>,
1402 ) -> Self::Future {
1403 let inner = Arc::clone(&self.0);
1404 let fut = async move {
1405 <T as AirService>::get_file_info(&inner, request).await
1406 };
1407 Box::pin(fut)
1408 }
1409 }
1410 let accept_compression_encodings = self.accept_compression_encodings;
1411 let send_compression_encodings = self.send_compression_encodings;
1412 let max_decoding_message_size = self.max_decoding_message_size;
1413 let max_encoding_message_size = self.max_encoding_message_size;
1414 let inner = self.inner.clone();
1415 let fut = async move {
1416 let method = GetFileInfoSvc(inner);
1417 let codec = tonic_prost::ProstCodec::default();
1418 let mut grpc = tonic::server::Grpc::new(codec)
1419 .apply_compression_config(
1420 accept_compression_encodings,
1421 send_compression_encodings,
1422 )
1423 .apply_max_message_size_config(
1424 max_decoding_message_size,
1425 max_encoding_message_size,
1426 );
1427 let res = grpc.unary(method, req).await;
1428 Ok(res)
1429 };
1430 Box::pin(fut)
1431 }
1432 "/Air.AirService/GetStatus" => {
1433 #[allow(non_camel_case_types)]
1434 struct GetStatusSvc<T: AirService>(pub Arc<T>);
1435 impl<T: AirService> tonic::server::UnaryService<super::StatusRequest>
1436 for GetStatusSvc<T> {
1437 type Response = super::StatusResponse;
1438 type Future = BoxFuture<
1439 tonic::Response<Self::Response>,
1440 tonic::Status,
1441 >;
1442 fn call(
1443 &mut self,
1444 request: tonic::Request<super::StatusRequest>,
1445 ) -> Self::Future {
1446 let inner = Arc::clone(&self.0);
1447 let fut = async move {
1448 <T as AirService>::get_status(&inner, request).await
1449 };
1450 Box::pin(fut)
1451 }
1452 }
1453 let accept_compression_encodings = self.accept_compression_encodings;
1454 let send_compression_encodings = self.send_compression_encodings;
1455 let max_decoding_message_size = self.max_decoding_message_size;
1456 let max_encoding_message_size = self.max_encoding_message_size;
1457 let inner = self.inner.clone();
1458 let fut = async move {
1459 let method = GetStatusSvc(inner);
1460 let codec = tonic_prost::ProstCodec::default();
1461 let mut grpc = tonic::server::Grpc::new(codec)
1462 .apply_compression_config(
1463 accept_compression_encodings,
1464 send_compression_encodings,
1465 )
1466 .apply_max_message_size_config(
1467 max_decoding_message_size,
1468 max_encoding_message_size,
1469 );
1470 let res = grpc.unary(method, req).await;
1471 Ok(res)
1472 };
1473 Box::pin(fut)
1474 }
1475 "/Air.AirService/HealthCheck" => {
1476 #[allow(non_camel_case_types)]
1477 struct HealthCheckSvc<T: AirService>(pub Arc<T>);
1478 impl<
1479 T: AirService,
1480 > tonic::server::UnaryService<super::HealthCheckRequest>
1481 for HealthCheckSvc<T> {
1482 type Response = super::HealthCheckResponse;
1483 type Future = BoxFuture<
1484 tonic::Response<Self::Response>,
1485 tonic::Status,
1486 >;
1487 fn call(
1488 &mut self,
1489 request: tonic::Request<super::HealthCheckRequest>,
1490 ) -> Self::Future {
1491 let inner = Arc::clone(&self.0);
1492 let fut = async move {
1493 <T as AirService>::health_check(&inner, request).await
1494 };
1495 Box::pin(fut)
1496 }
1497 }
1498 let accept_compression_encodings = self.accept_compression_encodings;
1499 let send_compression_encodings = self.send_compression_encodings;
1500 let max_decoding_message_size = self.max_decoding_message_size;
1501 let max_encoding_message_size = self.max_encoding_message_size;
1502 let inner = self.inner.clone();
1503 let fut = async move {
1504 let method = HealthCheckSvc(inner);
1505 let codec = tonic_prost::ProstCodec::default();
1506 let mut grpc = tonic::server::Grpc::new(codec)
1507 .apply_compression_config(
1508 accept_compression_encodings,
1509 send_compression_encodings,
1510 )
1511 .apply_max_message_size_config(
1512 max_decoding_message_size,
1513 max_encoding_message_size,
1514 );
1515 let res = grpc.unary(method, req).await;
1516 Ok(res)
1517 };
1518 Box::pin(fut)
1519 }
1520 "/Air.AirService/GetMetrics" => {
1521 #[allow(non_camel_case_types)]
1522 struct GetMetricsSvc<T: AirService>(pub Arc<T>);
1523 impl<
1524 T: AirService,
1525 > tonic::server::UnaryService<super::MetricsRequest>
1526 for GetMetricsSvc<T> {
1527 type Response = super::MetricsResponse;
1528 type Future = BoxFuture<
1529 tonic::Response<Self::Response>,
1530 tonic::Status,
1531 >;
1532 fn call(
1533 &mut self,
1534 request: tonic::Request<super::MetricsRequest>,
1535 ) -> Self::Future {
1536 let inner = Arc::clone(&self.0);
1537 let fut = async move {
1538 <T as AirService>::get_metrics(&inner, request).await
1539 };
1540 Box::pin(fut)
1541 }
1542 }
1543 let accept_compression_encodings = self.accept_compression_encodings;
1544 let send_compression_encodings = self.send_compression_encodings;
1545 let max_decoding_message_size = self.max_decoding_message_size;
1546 let max_encoding_message_size = self.max_encoding_message_size;
1547 let inner = self.inner.clone();
1548 let fut = async move {
1549 let method = GetMetricsSvc(inner);
1550 let codec = tonic_prost::ProstCodec::default();
1551 let mut grpc = tonic::server::Grpc::new(codec)
1552 .apply_compression_config(
1553 accept_compression_encodings,
1554 send_compression_encodings,
1555 )
1556 .apply_max_message_size_config(
1557 max_decoding_message_size,
1558 max_encoding_message_size,
1559 );
1560 let res = grpc.unary(method, req).await;
1561 Ok(res)
1562 };
1563 Box::pin(fut)
1564 }
1565 "/Air.AirService/GetResourceUsage" => {
1566 #[allow(non_camel_case_types)]
1567 struct GetResourceUsageSvc<T: AirService>(pub Arc<T>);
1568 impl<
1569 T: AirService,
1570 > tonic::server::UnaryService<super::ResourceUsageRequest>
1571 for GetResourceUsageSvc<T> {
1572 type Response = super::ResourceUsageResponse;
1573 type Future = BoxFuture<
1574 tonic::Response<Self::Response>,
1575 tonic::Status,
1576 >;
1577 fn call(
1578 &mut self,
1579 request: tonic::Request<super::ResourceUsageRequest>,
1580 ) -> Self::Future {
1581 let inner = Arc::clone(&self.0);
1582 let fut = async move {
1583 <T as AirService>::get_resource_usage(&inner, request).await
1584 };
1585 Box::pin(fut)
1586 }
1587 }
1588 let accept_compression_encodings = self.accept_compression_encodings;
1589 let send_compression_encodings = self.send_compression_encodings;
1590 let max_decoding_message_size = self.max_decoding_message_size;
1591 let max_encoding_message_size = self.max_encoding_message_size;
1592 let inner = self.inner.clone();
1593 let fut = async move {
1594 let method = GetResourceUsageSvc(inner);
1595 let codec = tonic_prost::ProstCodec::default();
1596 let mut grpc = tonic::server::Grpc::new(codec)
1597 .apply_compression_config(
1598 accept_compression_encodings,
1599 send_compression_encodings,
1600 )
1601 .apply_max_message_size_config(
1602 max_decoding_message_size,
1603 max_encoding_message_size,
1604 );
1605 let res = grpc.unary(method, req).await;
1606 Ok(res)
1607 };
1608 Box::pin(fut)
1609 }
1610 "/Air.AirService/SetResourceLimits" => {
1611 #[allow(non_camel_case_types)]
1612 struct SetResourceLimitsSvc<T: AirService>(pub Arc<T>);
1613 impl<
1614 T: AirService,
1615 > tonic::server::UnaryService<super::ResourceLimitsRequest>
1616 for SetResourceLimitsSvc<T> {
1617 type Response = super::ResourceLimitsResponse;
1618 type Future = BoxFuture<
1619 tonic::Response<Self::Response>,
1620 tonic::Status,
1621 >;
1622 fn call(
1623 &mut self,
1624 request: tonic::Request<super::ResourceLimitsRequest>,
1625 ) -> Self::Future {
1626 let inner = Arc::clone(&self.0);
1627 let fut = async move {
1628 <T as AirService>::set_resource_limits(&inner, request)
1629 .await
1630 };
1631 Box::pin(fut)
1632 }
1633 }
1634 let accept_compression_encodings = self.accept_compression_encodings;
1635 let send_compression_encodings = self.send_compression_encodings;
1636 let max_decoding_message_size = self.max_decoding_message_size;
1637 let max_encoding_message_size = self.max_encoding_message_size;
1638 let inner = self.inner.clone();
1639 let fut = async move {
1640 let method = SetResourceLimitsSvc(inner);
1641 let codec = tonic_prost::ProstCodec::default();
1642 let mut grpc = tonic::server::Grpc::new(codec)
1643 .apply_compression_config(
1644 accept_compression_encodings,
1645 send_compression_encodings,
1646 )
1647 .apply_max_message_size_config(
1648 max_decoding_message_size,
1649 max_encoding_message_size,
1650 );
1651 let res = grpc.unary(method, req).await;
1652 Ok(res)
1653 };
1654 Box::pin(fut)
1655 }
1656 "/Air.AirService/GetConfiguration" => {
1657 #[allow(non_camel_case_types)]
1658 struct GetConfigurationSvc<T: AirService>(pub Arc<T>);
1659 impl<
1660 T: AirService,
1661 > tonic::server::UnaryService<super::ConfigurationRequest>
1662 for GetConfigurationSvc<T> {
1663 type Response = super::ConfigurationResponse;
1664 type Future = BoxFuture<
1665 tonic::Response<Self::Response>,
1666 tonic::Status,
1667 >;
1668 fn call(
1669 &mut self,
1670 request: tonic::Request<super::ConfigurationRequest>,
1671 ) -> Self::Future {
1672 let inner = Arc::clone(&self.0);
1673 let fut = async move {
1674 <T as AirService>::get_configuration(&inner, request).await
1675 };
1676 Box::pin(fut)
1677 }
1678 }
1679 let accept_compression_encodings = self.accept_compression_encodings;
1680 let send_compression_encodings = self.send_compression_encodings;
1681 let max_decoding_message_size = self.max_decoding_message_size;
1682 let max_encoding_message_size = self.max_encoding_message_size;
1683 let inner = self.inner.clone();
1684 let fut = async move {
1685 let method = GetConfigurationSvc(inner);
1686 let codec = tonic_prost::ProstCodec::default();
1687 let mut grpc = tonic::server::Grpc::new(codec)
1688 .apply_compression_config(
1689 accept_compression_encodings,
1690 send_compression_encodings,
1691 )
1692 .apply_max_message_size_config(
1693 max_decoding_message_size,
1694 max_encoding_message_size,
1695 );
1696 let res = grpc.unary(method, req).await;
1697 Ok(res)
1698 };
1699 Box::pin(fut)
1700 }
1701 "/Air.AirService/UpdateConfiguration" => {
1702 #[allow(non_camel_case_types)]
1703 struct UpdateConfigurationSvc<T: AirService>(pub Arc<T>);
1704 impl<
1705 T: AirService,
1706 > tonic::server::UnaryService<super::UpdateConfigurationRequest>
1707 for UpdateConfigurationSvc<T> {
1708 type Response = super::UpdateConfigurationResponse;
1709 type Future = BoxFuture<
1710 tonic::Response<Self::Response>,
1711 tonic::Status,
1712 >;
1713 fn call(
1714 &mut self,
1715 request: tonic::Request<super::UpdateConfigurationRequest>,
1716 ) -> Self::Future {
1717 let inner = Arc::clone(&self.0);
1718 let fut = async move {
1719 <T as AirService>::update_configuration(&inner, request)
1720 .await
1721 };
1722 Box::pin(fut)
1723 }
1724 }
1725 let accept_compression_encodings = self.accept_compression_encodings;
1726 let send_compression_encodings = self.send_compression_encodings;
1727 let max_decoding_message_size = self.max_decoding_message_size;
1728 let max_encoding_message_size = self.max_encoding_message_size;
1729 let inner = self.inner.clone();
1730 let fut = async move {
1731 let method = UpdateConfigurationSvc(inner);
1732 let codec = tonic_prost::ProstCodec::default();
1733 let mut grpc = tonic::server::Grpc::new(codec)
1734 .apply_compression_config(
1735 accept_compression_encodings,
1736 send_compression_encodings,
1737 )
1738 .apply_max_message_size_config(
1739 max_decoding_message_size,
1740 max_encoding_message_size,
1741 );
1742 let res = grpc.unary(method, req).await;
1743 Ok(res)
1744 };
1745 Box::pin(fut)
1746 }
1747 _ => {
1748 Box::pin(async move {
1749 let mut response = http::Response::new(
1750 tonic::body::Body::default(),
1751 );
1752 let headers = response.headers_mut();
1753 headers
1754 .insert(
1755 tonic::Status::GRPC_STATUS,
1756 (tonic::Code::Unimplemented as i32).into(),
1757 );
1758 headers
1759 .insert(
1760 http::header::CONTENT_TYPE,
1761 tonic::metadata::GRPC_CONTENT_TYPE,
1762 );
1763 Ok(response)
1764 })
1765 }
1766 }
1767 }
1768 }
1769 impl<T> Clone for AirServiceServer<T> {
1770 fn clone(&self) -> Self {
1771 let inner = self.inner.clone();
1772 Self {
1773 inner,
1774 accept_compression_encodings: self.accept_compression_encodings,
1775 send_compression_encodings: self.send_compression_encodings,
1776 max_decoding_message_size: self.max_decoding_message_size,
1777 max_encoding_message_size: self.max_encoding_message_size,
1778 }
1779 }
1780 }
1781 pub const SERVICE_NAME: &str = "Air.AirService";
1783 impl<T> tonic::server::NamedService for AirServiceServer<T> {
1784 const NAME: &'static str = SERVICE_NAME;
1785 }
1786}