nullnet_libdatastore/
datastore.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct UpsertRequest {
4    #[prost(message, optional, tag = "1")]
5    pub body: ::core::option::Option<UpsertBody>,
6    #[prost(message, optional, tag = "2")]
7    pub params: ::core::option::Option<Params>,
8    #[prost(message, optional, tag = "3")]
9    pub query: ::core::option::Option<Query>,
10}
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct UpsertBody {
13    #[prost(string, tag = "1")]
14    pub data: ::prost::alloc::string::String,
15    #[prost(string, repeated, tag = "3")]
16    pub conflict_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
17}
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct GetByIdRequest {
20    #[prost(message, optional, tag = "1")]
21    pub params: ::core::option::Option<Params>,
22    #[prost(message, optional, tag = "2")]
23    pub query: ::core::option::Option<Query>,
24}
25#[derive(Clone, PartialEq, ::prost::Message)]
26pub struct GetByFilterRequest {
27    #[prost(message, optional, tag = "1")]
28    pub body: ::core::option::Option<GetByFilterBody>,
29    #[prost(message, optional, tag = "2")]
30    pub params: ::core::option::Option<Params>,
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct GetByFilterBody {
34    #[prost(string, repeated, tag = "1")]
35    pub pluck: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
36    #[prost(message, repeated, tag = "2")]
37    pub advance_filters: ::prost::alloc::vec::Vec<AdvanceFilter>,
38    #[prost(string, tag = "3")]
39    pub order_by: ::prost::alloc::string::String,
40    #[prost(int32, tag = "4")]
41    pub limit: i32,
42    #[prost(int32, tag = "5")]
43    pub offset: i32,
44    #[prost(string, tag = "6")]
45    pub order_direction: ::prost::alloc::string::String,
46    #[prost(message, repeated, tag = "7")]
47    pub joins: ::prost::alloc::vec::Vec<Join>,
48    #[prost(message, repeated, tag = "8")]
49    pub multiple_sort: ::prost::alloc::vec::Vec<MultipleSort>,
50    #[prost(map = "string, string", tag = "9")]
51    pub pluck_object: ::std::collections::HashMap<
52        ::prost::alloc::string::String,
53        ::prost::alloc::string::String,
54    >,
55    #[prost(string, tag = "10")]
56    pub date_format: ::prost::alloc::string::String,
57    #[prost(bool, tag = "11")]
58    pub is_case_sensitive_sorting: bool,
59}
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct AdvanceFilter {
62    #[prost(string, tag = "1")]
63    pub r#type: ::prost::alloc::string::String,
64    #[prost(string, tag = "2")]
65    pub field: ::prost::alloc::string::String,
66    #[prost(string, tag = "3")]
67    pub operator: ::prost::alloc::string::String,
68    #[prost(string, tag = "4")]
69    pub entity: ::prost::alloc::string::String,
70    #[prost(string, tag = "5")]
71    pub values: ::prost::alloc::string::String,
72}
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct Value {
75    #[prost(oneof = "value::Value", tags = "1, 2")]
76    pub value: ::core::option::Option<value::Value>,
77}
78/// Nested message and enum types in `Value`.
79pub mod value {
80    #[derive(Clone, PartialEq, ::prost::Oneof)]
81    pub enum Value {
82        #[prost(string, tag = "1")]
83        StringValue(::prost::alloc::string::String),
84        #[prost(int32, tag = "2")]
85        IntValue(i32),
86    }
87}
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct MultipleSort {
90    #[prost(string, tag = "1")]
91    pub by_field: ::prost::alloc::string::String,
92    #[prost(string, tag = "2")]
93    pub by_direction: ::prost::alloc::string::String,
94    #[prost(bool, tag = "3")]
95    pub is_case_sensitive_sorting: bool,
96}
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct Join {
99    #[prost(string, tag = "1")]
100    pub r#type: ::prost::alloc::string::String,
101    #[prost(message, optional, tag = "2")]
102    pub field_relation: ::core::option::Option<FieldRelation>,
103}
104#[derive(Clone, PartialEq, ::prost::Message)]
105pub struct FieldRelation {
106    #[prost(message, optional, tag = "1")]
107    pub to: ::core::option::Option<EntityFieldTo>,
108    #[prost(message, optional, tag = "2")]
109    pub from: ::core::option::Option<EntityFieldFrom>,
110}
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct EntityFieldTo {
113    #[prost(string, tag = "1")]
114    pub entity: ::prost::alloc::string::String,
115    #[prost(string, tag = "2")]
116    pub field: ::prost::alloc::string::String,
117    #[prost(string, tag = "3")]
118    pub alias: ::prost::alloc::string::String,
119    #[prost(int32, tag = "4")]
120    pub limit: i32,
121    #[prost(string, tag = "5")]
122    pub order_by: ::prost::alloc::string::String,
123    #[prost(message, repeated, tag = "6")]
124    pub filters: ::prost::alloc::vec::Vec<AdvanceFilter>,
125}
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct EntityFieldFrom {
128    #[prost(string, tag = "1")]
129    pub entity: ::prost::alloc::string::String,
130    #[prost(string, tag = "2")]
131    pub field: ::prost::alloc::string::String,
132}
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct AggregateRequest {
135    #[prost(message, optional, tag = "1")]
136    pub body: ::core::option::Option<AggregateBody>,
137    #[prost(message, optional, tag = "2")]
138    pub params: ::core::option::Option<Params>,
139}
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct AggregateBody {
142    #[prost(message, repeated, tag = "1")]
143    pub aggregations: ::prost::alloc::vec::Vec<Aggregation>,
144    #[prost(message, repeated, tag = "2")]
145    pub advance_filters: ::prost::alloc::vec::Vec<AdvanceFilter>,
146    #[prost(string, tag = "3")]
147    pub entity: ::prost::alloc::string::String,
148    #[prost(string, tag = "4")]
149    pub bucket_size: ::prost::alloc::string::String,
150    #[prost(message, optional, tag = "5")]
151    pub order: ::core::option::Option<Order>,
152    #[prost(message, repeated, tag = "6")]
153    pub joins: ::prost::alloc::vec::Vec<Join>,
154}
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct Aggregation {
157    #[prost(string, tag = "1")]
158    pub aggregation: ::prost::alloc::string::String,
159    #[prost(string, tag = "2")]
160    pub aggregate_on: ::prost::alloc::string::String,
161    #[prost(string, tag = "3")]
162    pub bucket_name: ::prost::alloc::string::String,
163}
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct Order {
166    #[prost(string, tag = "1")]
167    pub order_by: ::prost::alloc::string::String,
168    #[prost(string, tag = "2")]
169    pub order_direction: ::prost::alloc::string::String,
170}
171#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct UpdateRequest {
173    #[prost(message, optional, tag = "1")]
174    pub params: ::core::option::Option<Params>,
175    #[prost(message, optional, tag = "2")]
176    pub query: ::core::option::Option<Query>,
177    #[prost(string, tag = "3")]
178    pub body: ::prost::alloc::string::String,
179}
180#[derive(Clone, PartialEq, ::prost::Message)]
181pub struct DeleteRequest {
182    #[prost(message, optional, tag = "1")]
183    pub params: ::core::option::Option<Params>,
184    #[prost(message, optional, tag = "2")]
185    pub query: ::core::option::Option<DeleteQuery>,
186}
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct DeleteQuery {
189    #[prost(string, tag = "1")]
190    pub is_permanent: ::prost::alloc::string::String,
191}
192#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct CreateRequest {
194    #[prost(message, optional, tag = "1")]
195    pub params: ::core::option::Option<CreateParams>,
196    #[prost(message, optional, tag = "2")]
197    pub query: ::core::option::Option<Query>,
198    #[prost(message, optional, tag = "3")]
199    pub body: ::core::option::Option<CreateBody>,
200}
201#[derive(Clone, PartialEq, ::prost::Message)]
202pub struct CreateBody {
203    #[prost(string, tag = "1")]
204    pub record: ::prost::alloc::string::String,
205}
206/// BATCH CREATE
207#[derive(Clone, PartialEq, ::prost::Message)]
208pub struct BatchCreateRequest {
209    #[prost(message, optional, tag = "1")]
210    pub params: ::core::option::Option<CreateParams>,
211    #[prost(message, optional, tag = "2")]
212    pub query: ::core::option::Option<Query>,
213    #[prost(message, optional, tag = "3")]
214    pub body: ::core::option::Option<BatchCreateBody>,
215}
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct BatchCreateBody {
218    #[prost(string, tag = "1")]
219    pub records: ::prost::alloc::string::String,
220}
221/// BATCH UPDATE
222#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct BatchUpdateRequest {
224    #[prost(message, optional, tag = "1")]
225    pub params: ::core::option::Option<Params>,
226    #[prost(message, optional, tag = "3")]
227    pub body: ::core::option::Option<BatchUpdateBody>,
228}
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct BatchUpdateBody {
231    #[prost(message, repeated, tag = "1")]
232    pub advance_filters: ::prost::alloc::vec::Vec<AdvanceFilter>,
233    #[prost(string, tag = "2")]
234    pub updates: ::prost::alloc::string::String,
235}
236/// BATCH DELETE
237#[derive(Clone, PartialEq, ::prost::Message)]
238pub struct BatchDeleteRequest {
239    #[prost(message, optional, tag = "1")]
240    pub params: ::core::option::Option<Params>,
241    #[prost(message, optional, tag = "3")]
242    pub body: ::core::option::Option<BatchDeleteBody>,
243}
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct BatchDeleteBody {
246    #[prost(message, repeated, tag = "1")]
247    pub advance_filters: ::prost::alloc::vec::Vec<AdvanceFilter>,
248}
249#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct CreateParams {
251    #[prost(string, tag = "1")]
252    pub table: ::prost::alloc::string::String,
253}
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct LoginRequest {
256    #[prost(message, optional, tag = "1")]
257    pub body: ::core::option::Option<LoginBody>,
258    #[prost(message, optional, tag = "2")]
259    pub params: ::core::option::Option<LoginParams>,
260}
261#[derive(Clone, PartialEq, ::prost::Message)]
262pub struct LoginParams {
263    #[prost(string, tag = "1")]
264    pub is_root: ::prost::alloc::string::String,
265    #[prost(string, tag = "2")]
266    pub t: ::prost::alloc::string::String,
267}
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct LoginBody {
270    #[prost(message, optional, tag = "1")]
271    pub data: ::core::option::Option<LoginData>,
272}
273#[derive(Clone, PartialEq, ::prost::Message)]
274pub struct LoginData {
275    #[prost(string, tag = "1")]
276    pub account_id: ::prost::alloc::string::String,
277    #[prost(string, tag = "2")]
278    pub account_secret: ::prost::alloc::string::String,
279}
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct Query {
282    #[prost(string, tag = "1")]
283    pub pluck: ::prost::alloc::string::String,
284    #[prost(string, tag = "2")]
285    pub durability: ::prost::alloc::string::String,
286}
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct Params {
289    #[prost(string, tag = "1")]
290    pub id: ::prost::alloc::string::String,
291    #[prost(string, tag = "2")]
292    pub table: ::prost::alloc::string::String,
293    #[prost(string, tag = "3")]
294    pub r#type: ::prost::alloc::string::String,
295}
296#[derive(Clone, PartialEq, ::prost::Message)]
297pub struct LoginResponse {
298    #[prost(string, tag = "1")]
299    pub token: ::prost::alloc::string::String,
300}
301#[derive(Clone, PartialEq, ::prost::Message)]
302pub struct Response {
303    #[prost(bool, tag = "1")]
304    pub success: bool,
305    #[prost(string, tag = "2")]
306    pub message: ::prost::alloc::string::String,
307    #[prost(string, tag = "3")]
308    pub error: ::prost::alloc::string::String,
309    #[prost(string, tag = "4")]
310    pub status_code: ::prost::alloc::string::String,
311    #[prost(int32, tag = "5")]
312    pub count: i32,
313    #[prost(string, tag = "6")]
314    pub encoding: ::prost::alloc::string::String,
315    #[prost(string, tag = "7")]
316    pub data: ::prost::alloc::string::String,
317}
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct RegisterResponse {
320    #[prost(string, tag = "1")]
321    pub organization_id: ::prost::alloc::string::String,
322    #[prost(string, tag = "2")]
323    pub account_organization_id: ::prost::alloc::string::String,
324    #[prost(string, tag = "3")]
325    pub account_id: ::prost::alloc::string::String,
326    #[prost(string, tag = "4")]
327    pub email: ::prost::alloc::string::String,
328    #[prost(string, tag = "5")]
329    pub contact_id: ::prost::alloc::string::String,
330    #[prost(string, tag = "6")]
331    pub device_id: ::prost::alloc::string::String,
332    #[prost(string, tag = "7")]
333    pub device_code: ::prost::alloc::string::String,
334}
335#[derive(Clone, PartialEq, ::prost::Message)]
336pub struct RegisterRequest {
337    #[prost(message, optional, tag = "1")]
338    pub body: ::core::option::Option<RegisterParams>,
339    #[prost(bool, tag = "2")]
340    pub is_request: bool,
341}
342#[derive(Clone, PartialEq, ::prost::Message)]
343pub struct RegisterParams {
344    /// To be deprecated
345    #[prost(string, tag = "1")]
346    pub id: ::prost::alloc::string::String,
347    #[prost(string, tag = "2")]
348    pub name: ::prost::alloc::string::String,
349    #[prost(string, tag = "3")]
350    pub contact_id: ::prost::alloc::string::String,
351    #[prost(string, tag = "4")]
352    pub email: ::prost::alloc::string::String,
353    #[prost(string, tag = "5")]
354    pub password: ::prost::alloc::string::String,
355    #[prost(string, tag = "6")]
356    pub parent_organization_id: ::prost::alloc::string::String,
357    #[prost(string, tag = "7")]
358    pub code: ::prost::alloc::string::String,
359    #[prost(string, repeated, tag = "8")]
360    pub categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
361    #[prost(string, tag = "9")]
362    pub account_status: ::prost::alloc::string::String,
363    #[prost(enumeration = "AccountType", tag = "10")]
364    pub account_type: i32,
365    #[prost(string, tag = "11")]
366    pub organization_name: ::prost::alloc::string::String,
367    #[prost(string, tag = "12")]
368    pub organization_id: ::prost::alloc::string::String,
369    #[prost(string, tag = "13")]
370    pub account_id: ::prost::alloc::string::String,
371    #[prost(string, tag = "14")]
372    pub account_secret: ::prost::alloc::string::String,
373    #[prost(bool, tag = "15")]
374    pub is_new_user: bool,
375    #[prost(string, tag = "16")]
376    pub first_name: ::prost::alloc::string::String,
377    #[prost(string, tag = "17")]
378    pub last_name: ::prost::alloc::string::String,
379    #[prost(bool, tag = "18")]
380    pub is_invited: bool,
381    #[prost(string, tag = "19")]
382    pub role_id: ::prost::alloc::string::String,
383    #[prost(string, tag = "20")]
384    pub account_organization_status: ::prost::alloc::string::String,
385    #[prost(string, repeated, tag = "21")]
386    pub account_organization_categories: ::prost::alloc::vec::Vec<
387        ::prost::alloc::string::String,
388    >,
389    #[prost(string, tag = "22")]
390    pub account_organization_id: ::prost::alloc::string::String,
391    #[prost(string, repeated, tag = "23")]
392    pub contact_categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
393    #[prost(string, repeated, tag = "24")]
394    pub device_categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
395    #[prost(string, tag = "25")]
396    pub responsible_account_organization_id: ::prost::alloc::string::String,
397}
398#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
399#[repr(i32)]
400pub enum AccountType {
401    Contact = 0,
402    Device = 1,
403}
404impl AccountType {
405    /// String value of the enum field names used in the ProtoBuf definition.
406    ///
407    /// The values are not transformed in any way and thus are considered stable
408    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
409    pub fn as_str_name(&self) -> &'static str {
410        match self {
411            Self::Contact => "CONTACT",
412            Self::Device => "DEVICE",
413        }
414    }
415    /// Creates an enum from field names used in the ProtoBuf definition.
416    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
417        match value {
418            "CONTACT" => Some(Self::Contact),
419            "DEVICE" => Some(Self::Device),
420            _ => None,
421        }
422    }
423}
424/// Generated client implementations.
425pub mod store_service_client {
426    #![allow(
427        unused_variables,
428        dead_code,
429        missing_docs,
430        clippy::wildcard_imports,
431        clippy::let_unit_value,
432    )]
433    use tonic::codegen::*;
434    use tonic::codegen::http::Uri;
435    #[derive(Debug, Clone)]
436    pub struct StoreServiceClient<T> {
437        inner: tonic::client::Grpc<T>,
438    }
439    impl StoreServiceClient<tonic::transport::Channel> {
440        /// Attempt to create a new client by connecting to a given endpoint.
441        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
442        where
443            D: TryInto<tonic::transport::Endpoint>,
444            D::Error: Into<StdError>,
445        {
446            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
447            Ok(Self::new(conn))
448        }
449    }
450    impl<T> StoreServiceClient<T>
451    where
452        T: tonic::client::GrpcService<tonic::body::BoxBody>,
453        T::Error: Into<StdError>,
454        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
455        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
456    {
457        pub fn new(inner: T) -> Self {
458            let inner = tonic::client::Grpc::new(inner);
459            Self { inner }
460        }
461        pub fn with_origin(inner: T, origin: Uri) -> Self {
462            let inner = tonic::client::Grpc::with_origin(inner, origin);
463            Self { inner }
464        }
465        pub fn with_interceptor<F>(
466            inner: T,
467            interceptor: F,
468        ) -> StoreServiceClient<InterceptedService<T, F>>
469        where
470            F: tonic::service::Interceptor,
471            T::ResponseBody: Default,
472            T: tonic::codegen::Service<
473                http::Request<tonic::body::BoxBody>,
474                Response = http::Response<
475                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
476                >,
477            >,
478            <T as tonic::codegen::Service<
479                http::Request<tonic::body::BoxBody>,
480            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
481        {
482            StoreServiceClient::new(InterceptedService::new(inner, interceptor))
483        }
484        /// Compress requests with the given encoding.
485        ///
486        /// This requires the server to support it otherwise it might respond with an
487        /// error.
488        #[must_use]
489        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
490            self.inner = self.inner.send_compressed(encoding);
491            self
492        }
493        /// Enable decompressing responses.
494        #[must_use]
495        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
496            self.inner = self.inner.accept_compressed(encoding);
497            self
498        }
499        /// Limits the maximum size of a decoded message.
500        ///
501        /// Default: `4MB`
502        #[must_use]
503        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
504            self.inner = self.inner.max_decoding_message_size(limit);
505            self
506        }
507        /// Limits the maximum size of an encoded message.
508        ///
509        /// Default: `usize::MAX`
510        #[must_use]
511        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
512            self.inner = self.inner.max_encoding_message_size(limit);
513            self
514        }
515        pub async fn get_by_id(
516            &mut self,
517            request: impl tonic::IntoRequest<super::GetByIdRequest>,
518        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
519            self.inner
520                .ready()
521                .await
522                .map_err(|e| {
523                    tonic::Status::unknown(
524                        format!("Service was not ready: {}", e.into()),
525                    )
526                })?;
527            let codec = tonic::codec::ProstCodec::default();
528            let path = http::uri::PathAndQuery::from_static(
529                "/datastore.StoreService/GetById",
530            );
531            let mut req = request.into_request();
532            req.extensions_mut()
533                .insert(GrpcMethod::new("datastore.StoreService", "GetById"));
534            self.inner.unary(req, path, codec).await
535        }
536        pub async fn aggregate(
537            &mut self,
538            request: impl tonic::IntoRequest<super::AggregateRequest>,
539        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
540            self.inner
541                .ready()
542                .await
543                .map_err(|e| {
544                    tonic::Status::unknown(
545                        format!("Service was not ready: {}", e.into()),
546                    )
547                })?;
548            let codec = tonic::codec::ProstCodec::default();
549            let path = http::uri::PathAndQuery::from_static(
550                "/datastore.StoreService/Aggregate",
551            );
552            let mut req = request.into_request();
553            req.extensions_mut()
554                .insert(GrpcMethod::new("datastore.StoreService", "Aggregate"));
555            self.inner.unary(req, path, codec).await
556        }
557        pub async fn get_by_filter(
558            &mut self,
559            request: impl tonic::IntoRequest<super::GetByFilterRequest>,
560        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
561            self.inner
562                .ready()
563                .await
564                .map_err(|e| {
565                    tonic::Status::unknown(
566                        format!("Service was not ready: {}", e.into()),
567                    )
568                })?;
569            let codec = tonic::codec::ProstCodec::default();
570            let path = http::uri::PathAndQuery::from_static(
571                "/datastore.StoreService/GetByFilter",
572            );
573            let mut req = request.into_request();
574            req.extensions_mut()
575                .insert(GrpcMethod::new("datastore.StoreService", "GetByFilter"));
576            self.inner.unary(req, path, codec).await
577        }
578        pub async fn update(
579            &mut self,
580            request: impl tonic::IntoRequest<super::UpdateRequest>,
581        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
582            self.inner
583                .ready()
584                .await
585                .map_err(|e| {
586                    tonic::Status::unknown(
587                        format!("Service was not ready: {}", e.into()),
588                    )
589                })?;
590            let codec = tonic::codec::ProstCodec::default();
591            let path = http::uri::PathAndQuery::from_static(
592                "/datastore.StoreService/Update",
593            );
594            let mut req = request.into_request();
595            req.extensions_mut()
596                .insert(GrpcMethod::new("datastore.StoreService", "Update"));
597            self.inner.unary(req, path, codec).await
598        }
599        pub async fn delete(
600            &mut self,
601            request: impl tonic::IntoRequest<super::DeleteRequest>,
602        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
603            self.inner
604                .ready()
605                .await
606                .map_err(|e| {
607                    tonic::Status::unknown(
608                        format!("Service was not ready: {}", e.into()),
609                    )
610                })?;
611            let codec = tonic::codec::ProstCodec::default();
612            let path = http::uri::PathAndQuery::from_static(
613                "/datastore.StoreService/Delete",
614            );
615            let mut req = request.into_request();
616            req.extensions_mut()
617                .insert(GrpcMethod::new("datastore.StoreService", "Delete"));
618            self.inner.unary(req, path, codec).await
619        }
620        pub async fn create(
621            &mut self,
622            request: impl tonic::IntoRequest<super::CreateRequest>,
623        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
624            self.inner
625                .ready()
626                .await
627                .map_err(|e| {
628                    tonic::Status::unknown(
629                        format!("Service was not ready: {}", e.into()),
630                    )
631                })?;
632            let codec = tonic::codec::ProstCodec::default();
633            let path = http::uri::PathAndQuery::from_static(
634                "/datastore.StoreService/Create",
635            );
636            let mut req = request.into_request();
637            req.extensions_mut()
638                .insert(GrpcMethod::new("datastore.StoreService", "Create"));
639            self.inner.unary(req, path, codec).await
640        }
641        pub async fn batch_create(
642            &mut self,
643            request: impl tonic::IntoRequest<super::BatchCreateRequest>,
644        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
645            self.inner
646                .ready()
647                .await
648                .map_err(|e| {
649                    tonic::Status::unknown(
650                        format!("Service was not ready: {}", e.into()),
651                    )
652                })?;
653            let codec = tonic::codec::ProstCodec::default();
654            let path = http::uri::PathAndQuery::from_static(
655                "/datastore.StoreService/BatchCreate",
656            );
657            let mut req = request.into_request();
658            req.extensions_mut()
659                .insert(GrpcMethod::new("datastore.StoreService", "BatchCreate"));
660            self.inner.unary(req, path, codec).await
661        }
662        pub async fn batch_update(
663            &mut self,
664            request: impl tonic::IntoRequest<super::BatchUpdateRequest>,
665        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
666            self.inner
667                .ready()
668                .await
669                .map_err(|e| {
670                    tonic::Status::unknown(
671                        format!("Service was not ready: {}", e.into()),
672                    )
673                })?;
674            let codec = tonic::codec::ProstCodec::default();
675            let path = http::uri::PathAndQuery::from_static(
676                "/datastore.StoreService/BatchUpdate",
677            );
678            let mut req = request.into_request();
679            req.extensions_mut()
680                .insert(GrpcMethod::new("datastore.StoreService", "BatchUpdate"));
681            self.inner.unary(req, path, codec).await
682        }
683        pub async fn batch_delete(
684            &mut self,
685            request: impl tonic::IntoRequest<super::BatchDeleteRequest>,
686        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
687            self.inner
688                .ready()
689                .await
690                .map_err(|e| {
691                    tonic::Status::unknown(
692                        format!("Service was not ready: {}", e.into()),
693                    )
694                })?;
695            let codec = tonic::codec::ProstCodec::default();
696            let path = http::uri::PathAndQuery::from_static(
697                "/datastore.StoreService/BatchDelete",
698            );
699            let mut req = request.into_request();
700            req.extensions_mut()
701                .insert(GrpcMethod::new("datastore.StoreService", "BatchDelete"));
702            self.inner.unary(req, path, codec).await
703        }
704        pub async fn login(
705            &mut self,
706            request: impl tonic::IntoRequest<super::LoginRequest>,
707        ) -> std::result::Result<tonic::Response<super::LoginResponse>, tonic::Status> {
708            self.inner
709                .ready()
710                .await
711                .map_err(|e| {
712                    tonic::Status::unknown(
713                        format!("Service was not ready: {}", e.into()),
714                    )
715                })?;
716            let codec = tonic::codec::ProstCodec::default();
717            let path = http::uri::PathAndQuery::from_static(
718                "/datastore.StoreService/Login",
719            );
720            let mut req = request.into_request();
721            req.extensions_mut()
722                .insert(GrpcMethod::new("datastore.StoreService", "Login"));
723            self.inner.unary(req, path, codec).await
724        }
725        pub async fn upsert(
726            &mut self,
727            request: impl tonic::IntoRequest<super::UpsertRequest>,
728        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status> {
729            self.inner
730                .ready()
731                .await
732                .map_err(|e| {
733                    tonic::Status::unknown(
734                        format!("Service was not ready: {}", e.into()),
735                    )
736                })?;
737            let codec = tonic::codec::ProstCodec::default();
738            let path = http::uri::PathAndQuery::from_static(
739                "/datastore.StoreService/Upsert",
740            );
741            let mut req = request.into_request();
742            req.extensions_mut()
743                .insert(GrpcMethod::new("datastore.StoreService", "Upsert"));
744            self.inner.unary(req, path, codec).await
745        }
746        pub async fn register(
747            &mut self,
748            request: impl tonic::IntoRequest<super::RegisterRequest>,
749        ) -> std::result::Result<
750            tonic::Response<super::RegisterResponse>,
751            tonic::Status,
752        > {
753            self.inner
754                .ready()
755                .await
756                .map_err(|e| {
757                    tonic::Status::unknown(
758                        format!("Service was not ready: {}", e.into()),
759                    )
760                })?;
761            let codec = tonic::codec::ProstCodec::default();
762            let path = http::uri::PathAndQuery::from_static(
763                "/datastore.StoreService/Register",
764            );
765            let mut req = request.into_request();
766            req.extensions_mut()
767                .insert(GrpcMethod::new("datastore.StoreService", "Register"));
768            self.inner.unary(req, path, codec).await
769        }
770    }
771}
772/// Generated server implementations.
773pub mod store_service_server {
774    #![allow(
775        unused_variables,
776        dead_code,
777        missing_docs,
778        clippy::wildcard_imports,
779        clippy::let_unit_value,
780    )]
781    use tonic::codegen::*;
782    /// Generated trait containing gRPC methods that should be implemented for use with StoreServiceServer.
783    #[async_trait]
784    pub trait StoreService: std::marker::Send + std::marker::Sync + 'static {
785        async fn get_by_id(
786            &self,
787            request: tonic::Request<super::GetByIdRequest>,
788        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
789        async fn aggregate(
790            &self,
791            request: tonic::Request<super::AggregateRequest>,
792        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
793        async fn get_by_filter(
794            &self,
795            request: tonic::Request<super::GetByFilterRequest>,
796        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
797        async fn update(
798            &self,
799            request: tonic::Request<super::UpdateRequest>,
800        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
801        async fn delete(
802            &self,
803            request: tonic::Request<super::DeleteRequest>,
804        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
805        async fn create(
806            &self,
807            request: tonic::Request<super::CreateRequest>,
808        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
809        async fn batch_create(
810            &self,
811            request: tonic::Request<super::BatchCreateRequest>,
812        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
813        async fn batch_update(
814            &self,
815            request: tonic::Request<super::BatchUpdateRequest>,
816        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
817        async fn batch_delete(
818            &self,
819            request: tonic::Request<super::BatchDeleteRequest>,
820        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
821        async fn login(
822            &self,
823            request: tonic::Request<super::LoginRequest>,
824        ) -> std::result::Result<tonic::Response<super::LoginResponse>, tonic::Status>;
825        async fn upsert(
826            &self,
827            request: tonic::Request<super::UpsertRequest>,
828        ) -> std::result::Result<tonic::Response<super::Response>, tonic::Status>;
829        async fn register(
830            &self,
831            request: tonic::Request<super::RegisterRequest>,
832        ) -> std::result::Result<
833            tonic::Response<super::RegisterResponse>,
834            tonic::Status,
835        >;
836    }
837    #[derive(Debug)]
838    pub struct StoreServiceServer<T> {
839        inner: Arc<T>,
840        accept_compression_encodings: EnabledCompressionEncodings,
841        send_compression_encodings: EnabledCompressionEncodings,
842        max_decoding_message_size: Option<usize>,
843        max_encoding_message_size: Option<usize>,
844    }
845    impl<T> StoreServiceServer<T> {
846        pub fn new(inner: T) -> Self {
847            Self::from_arc(Arc::new(inner))
848        }
849        pub fn from_arc(inner: Arc<T>) -> Self {
850            Self {
851                inner,
852                accept_compression_encodings: Default::default(),
853                send_compression_encodings: Default::default(),
854                max_decoding_message_size: None,
855                max_encoding_message_size: None,
856            }
857        }
858        pub fn with_interceptor<F>(
859            inner: T,
860            interceptor: F,
861        ) -> InterceptedService<Self, F>
862        where
863            F: tonic::service::Interceptor,
864        {
865            InterceptedService::new(Self::new(inner), interceptor)
866        }
867        /// Enable decompressing requests with the given encoding.
868        #[must_use]
869        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
870            self.accept_compression_encodings.enable(encoding);
871            self
872        }
873        /// Compress responses with the given encoding, if the client supports it.
874        #[must_use]
875        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
876            self.send_compression_encodings.enable(encoding);
877            self
878        }
879        /// Limits the maximum size of a decoded message.
880        ///
881        /// Default: `4MB`
882        #[must_use]
883        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
884            self.max_decoding_message_size = Some(limit);
885            self
886        }
887        /// Limits the maximum size of an encoded message.
888        ///
889        /// Default: `usize::MAX`
890        #[must_use]
891        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
892            self.max_encoding_message_size = Some(limit);
893            self
894        }
895    }
896    impl<T, B> tonic::codegen::Service<http::Request<B>> for StoreServiceServer<T>
897    where
898        T: StoreService,
899        B: Body + std::marker::Send + 'static,
900        B::Error: Into<StdError> + std::marker::Send + 'static,
901    {
902        type Response = http::Response<tonic::body::BoxBody>;
903        type Error = std::convert::Infallible;
904        type Future = BoxFuture<Self::Response, Self::Error>;
905        fn poll_ready(
906            &mut self,
907            _cx: &mut Context<'_>,
908        ) -> Poll<std::result::Result<(), Self::Error>> {
909            Poll::Ready(Ok(()))
910        }
911        fn call(&mut self, req: http::Request<B>) -> Self::Future {
912            match req.uri().path() {
913                "/datastore.StoreService/GetById" => {
914                    #[allow(non_camel_case_types)]
915                    struct GetByIdSvc<T: StoreService>(pub Arc<T>);
916                    impl<
917                        T: StoreService,
918                    > tonic::server::UnaryService<super::GetByIdRequest>
919                    for GetByIdSvc<T> {
920                        type Response = super::Response;
921                        type Future = BoxFuture<
922                            tonic::Response<Self::Response>,
923                            tonic::Status,
924                        >;
925                        fn call(
926                            &mut self,
927                            request: tonic::Request<super::GetByIdRequest>,
928                        ) -> Self::Future {
929                            let inner = Arc::clone(&self.0);
930                            let fut = async move {
931                                <T as StoreService>::get_by_id(&inner, request).await
932                            };
933                            Box::pin(fut)
934                        }
935                    }
936                    let accept_compression_encodings = self.accept_compression_encodings;
937                    let send_compression_encodings = self.send_compression_encodings;
938                    let max_decoding_message_size = self.max_decoding_message_size;
939                    let max_encoding_message_size = self.max_encoding_message_size;
940                    let inner = self.inner.clone();
941                    let fut = async move {
942                        let method = GetByIdSvc(inner);
943                        let codec = tonic::codec::ProstCodec::default();
944                        let mut grpc = tonic::server::Grpc::new(codec)
945                            .apply_compression_config(
946                                accept_compression_encodings,
947                                send_compression_encodings,
948                            )
949                            .apply_max_message_size_config(
950                                max_decoding_message_size,
951                                max_encoding_message_size,
952                            );
953                        let res = grpc.unary(method, req).await;
954                        Ok(res)
955                    };
956                    Box::pin(fut)
957                }
958                "/datastore.StoreService/Aggregate" => {
959                    #[allow(non_camel_case_types)]
960                    struct AggregateSvc<T: StoreService>(pub Arc<T>);
961                    impl<
962                        T: StoreService,
963                    > tonic::server::UnaryService<super::AggregateRequest>
964                    for AggregateSvc<T> {
965                        type Response = super::Response;
966                        type Future = BoxFuture<
967                            tonic::Response<Self::Response>,
968                            tonic::Status,
969                        >;
970                        fn call(
971                            &mut self,
972                            request: tonic::Request<super::AggregateRequest>,
973                        ) -> Self::Future {
974                            let inner = Arc::clone(&self.0);
975                            let fut = async move {
976                                <T as StoreService>::aggregate(&inner, request).await
977                            };
978                            Box::pin(fut)
979                        }
980                    }
981                    let accept_compression_encodings = self.accept_compression_encodings;
982                    let send_compression_encodings = self.send_compression_encodings;
983                    let max_decoding_message_size = self.max_decoding_message_size;
984                    let max_encoding_message_size = self.max_encoding_message_size;
985                    let inner = self.inner.clone();
986                    let fut = async move {
987                        let method = AggregateSvc(inner);
988                        let codec = tonic::codec::ProstCodec::default();
989                        let mut grpc = tonic::server::Grpc::new(codec)
990                            .apply_compression_config(
991                                accept_compression_encodings,
992                                send_compression_encodings,
993                            )
994                            .apply_max_message_size_config(
995                                max_decoding_message_size,
996                                max_encoding_message_size,
997                            );
998                        let res = grpc.unary(method, req).await;
999                        Ok(res)
1000                    };
1001                    Box::pin(fut)
1002                }
1003                "/datastore.StoreService/GetByFilter" => {
1004                    #[allow(non_camel_case_types)]
1005                    struct GetByFilterSvc<T: StoreService>(pub Arc<T>);
1006                    impl<
1007                        T: StoreService,
1008                    > tonic::server::UnaryService<super::GetByFilterRequest>
1009                    for GetByFilterSvc<T> {
1010                        type Response = super::Response;
1011                        type Future = BoxFuture<
1012                            tonic::Response<Self::Response>,
1013                            tonic::Status,
1014                        >;
1015                        fn call(
1016                            &mut self,
1017                            request: tonic::Request<super::GetByFilterRequest>,
1018                        ) -> Self::Future {
1019                            let inner = Arc::clone(&self.0);
1020                            let fut = async move {
1021                                <T as StoreService>::get_by_filter(&inner, request).await
1022                            };
1023                            Box::pin(fut)
1024                        }
1025                    }
1026                    let accept_compression_encodings = self.accept_compression_encodings;
1027                    let send_compression_encodings = self.send_compression_encodings;
1028                    let max_decoding_message_size = self.max_decoding_message_size;
1029                    let max_encoding_message_size = self.max_encoding_message_size;
1030                    let inner = self.inner.clone();
1031                    let fut = async move {
1032                        let method = GetByFilterSvc(inner);
1033                        let codec = tonic::codec::ProstCodec::default();
1034                        let mut grpc = tonic::server::Grpc::new(codec)
1035                            .apply_compression_config(
1036                                accept_compression_encodings,
1037                                send_compression_encodings,
1038                            )
1039                            .apply_max_message_size_config(
1040                                max_decoding_message_size,
1041                                max_encoding_message_size,
1042                            );
1043                        let res = grpc.unary(method, req).await;
1044                        Ok(res)
1045                    };
1046                    Box::pin(fut)
1047                }
1048                "/datastore.StoreService/Update" => {
1049                    #[allow(non_camel_case_types)]
1050                    struct UpdateSvc<T: StoreService>(pub Arc<T>);
1051                    impl<
1052                        T: StoreService,
1053                    > tonic::server::UnaryService<super::UpdateRequest>
1054                    for UpdateSvc<T> {
1055                        type Response = super::Response;
1056                        type Future = BoxFuture<
1057                            tonic::Response<Self::Response>,
1058                            tonic::Status,
1059                        >;
1060                        fn call(
1061                            &mut self,
1062                            request: tonic::Request<super::UpdateRequest>,
1063                        ) -> Self::Future {
1064                            let inner = Arc::clone(&self.0);
1065                            let fut = async move {
1066                                <T as StoreService>::update(&inner, request).await
1067                            };
1068                            Box::pin(fut)
1069                        }
1070                    }
1071                    let accept_compression_encodings = self.accept_compression_encodings;
1072                    let send_compression_encodings = self.send_compression_encodings;
1073                    let max_decoding_message_size = self.max_decoding_message_size;
1074                    let max_encoding_message_size = self.max_encoding_message_size;
1075                    let inner = self.inner.clone();
1076                    let fut = async move {
1077                        let method = UpdateSvc(inner);
1078                        let codec = tonic::codec::ProstCodec::default();
1079                        let mut grpc = tonic::server::Grpc::new(codec)
1080                            .apply_compression_config(
1081                                accept_compression_encodings,
1082                                send_compression_encodings,
1083                            )
1084                            .apply_max_message_size_config(
1085                                max_decoding_message_size,
1086                                max_encoding_message_size,
1087                            );
1088                        let res = grpc.unary(method, req).await;
1089                        Ok(res)
1090                    };
1091                    Box::pin(fut)
1092                }
1093                "/datastore.StoreService/Delete" => {
1094                    #[allow(non_camel_case_types)]
1095                    struct DeleteSvc<T: StoreService>(pub Arc<T>);
1096                    impl<
1097                        T: StoreService,
1098                    > tonic::server::UnaryService<super::DeleteRequest>
1099                    for DeleteSvc<T> {
1100                        type Response = super::Response;
1101                        type Future = BoxFuture<
1102                            tonic::Response<Self::Response>,
1103                            tonic::Status,
1104                        >;
1105                        fn call(
1106                            &mut self,
1107                            request: tonic::Request<super::DeleteRequest>,
1108                        ) -> Self::Future {
1109                            let inner = Arc::clone(&self.0);
1110                            let fut = async move {
1111                                <T as StoreService>::delete(&inner, request).await
1112                            };
1113                            Box::pin(fut)
1114                        }
1115                    }
1116                    let accept_compression_encodings = self.accept_compression_encodings;
1117                    let send_compression_encodings = self.send_compression_encodings;
1118                    let max_decoding_message_size = self.max_decoding_message_size;
1119                    let max_encoding_message_size = self.max_encoding_message_size;
1120                    let inner = self.inner.clone();
1121                    let fut = async move {
1122                        let method = DeleteSvc(inner);
1123                        let codec = tonic::codec::ProstCodec::default();
1124                        let mut grpc = tonic::server::Grpc::new(codec)
1125                            .apply_compression_config(
1126                                accept_compression_encodings,
1127                                send_compression_encodings,
1128                            )
1129                            .apply_max_message_size_config(
1130                                max_decoding_message_size,
1131                                max_encoding_message_size,
1132                            );
1133                        let res = grpc.unary(method, req).await;
1134                        Ok(res)
1135                    };
1136                    Box::pin(fut)
1137                }
1138                "/datastore.StoreService/Create" => {
1139                    #[allow(non_camel_case_types)]
1140                    struct CreateSvc<T: StoreService>(pub Arc<T>);
1141                    impl<
1142                        T: StoreService,
1143                    > tonic::server::UnaryService<super::CreateRequest>
1144                    for CreateSvc<T> {
1145                        type Response = super::Response;
1146                        type Future = BoxFuture<
1147                            tonic::Response<Self::Response>,
1148                            tonic::Status,
1149                        >;
1150                        fn call(
1151                            &mut self,
1152                            request: tonic::Request<super::CreateRequest>,
1153                        ) -> Self::Future {
1154                            let inner = Arc::clone(&self.0);
1155                            let fut = async move {
1156                                <T as StoreService>::create(&inner, request).await
1157                            };
1158                            Box::pin(fut)
1159                        }
1160                    }
1161                    let accept_compression_encodings = self.accept_compression_encodings;
1162                    let send_compression_encodings = self.send_compression_encodings;
1163                    let max_decoding_message_size = self.max_decoding_message_size;
1164                    let max_encoding_message_size = self.max_encoding_message_size;
1165                    let inner = self.inner.clone();
1166                    let fut = async move {
1167                        let method = CreateSvc(inner);
1168                        let codec = tonic::codec::ProstCodec::default();
1169                        let mut grpc = tonic::server::Grpc::new(codec)
1170                            .apply_compression_config(
1171                                accept_compression_encodings,
1172                                send_compression_encodings,
1173                            )
1174                            .apply_max_message_size_config(
1175                                max_decoding_message_size,
1176                                max_encoding_message_size,
1177                            );
1178                        let res = grpc.unary(method, req).await;
1179                        Ok(res)
1180                    };
1181                    Box::pin(fut)
1182                }
1183                "/datastore.StoreService/BatchCreate" => {
1184                    #[allow(non_camel_case_types)]
1185                    struct BatchCreateSvc<T: StoreService>(pub Arc<T>);
1186                    impl<
1187                        T: StoreService,
1188                    > tonic::server::UnaryService<super::BatchCreateRequest>
1189                    for BatchCreateSvc<T> {
1190                        type Response = super::Response;
1191                        type Future = BoxFuture<
1192                            tonic::Response<Self::Response>,
1193                            tonic::Status,
1194                        >;
1195                        fn call(
1196                            &mut self,
1197                            request: tonic::Request<super::BatchCreateRequest>,
1198                        ) -> Self::Future {
1199                            let inner = Arc::clone(&self.0);
1200                            let fut = async move {
1201                                <T as StoreService>::batch_create(&inner, request).await
1202                            };
1203                            Box::pin(fut)
1204                        }
1205                    }
1206                    let accept_compression_encodings = self.accept_compression_encodings;
1207                    let send_compression_encodings = self.send_compression_encodings;
1208                    let max_decoding_message_size = self.max_decoding_message_size;
1209                    let max_encoding_message_size = self.max_encoding_message_size;
1210                    let inner = self.inner.clone();
1211                    let fut = async move {
1212                        let method = BatchCreateSvc(inner);
1213                        let codec = tonic::codec::ProstCodec::default();
1214                        let mut grpc = tonic::server::Grpc::new(codec)
1215                            .apply_compression_config(
1216                                accept_compression_encodings,
1217                                send_compression_encodings,
1218                            )
1219                            .apply_max_message_size_config(
1220                                max_decoding_message_size,
1221                                max_encoding_message_size,
1222                            );
1223                        let res = grpc.unary(method, req).await;
1224                        Ok(res)
1225                    };
1226                    Box::pin(fut)
1227                }
1228                "/datastore.StoreService/BatchUpdate" => {
1229                    #[allow(non_camel_case_types)]
1230                    struct BatchUpdateSvc<T: StoreService>(pub Arc<T>);
1231                    impl<
1232                        T: StoreService,
1233                    > tonic::server::UnaryService<super::BatchUpdateRequest>
1234                    for BatchUpdateSvc<T> {
1235                        type Response = super::Response;
1236                        type Future = BoxFuture<
1237                            tonic::Response<Self::Response>,
1238                            tonic::Status,
1239                        >;
1240                        fn call(
1241                            &mut self,
1242                            request: tonic::Request<super::BatchUpdateRequest>,
1243                        ) -> Self::Future {
1244                            let inner = Arc::clone(&self.0);
1245                            let fut = async move {
1246                                <T as StoreService>::batch_update(&inner, request).await
1247                            };
1248                            Box::pin(fut)
1249                        }
1250                    }
1251                    let accept_compression_encodings = self.accept_compression_encodings;
1252                    let send_compression_encodings = self.send_compression_encodings;
1253                    let max_decoding_message_size = self.max_decoding_message_size;
1254                    let max_encoding_message_size = self.max_encoding_message_size;
1255                    let inner = self.inner.clone();
1256                    let fut = async move {
1257                        let method = BatchUpdateSvc(inner);
1258                        let codec = tonic::codec::ProstCodec::default();
1259                        let mut grpc = tonic::server::Grpc::new(codec)
1260                            .apply_compression_config(
1261                                accept_compression_encodings,
1262                                send_compression_encodings,
1263                            )
1264                            .apply_max_message_size_config(
1265                                max_decoding_message_size,
1266                                max_encoding_message_size,
1267                            );
1268                        let res = grpc.unary(method, req).await;
1269                        Ok(res)
1270                    };
1271                    Box::pin(fut)
1272                }
1273                "/datastore.StoreService/BatchDelete" => {
1274                    #[allow(non_camel_case_types)]
1275                    struct BatchDeleteSvc<T: StoreService>(pub Arc<T>);
1276                    impl<
1277                        T: StoreService,
1278                    > tonic::server::UnaryService<super::BatchDeleteRequest>
1279                    for BatchDeleteSvc<T> {
1280                        type Response = super::Response;
1281                        type Future = BoxFuture<
1282                            tonic::Response<Self::Response>,
1283                            tonic::Status,
1284                        >;
1285                        fn call(
1286                            &mut self,
1287                            request: tonic::Request<super::BatchDeleteRequest>,
1288                        ) -> Self::Future {
1289                            let inner = Arc::clone(&self.0);
1290                            let fut = async move {
1291                                <T as StoreService>::batch_delete(&inner, request).await
1292                            };
1293                            Box::pin(fut)
1294                        }
1295                    }
1296                    let accept_compression_encodings = self.accept_compression_encodings;
1297                    let send_compression_encodings = self.send_compression_encodings;
1298                    let max_decoding_message_size = self.max_decoding_message_size;
1299                    let max_encoding_message_size = self.max_encoding_message_size;
1300                    let inner = self.inner.clone();
1301                    let fut = async move {
1302                        let method = BatchDeleteSvc(inner);
1303                        let codec = tonic::codec::ProstCodec::default();
1304                        let mut grpc = tonic::server::Grpc::new(codec)
1305                            .apply_compression_config(
1306                                accept_compression_encodings,
1307                                send_compression_encodings,
1308                            )
1309                            .apply_max_message_size_config(
1310                                max_decoding_message_size,
1311                                max_encoding_message_size,
1312                            );
1313                        let res = grpc.unary(method, req).await;
1314                        Ok(res)
1315                    };
1316                    Box::pin(fut)
1317                }
1318                "/datastore.StoreService/Login" => {
1319                    #[allow(non_camel_case_types)]
1320                    struct LoginSvc<T: StoreService>(pub Arc<T>);
1321                    impl<
1322                        T: StoreService,
1323                    > tonic::server::UnaryService<super::LoginRequest> for LoginSvc<T> {
1324                        type Response = super::LoginResponse;
1325                        type Future = BoxFuture<
1326                            tonic::Response<Self::Response>,
1327                            tonic::Status,
1328                        >;
1329                        fn call(
1330                            &mut self,
1331                            request: tonic::Request<super::LoginRequest>,
1332                        ) -> Self::Future {
1333                            let inner = Arc::clone(&self.0);
1334                            let fut = async move {
1335                                <T as StoreService>::login(&inner, request).await
1336                            };
1337                            Box::pin(fut)
1338                        }
1339                    }
1340                    let accept_compression_encodings = self.accept_compression_encodings;
1341                    let send_compression_encodings = self.send_compression_encodings;
1342                    let max_decoding_message_size = self.max_decoding_message_size;
1343                    let max_encoding_message_size = self.max_encoding_message_size;
1344                    let inner = self.inner.clone();
1345                    let fut = async move {
1346                        let method = LoginSvc(inner);
1347                        let codec = tonic::codec::ProstCodec::default();
1348                        let mut grpc = tonic::server::Grpc::new(codec)
1349                            .apply_compression_config(
1350                                accept_compression_encodings,
1351                                send_compression_encodings,
1352                            )
1353                            .apply_max_message_size_config(
1354                                max_decoding_message_size,
1355                                max_encoding_message_size,
1356                            );
1357                        let res = grpc.unary(method, req).await;
1358                        Ok(res)
1359                    };
1360                    Box::pin(fut)
1361                }
1362                "/datastore.StoreService/Upsert" => {
1363                    #[allow(non_camel_case_types)]
1364                    struct UpsertSvc<T: StoreService>(pub Arc<T>);
1365                    impl<
1366                        T: StoreService,
1367                    > tonic::server::UnaryService<super::UpsertRequest>
1368                    for UpsertSvc<T> {
1369                        type Response = super::Response;
1370                        type Future = BoxFuture<
1371                            tonic::Response<Self::Response>,
1372                            tonic::Status,
1373                        >;
1374                        fn call(
1375                            &mut self,
1376                            request: tonic::Request<super::UpsertRequest>,
1377                        ) -> Self::Future {
1378                            let inner = Arc::clone(&self.0);
1379                            let fut = async move {
1380                                <T as StoreService>::upsert(&inner, request).await
1381                            };
1382                            Box::pin(fut)
1383                        }
1384                    }
1385                    let accept_compression_encodings = self.accept_compression_encodings;
1386                    let send_compression_encodings = self.send_compression_encodings;
1387                    let max_decoding_message_size = self.max_decoding_message_size;
1388                    let max_encoding_message_size = self.max_encoding_message_size;
1389                    let inner = self.inner.clone();
1390                    let fut = async move {
1391                        let method = UpsertSvc(inner);
1392                        let codec = tonic::codec::ProstCodec::default();
1393                        let mut grpc = tonic::server::Grpc::new(codec)
1394                            .apply_compression_config(
1395                                accept_compression_encodings,
1396                                send_compression_encodings,
1397                            )
1398                            .apply_max_message_size_config(
1399                                max_decoding_message_size,
1400                                max_encoding_message_size,
1401                            );
1402                        let res = grpc.unary(method, req).await;
1403                        Ok(res)
1404                    };
1405                    Box::pin(fut)
1406                }
1407                "/datastore.StoreService/Register" => {
1408                    #[allow(non_camel_case_types)]
1409                    struct RegisterSvc<T: StoreService>(pub Arc<T>);
1410                    impl<
1411                        T: StoreService,
1412                    > tonic::server::UnaryService<super::RegisterRequest>
1413                    for RegisterSvc<T> {
1414                        type Response = super::RegisterResponse;
1415                        type Future = BoxFuture<
1416                            tonic::Response<Self::Response>,
1417                            tonic::Status,
1418                        >;
1419                        fn call(
1420                            &mut self,
1421                            request: tonic::Request<super::RegisterRequest>,
1422                        ) -> Self::Future {
1423                            let inner = Arc::clone(&self.0);
1424                            let fut = async move {
1425                                <T as StoreService>::register(&inner, request).await
1426                            };
1427                            Box::pin(fut)
1428                        }
1429                    }
1430                    let accept_compression_encodings = self.accept_compression_encodings;
1431                    let send_compression_encodings = self.send_compression_encodings;
1432                    let max_decoding_message_size = self.max_decoding_message_size;
1433                    let max_encoding_message_size = self.max_encoding_message_size;
1434                    let inner = self.inner.clone();
1435                    let fut = async move {
1436                        let method = RegisterSvc(inner);
1437                        let codec = tonic::codec::ProstCodec::default();
1438                        let mut grpc = tonic::server::Grpc::new(codec)
1439                            .apply_compression_config(
1440                                accept_compression_encodings,
1441                                send_compression_encodings,
1442                            )
1443                            .apply_max_message_size_config(
1444                                max_decoding_message_size,
1445                                max_encoding_message_size,
1446                            );
1447                        let res = grpc.unary(method, req).await;
1448                        Ok(res)
1449                    };
1450                    Box::pin(fut)
1451                }
1452                _ => {
1453                    Box::pin(async move {
1454                        let mut response = http::Response::new(empty_body());
1455                        let headers = response.headers_mut();
1456                        headers
1457                            .insert(
1458                                tonic::Status::GRPC_STATUS,
1459                                (tonic::Code::Unimplemented as i32).into(),
1460                            );
1461                        headers
1462                            .insert(
1463                                http::header::CONTENT_TYPE,
1464                                tonic::metadata::GRPC_CONTENT_TYPE,
1465                            );
1466                        Ok(response)
1467                    })
1468                }
1469            }
1470        }
1471    }
1472    impl<T> Clone for StoreServiceServer<T> {
1473        fn clone(&self) -> Self {
1474            let inner = self.inner.clone();
1475            Self {
1476                inner,
1477                accept_compression_encodings: self.accept_compression_encodings,
1478                send_compression_encodings: self.send_compression_encodings,
1479                max_decoding_message_size: self.max_decoding_message_size,
1480                max_encoding_message_size: self.max_encoding_message_size,
1481            }
1482        }
1483    }
1484    /// Generated gRPC service name
1485    pub const SERVICE_NAME: &str = "datastore.StoreService";
1486    impl<T> tonic::server::NamedService for StoreServiceServer<T> {
1487        const NAME: &'static str = SERVICE_NAME;
1488    }
1489}