1#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct JobMatchSummary {
7 #[prost(string, tag = "1")]
8 pub job_id: ::prost::alloc::string::String,
9 #[prost(int32, tag = "2")]
10 pub total_resumes: i32,
11 #[prost(int32, tag = "3")]
12 pub matched_resumes: i32,
13 #[prost(double, tag = "4")]
14 pub average_score: f64,
15 #[prost(message, repeated, tag = "5")]
17 pub top_matches: ::prost::alloc::vec::Vec<super::job::MatchResult>,
18}
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct ProfileMatchSummary {
21 #[prost(string, tag = "1")]
22 pub profile_id: ::prost::alloc::string::String,
23 #[prost(int32, tag = "2")]
24 pub total_candidates: i32,
25 #[prost(int32, tag = "3")]
26 pub matched_profiles: i32,
27 #[prost(double, tag = "4")]
28 pub average_score: f64,
29 #[prost(message, repeated, tag = "5")]
30 pub top_matches: ::prost::alloc::vec::Vec<super::profile::ProfileMatchResult>,
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct ProductMatchSummary {
34 #[prost(string, tag = "1")]
35 pub product_id: ::prost::alloc::string::String,
36 #[prost(int32, tag = "2")]
37 pub total_candidates: i32,
38 #[prost(int32, tag = "3")]
39 pub matched_products: i32,
40 #[prost(double, tag = "4")]
41 pub average_score: f64,
42 #[prost(message, repeated, tag = "5")]
43 pub top_matches: ::prost::alloc::vec::Vec<super::product::ProductMatchResult>,
44}
45#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct GetJobDashboardRequest {
50 #[prost(string, repeated, tag = "1")]
52 pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
53}
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct GetJobDashboardResponse {
56 #[prost(message, repeated, tag = "1")]
57 pub summaries: ::prost::alloc::vec::Vec<JobMatchSummary>,
58 #[prost(message, optional, tag = "2")]
59 pub error: ::core::option::Option<super::common::Error>,
60}
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct GetProfileDashboardRequest {
63 #[prost(string, repeated, tag = "1")]
64 pub profile_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
65}
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct GetProfileDashboardResponse {
68 #[prost(message, repeated, tag = "1")]
69 pub summaries: ::prost::alloc::vec::Vec<ProfileMatchSummary>,
70 #[prost(message, optional, tag = "2")]
71 pub error: ::core::option::Option<super::common::Error>,
72}
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct GetProductDashboardRequest {
75 #[prost(string, repeated, tag = "1")]
76 pub product_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
77}
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct GetProductDashboardResponse {
80 #[prost(message, repeated, tag = "1")]
81 pub summaries: ::prost::alloc::vec::Vec<ProductMatchSummary>,
82 #[prost(message, optional, tag = "2")]
83 pub error: ::core::option::Option<super::common::Error>,
84}
85pub mod dashboard_service_client {
87 #![allow(
88 unused_variables,
89 dead_code,
90 missing_docs,
91 clippy::wildcard_imports,
92 clippy::let_unit_value,
93 )]
94 use tonic::codegen::*;
95 use tonic::codegen::http::Uri;
96 #[derive(Debug, Clone)]
100 pub struct DashboardServiceClient<T> {
101 inner: tonic::client::Grpc<T>,
102 }
103 impl DashboardServiceClient<tonic::transport::Channel> {
104 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
106 where
107 D: TryInto<tonic::transport::Endpoint>,
108 D::Error: Into<StdError>,
109 {
110 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
111 Ok(Self::new(conn))
112 }
113 }
114 impl<T> DashboardServiceClient<T>
115 where
116 T: tonic::client::GrpcService<tonic::body::Body>,
117 T::Error: Into<StdError>,
118 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
119 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
120 {
121 pub fn new(inner: T) -> Self {
122 let inner = tonic::client::Grpc::new(inner);
123 Self { inner }
124 }
125 pub fn with_origin(inner: T, origin: Uri) -> Self {
126 let inner = tonic::client::Grpc::with_origin(inner, origin);
127 Self { inner }
128 }
129 pub fn with_interceptor<F>(
130 inner: T,
131 interceptor: F,
132 ) -> DashboardServiceClient<InterceptedService<T, F>>
133 where
134 F: tonic::service::Interceptor,
135 T::ResponseBody: Default,
136 T: tonic::codegen::Service<
137 http::Request<tonic::body::Body>,
138 Response = http::Response<
139 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
140 >,
141 >,
142 <T as tonic::codegen::Service<
143 http::Request<tonic::body::Body>,
144 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
145 {
146 DashboardServiceClient::new(InterceptedService::new(inner, interceptor))
147 }
148 #[must_use]
153 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
154 self.inner = self.inner.send_compressed(encoding);
155 self
156 }
157 #[must_use]
159 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
160 self.inner = self.inner.accept_compressed(encoding);
161 self
162 }
163 #[must_use]
167 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
168 self.inner = self.inner.max_decoding_message_size(limit);
169 self
170 }
171 #[must_use]
175 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
176 self.inner = self.inner.max_encoding_message_size(limit);
177 self
178 }
179 pub async fn get_job_dashboard(
180 &mut self,
181 request: impl tonic::IntoRequest<super::GetJobDashboardRequest>,
182 ) -> std::result::Result<
183 tonic::Response<super::GetJobDashboardResponse>,
184 tonic::Status,
185 > {
186 self.inner
187 .ready()
188 .await
189 .map_err(|e| {
190 tonic::Status::unknown(
191 format!("Service was not ready: {}", e.into()),
192 )
193 })?;
194 let codec = tonic::codec::ProstCodec::default();
195 let path = http::uri::PathAndQuery::from_static(
196 "/aiscanned.v1.dashboard.DashboardService/GetJobDashboard",
197 );
198 let mut req = request.into_request();
199 req.extensions_mut()
200 .insert(
201 GrpcMethod::new(
202 "aiscanned.v1.dashboard.DashboardService",
203 "GetJobDashboard",
204 ),
205 );
206 self.inner.unary(req, path, codec).await
207 }
208 pub async fn get_profile_dashboard(
209 &mut self,
210 request: impl tonic::IntoRequest<super::GetProfileDashboardRequest>,
211 ) -> std::result::Result<
212 tonic::Response<super::GetProfileDashboardResponse>,
213 tonic::Status,
214 > {
215 self.inner
216 .ready()
217 .await
218 .map_err(|e| {
219 tonic::Status::unknown(
220 format!("Service was not ready: {}", e.into()),
221 )
222 })?;
223 let codec = tonic::codec::ProstCodec::default();
224 let path = http::uri::PathAndQuery::from_static(
225 "/aiscanned.v1.dashboard.DashboardService/GetProfileDashboard",
226 );
227 let mut req = request.into_request();
228 req.extensions_mut()
229 .insert(
230 GrpcMethod::new(
231 "aiscanned.v1.dashboard.DashboardService",
232 "GetProfileDashboard",
233 ),
234 );
235 self.inner.unary(req, path, codec).await
236 }
237 pub async fn get_product_dashboard(
238 &mut self,
239 request: impl tonic::IntoRequest<super::GetProductDashboardRequest>,
240 ) -> std::result::Result<
241 tonic::Response<super::GetProductDashboardResponse>,
242 tonic::Status,
243 > {
244 self.inner
245 .ready()
246 .await
247 .map_err(|e| {
248 tonic::Status::unknown(
249 format!("Service was not ready: {}", e.into()),
250 )
251 })?;
252 let codec = tonic::codec::ProstCodec::default();
253 let path = http::uri::PathAndQuery::from_static(
254 "/aiscanned.v1.dashboard.DashboardService/GetProductDashboard",
255 );
256 let mut req = request.into_request();
257 req.extensions_mut()
258 .insert(
259 GrpcMethod::new(
260 "aiscanned.v1.dashboard.DashboardService",
261 "GetProductDashboard",
262 ),
263 );
264 self.inner.unary(req, path, codec).await
265 }
266 }
267}
268pub mod dashboard_service_server {
270 #![allow(
271 unused_variables,
272 dead_code,
273 missing_docs,
274 clippy::wildcard_imports,
275 clippy::let_unit_value,
276 )]
277 use tonic::codegen::*;
278 #[async_trait]
280 pub trait DashboardService: std::marker::Send + std::marker::Sync + 'static {
281 async fn get_job_dashboard(
282 &self,
283 request: tonic::Request<super::GetJobDashboardRequest>,
284 ) -> std::result::Result<
285 tonic::Response<super::GetJobDashboardResponse>,
286 tonic::Status,
287 >;
288 async fn get_profile_dashboard(
289 &self,
290 request: tonic::Request<super::GetProfileDashboardRequest>,
291 ) -> std::result::Result<
292 tonic::Response<super::GetProfileDashboardResponse>,
293 tonic::Status,
294 >;
295 async fn get_product_dashboard(
296 &self,
297 request: tonic::Request<super::GetProductDashboardRequest>,
298 ) -> std::result::Result<
299 tonic::Response<super::GetProductDashboardResponse>,
300 tonic::Status,
301 >;
302 }
303 #[derive(Debug)]
307 pub struct DashboardServiceServer<T> {
308 inner: Arc<T>,
309 accept_compression_encodings: EnabledCompressionEncodings,
310 send_compression_encodings: EnabledCompressionEncodings,
311 max_decoding_message_size: Option<usize>,
312 max_encoding_message_size: Option<usize>,
313 }
314 impl<T> DashboardServiceServer<T> {
315 pub fn new(inner: T) -> Self {
316 Self::from_arc(Arc::new(inner))
317 }
318 pub fn from_arc(inner: Arc<T>) -> Self {
319 Self {
320 inner,
321 accept_compression_encodings: Default::default(),
322 send_compression_encodings: Default::default(),
323 max_decoding_message_size: None,
324 max_encoding_message_size: None,
325 }
326 }
327 pub fn with_interceptor<F>(
328 inner: T,
329 interceptor: F,
330 ) -> InterceptedService<Self, F>
331 where
332 F: tonic::service::Interceptor,
333 {
334 InterceptedService::new(Self::new(inner), interceptor)
335 }
336 #[must_use]
338 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
339 self.accept_compression_encodings.enable(encoding);
340 self
341 }
342 #[must_use]
344 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
345 self.send_compression_encodings.enable(encoding);
346 self
347 }
348 #[must_use]
352 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
353 self.max_decoding_message_size = Some(limit);
354 self
355 }
356 #[must_use]
360 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
361 self.max_encoding_message_size = Some(limit);
362 self
363 }
364 }
365 impl<T, B> tonic::codegen::Service<http::Request<B>> for DashboardServiceServer<T>
366 where
367 T: DashboardService,
368 B: Body + std::marker::Send + 'static,
369 B::Error: Into<StdError> + std::marker::Send + 'static,
370 {
371 type Response = http::Response<tonic::body::Body>;
372 type Error = std::convert::Infallible;
373 type Future = BoxFuture<Self::Response, Self::Error>;
374 fn poll_ready(
375 &mut self,
376 _cx: &mut Context<'_>,
377 ) -> Poll<std::result::Result<(), Self::Error>> {
378 Poll::Ready(Ok(()))
379 }
380 fn call(&mut self, req: http::Request<B>) -> Self::Future {
381 match req.uri().path() {
382 "/aiscanned.v1.dashboard.DashboardService/GetJobDashboard" => {
383 #[allow(non_camel_case_types)]
384 struct GetJobDashboardSvc<T: DashboardService>(pub Arc<T>);
385 impl<
386 T: DashboardService,
387 > tonic::server::UnaryService<super::GetJobDashboardRequest>
388 for GetJobDashboardSvc<T> {
389 type Response = super::GetJobDashboardResponse;
390 type Future = BoxFuture<
391 tonic::Response<Self::Response>,
392 tonic::Status,
393 >;
394 fn call(
395 &mut self,
396 request: tonic::Request<super::GetJobDashboardRequest>,
397 ) -> Self::Future {
398 let inner = Arc::clone(&self.0);
399 let fut = async move {
400 <T as DashboardService>::get_job_dashboard(&inner, request)
401 .await
402 };
403 Box::pin(fut)
404 }
405 }
406 let accept_compression_encodings = self.accept_compression_encodings;
407 let send_compression_encodings = self.send_compression_encodings;
408 let max_decoding_message_size = self.max_decoding_message_size;
409 let max_encoding_message_size = self.max_encoding_message_size;
410 let inner = self.inner.clone();
411 let fut = async move {
412 let method = GetJobDashboardSvc(inner);
413 let codec = tonic::codec::ProstCodec::default();
414 let mut grpc = tonic::server::Grpc::new(codec)
415 .apply_compression_config(
416 accept_compression_encodings,
417 send_compression_encodings,
418 )
419 .apply_max_message_size_config(
420 max_decoding_message_size,
421 max_encoding_message_size,
422 );
423 let res = grpc.unary(method, req).await;
424 Ok(res)
425 };
426 Box::pin(fut)
427 }
428 "/aiscanned.v1.dashboard.DashboardService/GetProfileDashboard" => {
429 #[allow(non_camel_case_types)]
430 struct GetProfileDashboardSvc<T: DashboardService>(pub Arc<T>);
431 impl<
432 T: DashboardService,
433 > tonic::server::UnaryService<super::GetProfileDashboardRequest>
434 for GetProfileDashboardSvc<T> {
435 type Response = super::GetProfileDashboardResponse;
436 type Future = BoxFuture<
437 tonic::Response<Self::Response>,
438 tonic::Status,
439 >;
440 fn call(
441 &mut self,
442 request: tonic::Request<super::GetProfileDashboardRequest>,
443 ) -> Self::Future {
444 let inner = Arc::clone(&self.0);
445 let fut = async move {
446 <T as DashboardService>::get_profile_dashboard(
447 &inner,
448 request,
449 )
450 .await
451 };
452 Box::pin(fut)
453 }
454 }
455 let accept_compression_encodings = self.accept_compression_encodings;
456 let send_compression_encodings = self.send_compression_encodings;
457 let max_decoding_message_size = self.max_decoding_message_size;
458 let max_encoding_message_size = self.max_encoding_message_size;
459 let inner = self.inner.clone();
460 let fut = async move {
461 let method = GetProfileDashboardSvc(inner);
462 let codec = tonic::codec::ProstCodec::default();
463 let mut grpc = tonic::server::Grpc::new(codec)
464 .apply_compression_config(
465 accept_compression_encodings,
466 send_compression_encodings,
467 )
468 .apply_max_message_size_config(
469 max_decoding_message_size,
470 max_encoding_message_size,
471 );
472 let res = grpc.unary(method, req).await;
473 Ok(res)
474 };
475 Box::pin(fut)
476 }
477 "/aiscanned.v1.dashboard.DashboardService/GetProductDashboard" => {
478 #[allow(non_camel_case_types)]
479 struct GetProductDashboardSvc<T: DashboardService>(pub Arc<T>);
480 impl<
481 T: DashboardService,
482 > tonic::server::UnaryService<super::GetProductDashboardRequest>
483 for GetProductDashboardSvc<T> {
484 type Response = super::GetProductDashboardResponse;
485 type Future = BoxFuture<
486 tonic::Response<Self::Response>,
487 tonic::Status,
488 >;
489 fn call(
490 &mut self,
491 request: tonic::Request<super::GetProductDashboardRequest>,
492 ) -> Self::Future {
493 let inner = Arc::clone(&self.0);
494 let fut = async move {
495 <T as DashboardService>::get_product_dashboard(
496 &inner,
497 request,
498 )
499 .await
500 };
501 Box::pin(fut)
502 }
503 }
504 let accept_compression_encodings = self.accept_compression_encodings;
505 let send_compression_encodings = self.send_compression_encodings;
506 let max_decoding_message_size = self.max_decoding_message_size;
507 let max_encoding_message_size = self.max_encoding_message_size;
508 let inner = self.inner.clone();
509 let fut = async move {
510 let method = GetProductDashboardSvc(inner);
511 let codec = tonic::codec::ProstCodec::default();
512 let mut grpc = tonic::server::Grpc::new(codec)
513 .apply_compression_config(
514 accept_compression_encodings,
515 send_compression_encodings,
516 )
517 .apply_max_message_size_config(
518 max_decoding_message_size,
519 max_encoding_message_size,
520 );
521 let res = grpc.unary(method, req).await;
522 Ok(res)
523 };
524 Box::pin(fut)
525 }
526 _ => {
527 Box::pin(async move {
528 let mut response = http::Response::new(
529 tonic::body::Body::default(),
530 );
531 let headers = response.headers_mut();
532 headers
533 .insert(
534 tonic::Status::GRPC_STATUS,
535 (tonic::Code::Unimplemented as i32).into(),
536 );
537 headers
538 .insert(
539 http::header::CONTENT_TYPE,
540 tonic::metadata::GRPC_CONTENT_TYPE,
541 );
542 Ok(response)
543 })
544 }
545 }
546 }
547 }
548 impl<T> Clone for DashboardServiceServer<T> {
549 fn clone(&self) -> Self {
550 let inner = self.inner.clone();
551 Self {
552 inner,
553 accept_compression_encodings: self.accept_compression_encodings,
554 send_compression_encodings: self.send_compression_encodings,
555 max_decoding_message_size: self.max_decoding_message_size,
556 max_encoding_message_size: self.max_encoding_message_size,
557 }
558 }
559 }
560 pub const SERVICE_NAME: &str = "aiscanned.v1.dashboard.DashboardService";
562 impl<T> tonic::server::NamedService for DashboardServiceServer<T> {
563 const NAME: &'static str = SERVICE_NAME;
564 }
565}