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