xmtp_proto/gen/
xmtp.mls.api.v1.rs

1// This file is @generated by prost-build.
2/// Full representation of a welcome message
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct WelcomeMessage {
5    #[prost(oneof = "welcome_message::Version", tags = "1, 2")]
6    pub version: ::core::option::Option<welcome_message::Version>,
7}
8/// Nested message and enum types in `WelcomeMessage`.
9pub mod welcome_message {
10    /// Version 1 of the WelcomeMessage format
11    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12    pub struct V1 {
13        #[prost(uint64, tag = "1")]
14        pub id: u64,
15        #[prost(uint64, tag = "2")]
16        pub created_ns: u64,
17        #[prost(bytes = "vec", tag = "3")]
18        pub installation_key: ::prost::alloc::vec::Vec<u8>,
19        #[prost(bytes = "vec", tag = "4")]
20        pub data: ::prost::alloc::vec::Vec<u8>,
21        #[prost(bytes = "vec", tag = "5")]
22        pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
23        #[prost(
24            enumeration = "super::super::super::message_contents::WelcomeWrapperAlgorithm",
25            tag = "6"
26        )]
27        pub wrapper_algorithm: i32,
28        #[prost(bytes = "vec", tag = "7")]
29        pub welcome_metadata: ::prost::alloc::vec::Vec<u8>,
30    }
31    impl ::prost::Name for V1 {
32        const NAME: &'static str = "V1";
33        const PACKAGE: &'static str = "xmtp.mls.api.v1";
34        fn full_name() -> ::prost::alloc::string::String {
35            "xmtp.mls.api.v1.WelcomeMessage.V1".into()
36        }
37        fn type_url() -> ::prost::alloc::string::String {
38            "/xmtp.mls.api.v1.WelcomeMessage.V1".into()
39        }
40    }
41    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
42    pub struct WelcomePointer {
43        #[prost(uint64, tag = "1")]
44        pub id: u64,
45        #[prost(uint64, tag = "2")]
46        pub created_ns: u64,
47        /// The topic of the welcome message (generally the installation id)
48        #[prost(bytes = "vec", tag = "3")]
49        pub installation_key: ::prost::alloc::vec::Vec<u8>,
50        /// A WelcomePointer encrypted using the algorithm specified by
51        /// wrapper_algorithm
52        #[prost(bytes = "vec", tag = "4")]
53        pub welcome_pointer: ::prost::alloc::vec::Vec<u8>,
54        /// The public key used to encrypt the welcome pointer
55        #[prost(bytes = "vec", tag = "5")]
56        pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
57        /// The algorithm used to encrypt the welcome pointer
58        #[prost(
59            enumeration = "super::super::super::message_contents::WelcomePointerWrapperAlgorithm",
60            tag = "6"
61        )]
62        pub wrapper_algorithm: i32,
63    }
64    impl ::prost::Name for WelcomePointer {
65        const NAME: &'static str = "WelcomePointer";
66        const PACKAGE: &'static str = "xmtp.mls.api.v1";
67        fn full_name() -> ::prost::alloc::string::String {
68            "xmtp.mls.api.v1.WelcomeMessage.WelcomePointer".into()
69        }
70        fn type_url() -> ::prost::alloc::string::String {
71            "/xmtp.mls.api.v1.WelcomeMessage.WelcomePointer".into()
72        }
73    }
74    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
75    pub enum Version {
76        #[prost(message, tag = "1")]
77        V1(V1),
78        #[prost(message, tag = "2")]
79        WelcomePointer(WelcomePointer),
80    }
81}
82impl ::prost::Name for WelcomeMessage {
83    const NAME: &'static str = "WelcomeMessage";
84    const PACKAGE: &'static str = "xmtp.mls.api.v1";
85    fn full_name() -> ::prost::alloc::string::String {
86        "xmtp.mls.api.v1.WelcomeMessage".into()
87    }
88    fn type_url() -> ::prost::alloc::string::String {
89        "/xmtp.mls.api.v1.WelcomeMessage".into()
90    }
91}
92/// Input type for a welcome message
93#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
94pub struct WelcomeMessageInput {
95    #[prost(oneof = "welcome_message_input::Version", tags = "1, 2")]
96    pub version: ::core::option::Option<welcome_message_input::Version>,
97}
98/// Nested message and enum types in `WelcomeMessageInput`.
99pub mod welcome_message_input {
100    /// Version 1 of the WelcomeMessageInput format, if used as the pointee of a
101    /// WelcomePointer then the hpke_public_key will be unset, and the
102    /// wrapper_algorithm will be WELCOME_WRAPPER_ALGORITHM_SYMMETRIC_KEY
103    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
104    pub struct V1 {
105        /// The topic of the welcome message (generally the installation id)
106        #[prost(bytes = "vec", tag = "1")]
107        pub installation_key: ::prost::alloc::vec::Vec<u8>,
108        /// An encrypted mls `Welcome` struct
109        #[prost(bytes = "vec", tag = "2")]
110        pub data: ::prost::alloc::vec::Vec<u8>,
111        /// The public key of the welcome message
112        #[prost(bytes = "vec", tag = "3")]
113        pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
114        /// The algorithm used to encrypt the welcome message
115        #[prost(
116            enumeration = "super::super::super::message_contents::WelcomeWrapperAlgorithm",
117            tag = "4"
118        )]
119        pub wrapper_algorithm: i32,
120        /// The metadata of the welcome message
121        #[prost(bytes = "vec", tag = "7")]
122        pub welcome_metadata: ::prost::alloc::vec::Vec<u8>,
123    }
124    impl ::prost::Name for V1 {
125        const NAME: &'static str = "V1";
126        const PACKAGE: &'static str = "xmtp.mls.api.v1";
127        fn full_name() -> ::prost::alloc::string::String {
128            "xmtp.mls.api.v1.WelcomeMessageInput.V1".into()
129        }
130        fn type_url() -> ::prost::alloc::string::String {
131            "/xmtp.mls.api.v1.WelcomeMessageInput.V1".into()
132        }
133    }
134    /// Version 2 of the WelcomeMessageInput format which uses a WelcomePointer
135    /// to point to the welcome message for several installations at once
136    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
137    pub struct WelcomePointer {
138        /// The topic of the welcome message (generally the installation id)
139        #[prost(bytes = "vec", tag = "1")]
140        pub installation_key: ::prost::alloc::vec::Vec<u8>,
141        /// A WelcomePointer encrypted using the wrapper_algorithm
142        #[prost(bytes = "vec", tag = "2")]
143        pub welcome_pointer: ::prost::alloc::vec::Vec<u8>,
144        /// The public key used to encrypt the welcome pointer
145        #[prost(bytes = "vec", tag = "3")]
146        pub hpke_public_key: ::prost::alloc::vec::Vec<u8>,
147        /// The algorithm used to encrypt the welcome pointer
148        #[prost(
149            enumeration = "super::super::super::message_contents::WelcomePointerWrapperAlgorithm",
150            tag = "4"
151        )]
152        pub wrapper_algorithm: i32,
153    }
154    impl ::prost::Name for WelcomePointer {
155        const NAME: &'static str = "WelcomePointer";
156        const PACKAGE: &'static str = "xmtp.mls.api.v1";
157        fn full_name() -> ::prost::alloc::string::String {
158            "xmtp.mls.api.v1.WelcomeMessageInput.WelcomePointer".into()
159        }
160        fn type_url() -> ::prost::alloc::string::String {
161            "/xmtp.mls.api.v1.WelcomeMessageInput.WelcomePointer".into()
162        }
163    }
164    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
165    pub enum Version {
166        #[prost(message, tag = "1")]
167        V1(V1),
168        #[prost(message, tag = "2")]
169        WelcomePointer(WelcomePointer),
170    }
171}
172impl ::prost::Name for WelcomeMessageInput {
173    const NAME: &'static str = "WelcomeMessageInput";
174    const PACKAGE: &'static str = "xmtp.mls.api.v1";
175    fn full_name() -> ::prost::alloc::string::String {
176        "xmtp.mls.api.v1.WelcomeMessageInput".into()
177    }
178    fn type_url() -> ::prost::alloc::string::String {
179        "/xmtp.mls.api.v1.WelcomeMessageInput".into()
180    }
181}
182/// This field is encrypted along with the `data` field on the welcome message.
183#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
184pub struct WelcomeMetadata {
185    #[prost(uint64, tag = "1")]
186    pub message_cursor: u64,
187}
188impl ::prost::Name for WelcomeMetadata {
189    const NAME: &'static str = "WelcomeMetadata";
190    const PACKAGE: &'static str = "xmtp.mls.api.v1";
191    fn full_name() -> ::prost::alloc::string::String {
192        "xmtp.mls.api.v1.WelcomeMetadata".into()
193    }
194    fn type_url() -> ::prost::alloc::string::String {
195        "/xmtp.mls.api.v1.WelcomeMetadata".into()
196    }
197}
198/// Full representation of a group message
199#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
200pub struct GroupMessage {
201    #[prost(oneof = "group_message::Version", tags = "1")]
202    pub version: ::core::option::Option<group_message::Version>,
203}
204/// Nested message and enum types in `GroupMessage`.
205pub mod group_message {
206    /// Version 1 of the GroupMessage format
207    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
208    pub struct V1 {
209        #[prost(uint64, tag = "1")]
210        pub id: u64,
211        #[prost(uint64, tag = "2")]
212        pub created_ns: u64,
213        #[prost(bytes = "vec", tag = "3")]
214        pub group_id: ::prost::alloc::vec::Vec<u8>,
215        #[prost(bytes = "vec", tag = "4")]
216        pub data: ::prost::alloc::vec::Vec<u8>,
217        #[prost(bytes = "vec", tag = "5")]
218        pub sender_hmac: ::prost::alloc::vec::Vec<u8>,
219        #[prost(bool, tag = "6")]
220        pub should_push: bool,
221        #[prost(bool, tag = "7")]
222        pub is_commit: bool,
223    }
224    impl ::prost::Name for V1 {
225        const NAME: &'static str = "V1";
226        const PACKAGE: &'static str = "xmtp.mls.api.v1";
227        fn full_name() -> ::prost::alloc::string::String {
228            "xmtp.mls.api.v1.GroupMessage.V1".into()
229        }
230        fn type_url() -> ::prost::alloc::string::String {
231            "/xmtp.mls.api.v1.GroupMessage.V1".into()
232        }
233    }
234    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
235    pub enum Version {
236        #[prost(message, tag = "1")]
237        V1(V1),
238    }
239}
240impl ::prost::Name for GroupMessage {
241    const NAME: &'static str = "GroupMessage";
242    const PACKAGE: &'static str = "xmtp.mls.api.v1";
243    fn full_name() -> ::prost::alloc::string::String {
244        "xmtp.mls.api.v1.GroupMessage".into()
245    }
246    fn type_url() -> ::prost::alloc::string::String {
247        "/xmtp.mls.api.v1.GroupMessage".into()
248    }
249}
250/// Input type for a group message
251#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
252pub struct GroupMessageInput {
253    #[prost(oneof = "group_message_input::Version", tags = "1")]
254    pub version: ::core::option::Option<group_message_input::Version>,
255}
256/// Nested message and enum types in `GroupMessageInput`.
257pub mod group_message_input {
258    /// Version 1 of the GroupMessageInput payload format
259    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
260    pub struct V1 {
261        /// Serialized MlsProtocolMessage
262        #[prost(bytes = "vec", tag = "1")]
263        pub data: ::prost::alloc::vec::Vec<u8>,
264        #[prost(bytes = "vec", tag = "2")]
265        pub sender_hmac: ::prost::alloc::vec::Vec<u8>,
266        #[prost(bool, tag = "3")]
267        pub should_push: bool,
268    }
269    impl ::prost::Name for V1 {
270        const NAME: &'static str = "V1";
271        const PACKAGE: &'static str = "xmtp.mls.api.v1";
272        fn full_name() -> ::prost::alloc::string::String {
273            "xmtp.mls.api.v1.GroupMessageInput.V1".into()
274        }
275        fn type_url() -> ::prost::alloc::string::String {
276            "/xmtp.mls.api.v1.GroupMessageInput.V1".into()
277        }
278    }
279    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
280    pub enum Version {
281        #[prost(message, tag = "1")]
282        V1(V1),
283    }
284}
285impl ::prost::Name for GroupMessageInput {
286    const NAME: &'static str = "GroupMessageInput";
287    const PACKAGE: &'static str = "xmtp.mls.api.v1";
288    fn full_name() -> ::prost::alloc::string::String {
289        "xmtp.mls.api.v1.GroupMessageInput".into()
290    }
291    fn type_url() -> ::prost::alloc::string::String {
292        "/xmtp.mls.api.v1.GroupMessageInput".into()
293    }
294}
295/// Send a batch of MLS messages
296#[derive(Clone, PartialEq, ::prost::Message)]
297pub struct SendGroupMessagesRequest {
298    #[prost(message, repeated, tag = "1")]
299    pub messages: ::prost::alloc::vec::Vec<GroupMessageInput>,
300}
301impl ::prost::Name for SendGroupMessagesRequest {
302    const NAME: &'static str = "SendGroupMessagesRequest";
303    const PACKAGE: &'static str = "xmtp.mls.api.v1";
304    fn full_name() -> ::prost::alloc::string::String {
305        "xmtp.mls.api.v1.SendGroupMessagesRequest".into()
306    }
307    fn type_url() -> ::prost::alloc::string::String {
308        "/xmtp.mls.api.v1.SendGroupMessagesRequest".into()
309    }
310}
311/// Send a batch of welcome messages
312#[derive(Clone, PartialEq, ::prost::Message)]
313pub struct SendWelcomeMessagesRequest {
314    #[prost(message, repeated, tag = "1")]
315    pub messages: ::prost::alloc::vec::Vec<WelcomeMessageInput>,
316}
317impl ::prost::Name for SendWelcomeMessagesRequest {
318    const NAME: &'static str = "SendWelcomeMessagesRequest";
319    const PACKAGE: &'static str = "xmtp.mls.api.v1";
320    fn full_name() -> ::prost::alloc::string::String {
321        "xmtp.mls.api.v1.SendWelcomeMessagesRequest".into()
322    }
323    fn type_url() -> ::prost::alloc::string::String {
324        "/xmtp.mls.api.v1.SendWelcomeMessagesRequest".into()
325    }
326}
327/// A wrapper around the Key Package bytes
328///
329/// This would be a serialized MLS key package that the node would
330/// parse, validate, and then store.
331#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
332pub struct KeyPackageUpload {
333    /// The owner's wallet address would be extracted from the identity
334    /// credential in the key package, and all signatures would be validated.
335    #[prost(bytes = "vec", tag = "1")]
336    pub key_package_tls_serialized: ::prost::alloc::vec::Vec<u8>,
337}
338impl ::prost::Name for KeyPackageUpload {
339    const NAME: &'static str = "KeyPackageUpload";
340    const PACKAGE: &'static str = "xmtp.mls.api.v1";
341    fn full_name() -> ::prost::alloc::string::String {
342        "xmtp.mls.api.v1.KeyPackageUpload".into()
343    }
344    fn type_url() -> ::prost::alloc::string::String {
345        "/xmtp.mls.api.v1.KeyPackageUpload".into()
346    }
347}
348/// Register a new installation
349#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
350pub struct RegisterInstallationRequest {
351    /// The Key Package contains all information needed to register an installation
352    #[prost(message, optional, tag = "1")]
353    pub key_package: ::core::option::Option<KeyPackageUpload>,
354    #[prost(bool, tag = "2")]
355    pub is_inbox_id_credential: bool,
356}
357impl ::prost::Name for RegisterInstallationRequest {
358    const NAME: &'static str = "RegisterInstallationRequest";
359    const PACKAGE: &'static str = "xmtp.mls.api.v1";
360    fn full_name() -> ::prost::alloc::string::String {
361        "xmtp.mls.api.v1.RegisterInstallationRequest".into()
362    }
363    fn type_url() -> ::prost::alloc::string::String {
364        "/xmtp.mls.api.v1.RegisterInstallationRequest".into()
365    }
366}
367/// The response to a RegisterInstallationRequest
368#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
369pub struct RegisterInstallationResponse {
370    #[prost(bytes = "vec", tag = "1")]
371    pub installation_key: ::prost::alloc::vec::Vec<u8>,
372}
373impl ::prost::Name for RegisterInstallationResponse {
374    const NAME: &'static str = "RegisterInstallationResponse";
375    const PACKAGE: &'static str = "xmtp.mls.api.v1";
376    fn full_name() -> ::prost::alloc::string::String {
377        "xmtp.mls.api.v1.RegisterInstallationResponse".into()
378    }
379    fn type_url() -> ::prost::alloc::string::String {
380        "/xmtp.mls.api.v1.RegisterInstallationResponse".into()
381    }
382}
383/// Upload a new key packages
384#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
385pub struct UploadKeyPackageRequest {
386    /// An individual key package upload request
387    #[prost(message, optional, tag = "1")]
388    pub key_package: ::core::option::Option<KeyPackageUpload>,
389    #[prost(bool, tag = "2")]
390    pub is_inbox_id_credential: bool,
391}
392impl ::prost::Name for UploadKeyPackageRequest {
393    const NAME: &'static str = "UploadKeyPackageRequest";
394    const PACKAGE: &'static str = "xmtp.mls.api.v1";
395    fn full_name() -> ::prost::alloc::string::String {
396        "xmtp.mls.api.v1.UploadKeyPackageRequest".into()
397    }
398    fn type_url() -> ::prost::alloc::string::String {
399        "/xmtp.mls.api.v1.UploadKeyPackageRequest".into()
400    }
401}
402/// Fetch one or more key packages
403#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
404pub struct FetchKeyPackagesRequest {
405    /// The caller can provide an array of installation keys, and the API
406    /// will return one key package for each installation associated with each
407    /// installation key
408    #[prost(bytes = "vec", repeated, tag = "1")]
409    pub installation_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
410}
411impl ::prost::Name for FetchKeyPackagesRequest {
412    const NAME: &'static str = "FetchKeyPackagesRequest";
413    const PACKAGE: &'static str = "xmtp.mls.api.v1";
414    fn full_name() -> ::prost::alloc::string::String {
415        "xmtp.mls.api.v1.FetchKeyPackagesRequest".into()
416    }
417    fn type_url() -> ::prost::alloc::string::String {
418        "/xmtp.mls.api.v1.FetchKeyPackagesRequest".into()
419    }
420}
421/// The response to a FetchKeyPackagesRequest
422#[derive(Clone, PartialEq, ::prost::Message)]
423pub struct FetchKeyPackagesResponse {
424    /// Returns one key package per installation in the original order of the
425    /// request. If any installations are missing key packages, an empty entry is
426    /// left in their respective spots in the array.
427    #[prost(message, repeated, tag = "1")]
428    pub key_packages: ::prost::alloc::vec::Vec<fetch_key_packages_response::KeyPackage>,
429}
430/// Nested message and enum types in `FetchKeyPackagesResponse`.
431pub mod fetch_key_packages_response {
432    /// An individual key package
433    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
434    pub struct KeyPackage {
435        #[prost(bytes = "vec", tag = "1")]
436        pub key_package_tls_serialized: ::prost::alloc::vec::Vec<u8>,
437    }
438    impl ::prost::Name for KeyPackage {
439        const NAME: &'static str = "KeyPackage";
440        const PACKAGE: &'static str = "xmtp.mls.api.v1";
441        fn full_name() -> ::prost::alloc::string::String {
442            "xmtp.mls.api.v1.FetchKeyPackagesResponse.KeyPackage".into()
443        }
444        fn type_url() -> ::prost::alloc::string::String {
445            "/xmtp.mls.api.v1.FetchKeyPackagesResponse.KeyPackage".into()
446        }
447    }
448}
449impl ::prost::Name for FetchKeyPackagesResponse {
450    const NAME: &'static str = "FetchKeyPackagesResponse";
451    const PACKAGE: &'static str = "xmtp.mls.api.v1";
452    fn full_name() -> ::prost::alloc::string::String {
453        "xmtp.mls.api.v1.FetchKeyPackagesResponse".into()
454    }
455    fn type_url() -> ::prost::alloc::string::String {
456        "/xmtp.mls.api.v1.FetchKeyPackagesResponse".into()
457    }
458}
459/// Revoke an installation
460#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
461pub struct RevokeInstallationRequest {
462    #[prost(bytes = "vec", tag = "1")]
463    pub installation_key: ::prost::alloc::vec::Vec<u8>,
464    /// All revocations must be validated with a wallet signature over the
465    /// installation_id being revoked (and some sort of standard prologue)
466    #[prost(message, optional, tag = "2")]
467    pub wallet_signature: ::core::option::Option<
468        super::super::super::message_contents::Signature,
469    >,
470}
471impl ::prost::Name for RevokeInstallationRequest {
472    const NAME: &'static str = "RevokeInstallationRequest";
473    const PACKAGE: &'static str = "xmtp.mls.api.v1";
474    fn full_name() -> ::prost::alloc::string::String {
475        "xmtp.mls.api.v1.RevokeInstallationRequest".into()
476    }
477    fn type_url() -> ::prost::alloc::string::String {
478        "/xmtp.mls.api.v1.RevokeInstallationRequest".into()
479    }
480}
481/// Get all updates for an identity since the specified time
482#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
483pub struct GetIdentityUpdatesRequest {
484    #[prost(string, repeated, tag = "1")]
485    pub account_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
486    #[prost(uint64, tag = "2")]
487    pub start_time_ns: u64,
488}
489impl ::prost::Name for GetIdentityUpdatesRequest {
490    const NAME: &'static str = "GetIdentityUpdatesRequest";
491    const PACKAGE: &'static str = "xmtp.mls.api.v1";
492    fn full_name() -> ::prost::alloc::string::String {
493        "xmtp.mls.api.v1.GetIdentityUpdatesRequest".into()
494    }
495    fn type_url() -> ::prost::alloc::string::String {
496        "/xmtp.mls.api.v1.GetIdentityUpdatesRequest".into()
497    }
498}
499/// Used to get any new or revoked installations for a list of wallet addresses
500#[derive(Clone, PartialEq, ::prost::Message)]
501pub struct GetIdentityUpdatesResponse {
502    /// A list of updates (or empty objects if no changes) in the original order
503    /// of the request
504    #[prost(message, repeated, tag = "1")]
505    pub updates: ::prost::alloc::vec::Vec<get_identity_updates_response::WalletUpdates>,
506}
507/// Nested message and enum types in `GetIdentityUpdatesResponse`.
508pub mod get_identity_updates_response {
509    /// A new installation key was seen for the first time by the nodes
510    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
511    pub struct NewInstallationUpdate {
512        #[prost(bytes = "vec", tag = "1")]
513        pub installation_key: ::prost::alloc::vec::Vec<u8>,
514        #[prost(bytes = "vec", tag = "2")]
515        pub credential_identity: ::prost::alloc::vec::Vec<u8>,
516    }
517    impl ::prost::Name for NewInstallationUpdate {
518        const NAME: &'static str = "NewInstallationUpdate";
519        const PACKAGE: &'static str = "xmtp.mls.api.v1";
520        fn full_name() -> ::prost::alloc::string::String {
521            "xmtp.mls.api.v1.GetIdentityUpdatesResponse.NewInstallationUpdate".into()
522        }
523        fn type_url() -> ::prost::alloc::string::String {
524            "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.NewInstallationUpdate".into()
525        }
526    }
527    /// An installation was revoked
528    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
529    pub struct RevokedInstallationUpdate {
530        #[prost(bytes = "vec", tag = "1")]
531        pub installation_key: ::prost::alloc::vec::Vec<u8>,
532    }
533    impl ::prost::Name for RevokedInstallationUpdate {
534        const NAME: &'static str = "RevokedInstallationUpdate";
535        const PACKAGE: &'static str = "xmtp.mls.api.v1";
536        fn full_name() -> ::prost::alloc::string::String {
537            "xmtp.mls.api.v1.GetIdentityUpdatesResponse.RevokedInstallationUpdate".into()
538        }
539        fn type_url() -> ::prost::alloc::string::String {
540            "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.RevokedInstallationUpdate"
541                .into()
542        }
543    }
544    /// A wrapper for any update to the wallet
545    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
546    pub struct Update {
547        #[prost(uint64, tag = "1")]
548        pub timestamp_ns: u64,
549        #[prost(oneof = "update::Kind", tags = "2, 3")]
550        pub kind: ::core::option::Option<update::Kind>,
551    }
552    /// Nested message and enum types in `Update`.
553    pub mod update {
554        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
555        pub enum Kind {
556            #[prost(message, tag = "2")]
557            NewInstallation(super::NewInstallationUpdate),
558            #[prost(message, tag = "3")]
559            RevokedInstallation(super::RevokedInstallationUpdate),
560        }
561    }
562    impl ::prost::Name for Update {
563        const NAME: &'static str = "Update";
564        const PACKAGE: &'static str = "xmtp.mls.api.v1";
565        fn full_name() -> ::prost::alloc::string::String {
566            "xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update".into()
567        }
568        fn type_url() -> ::prost::alloc::string::String {
569            "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update".into()
570        }
571    }
572    /// A wrapper for the updates for a single wallet
573    #[derive(Clone, PartialEq, ::prost::Message)]
574    pub struct WalletUpdates {
575        #[prost(message, repeated, tag = "1")]
576        pub updates: ::prost::alloc::vec::Vec<Update>,
577    }
578    impl ::prost::Name for WalletUpdates {
579        const NAME: &'static str = "WalletUpdates";
580        const PACKAGE: &'static str = "xmtp.mls.api.v1";
581        fn full_name() -> ::prost::alloc::string::String {
582            "xmtp.mls.api.v1.GetIdentityUpdatesResponse.WalletUpdates".into()
583        }
584        fn type_url() -> ::prost::alloc::string::String {
585            "/xmtp.mls.api.v1.GetIdentityUpdatesResponse.WalletUpdates".into()
586        }
587    }
588}
589impl ::prost::Name for GetIdentityUpdatesResponse {
590    const NAME: &'static str = "GetIdentityUpdatesResponse";
591    const PACKAGE: &'static str = "xmtp.mls.api.v1";
592    fn full_name() -> ::prost::alloc::string::String {
593        "xmtp.mls.api.v1.GetIdentityUpdatesResponse".into()
594    }
595    fn type_url() -> ::prost::alloc::string::String {
596        "/xmtp.mls.api.v1.GetIdentityUpdatesResponse".into()
597    }
598}
599/// Pagination config for queries
600#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
601pub struct PagingInfo {
602    #[prost(enumeration = "SortDirection", tag = "1")]
603    pub direction: i32,
604    #[prost(uint32, tag = "2")]
605    pub limit: u32,
606    #[prost(uint64, tag = "3")]
607    pub id_cursor: u64,
608}
609impl ::prost::Name for PagingInfo {
610    const NAME: &'static str = "PagingInfo";
611    const PACKAGE: &'static str = "xmtp.mls.api.v1";
612    fn full_name() -> ::prost::alloc::string::String {
613        "xmtp.mls.api.v1.PagingInfo".into()
614    }
615    fn type_url() -> ::prost::alloc::string::String {
616        "/xmtp.mls.api.v1.PagingInfo".into()
617    }
618}
619/// Request for group message queries
620#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
621pub struct QueryGroupMessagesRequest {
622    #[prost(bytes = "vec", tag = "1")]
623    pub group_id: ::prost::alloc::vec::Vec<u8>,
624    #[prost(message, optional, tag = "2")]
625    pub paging_info: ::core::option::Option<PagingInfo>,
626}
627impl ::prost::Name for QueryGroupMessagesRequest {
628    const NAME: &'static str = "QueryGroupMessagesRequest";
629    const PACKAGE: &'static str = "xmtp.mls.api.v1";
630    fn full_name() -> ::prost::alloc::string::String {
631        "xmtp.mls.api.v1.QueryGroupMessagesRequest".into()
632    }
633    fn type_url() -> ::prost::alloc::string::String {
634        "/xmtp.mls.api.v1.QueryGroupMessagesRequest".into()
635    }
636}
637/// Response for group message queries
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct QueryGroupMessagesResponse {
640    #[prost(message, repeated, tag = "1")]
641    pub messages: ::prost::alloc::vec::Vec<GroupMessage>,
642    #[prost(message, optional, tag = "2")]
643    pub paging_info: ::core::option::Option<PagingInfo>,
644}
645impl ::prost::Name for QueryGroupMessagesResponse {
646    const NAME: &'static str = "QueryGroupMessagesResponse";
647    const PACKAGE: &'static str = "xmtp.mls.api.v1";
648    fn full_name() -> ::prost::alloc::string::String {
649        "xmtp.mls.api.v1.QueryGroupMessagesResponse".into()
650    }
651    fn type_url() -> ::prost::alloc::string::String {
652        "/xmtp.mls.api.v1.QueryGroupMessagesResponse".into()
653    }
654}
655/// Request for welcome message queries
656#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
657pub struct QueryWelcomeMessagesRequest {
658    #[prost(bytes = "vec", tag = "1")]
659    pub installation_key: ::prost::alloc::vec::Vec<u8>,
660    #[prost(message, optional, tag = "2")]
661    pub paging_info: ::core::option::Option<PagingInfo>,
662}
663impl ::prost::Name for QueryWelcomeMessagesRequest {
664    const NAME: &'static str = "QueryWelcomeMessagesRequest";
665    const PACKAGE: &'static str = "xmtp.mls.api.v1";
666    fn full_name() -> ::prost::alloc::string::String {
667        "xmtp.mls.api.v1.QueryWelcomeMessagesRequest".into()
668    }
669    fn type_url() -> ::prost::alloc::string::String {
670        "/xmtp.mls.api.v1.QueryWelcomeMessagesRequest".into()
671    }
672}
673/// Response for welcome message queries
674#[derive(Clone, PartialEq, ::prost::Message)]
675pub struct QueryWelcomeMessagesResponse {
676    #[prost(message, repeated, tag = "1")]
677    pub messages: ::prost::alloc::vec::Vec<WelcomeMessage>,
678    #[prost(message, optional, tag = "2")]
679    pub paging_info: ::core::option::Option<PagingInfo>,
680}
681impl ::prost::Name for QueryWelcomeMessagesResponse {
682    const NAME: &'static str = "QueryWelcomeMessagesResponse";
683    const PACKAGE: &'static str = "xmtp.mls.api.v1";
684    fn full_name() -> ::prost::alloc::string::String {
685        "xmtp.mls.api.v1.QueryWelcomeMessagesResponse".into()
686    }
687    fn type_url() -> ::prost::alloc::string::String {
688        "/xmtp.mls.api.v1.QueryWelcomeMessagesResponse".into()
689    }
690}
691/// Request for subscribing to group messages
692#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct SubscribeGroupMessagesRequest {
694    #[prost(message, repeated, tag = "1")]
695    pub filters: ::prost::alloc::vec::Vec<subscribe_group_messages_request::Filter>,
696}
697/// Nested message and enum types in `SubscribeGroupMessagesRequest`.
698pub mod subscribe_group_messages_request {
699    /// Subscription filter
700    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
701    pub struct Filter {
702        #[prost(bytes = "vec", tag = "1")]
703        pub group_id: ::prost::alloc::vec::Vec<u8>,
704        #[prost(uint64, tag = "2")]
705        pub id_cursor: u64,
706    }
707    impl ::prost::Name for Filter {
708        const NAME: &'static str = "Filter";
709        const PACKAGE: &'static str = "xmtp.mls.api.v1";
710        fn full_name() -> ::prost::alloc::string::String {
711            "xmtp.mls.api.v1.SubscribeGroupMessagesRequest.Filter".into()
712        }
713        fn type_url() -> ::prost::alloc::string::String {
714            "/xmtp.mls.api.v1.SubscribeGroupMessagesRequest.Filter".into()
715        }
716    }
717}
718impl ::prost::Name for SubscribeGroupMessagesRequest {
719    const NAME: &'static str = "SubscribeGroupMessagesRequest";
720    const PACKAGE: &'static str = "xmtp.mls.api.v1";
721    fn full_name() -> ::prost::alloc::string::String {
722        "xmtp.mls.api.v1.SubscribeGroupMessagesRequest".into()
723    }
724    fn type_url() -> ::prost::alloc::string::String {
725        "/xmtp.mls.api.v1.SubscribeGroupMessagesRequest".into()
726    }
727}
728/// Request for subscribing to welcome messages
729#[derive(Clone, PartialEq, ::prost::Message)]
730pub struct SubscribeWelcomeMessagesRequest {
731    #[prost(message, repeated, tag = "1")]
732    pub filters: ::prost::alloc::vec::Vec<subscribe_welcome_messages_request::Filter>,
733}
734/// Nested message and enum types in `SubscribeWelcomeMessagesRequest`.
735pub mod subscribe_welcome_messages_request {
736    /// Subscription filter
737    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
738    pub struct Filter {
739        #[prost(bytes = "vec", tag = "1")]
740        pub installation_key: ::prost::alloc::vec::Vec<u8>,
741        #[prost(uint64, tag = "2")]
742        pub id_cursor: u64,
743    }
744    impl ::prost::Name for Filter {
745        const NAME: &'static str = "Filter";
746        const PACKAGE: &'static str = "xmtp.mls.api.v1";
747        fn full_name() -> ::prost::alloc::string::String {
748            "xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.Filter".into()
749        }
750        fn type_url() -> ::prost::alloc::string::String {
751            "/xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.Filter".into()
752        }
753    }
754}
755impl ::prost::Name for SubscribeWelcomeMessagesRequest {
756    const NAME: &'static str = "SubscribeWelcomeMessagesRequest";
757    const PACKAGE: &'static str = "xmtp.mls.api.v1";
758    fn full_name() -> ::prost::alloc::string::String {
759        "xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest".into()
760    }
761    fn type_url() -> ::prost::alloc::string::String {
762        "/xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest".into()
763    }
764}
765#[derive(Clone, PartialEq, ::prost::Message)]
766pub struct BatchPublishCommitLogRequest {
767    #[prost(message, repeated, tag = "1")]
768    pub requests: ::prost::alloc::vec::Vec<PublishCommitLogRequest>,
769}
770impl ::prost::Name for BatchPublishCommitLogRequest {
771    const NAME: &'static str = "BatchPublishCommitLogRequest";
772    const PACKAGE: &'static str = "xmtp.mls.api.v1";
773    fn full_name() -> ::prost::alloc::string::String {
774        "xmtp.mls.api.v1.BatchPublishCommitLogRequest".into()
775    }
776    fn type_url() -> ::prost::alloc::string::String {
777        "/xmtp.mls.api.v1.BatchPublishCommitLogRequest".into()
778    }
779}
780#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
781pub struct PublishCommitLogRequest {
782    #[prost(bytes = "vec", tag = "1")]
783    pub group_id: ::prost::alloc::vec::Vec<u8>,
784    #[prost(bytes = "vec", tag = "2")]
785    pub serialized_commit_log_entry: ::prost::alloc::vec::Vec<u8>,
786    #[prost(message, optional, tag = "3")]
787    pub signature: ::core::option::Option<
788        super::super::super::identity::associations::RecoverableEd25519Signature,
789    >,
790}
791impl ::prost::Name for PublishCommitLogRequest {
792    const NAME: &'static str = "PublishCommitLogRequest";
793    const PACKAGE: &'static str = "xmtp.mls.api.v1";
794    fn full_name() -> ::prost::alloc::string::String {
795        "xmtp.mls.api.v1.PublishCommitLogRequest".into()
796    }
797    fn type_url() -> ::prost::alloc::string::String {
798        "/xmtp.mls.api.v1.PublishCommitLogRequest".into()
799    }
800}
801#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
802pub struct QueryCommitLogRequest {
803    #[prost(bytes = "vec", tag = "1")]
804    pub group_id: ::prost::alloc::vec::Vec<u8>,
805    #[prost(message, optional, tag = "2")]
806    pub paging_info: ::core::option::Option<PagingInfo>,
807}
808impl ::prost::Name for QueryCommitLogRequest {
809    const NAME: &'static str = "QueryCommitLogRequest";
810    const PACKAGE: &'static str = "xmtp.mls.api.v1";
811    fn full_name() -> ::prost::alloc::string::String {
812        "xmtp.mls.api.v1.QueryCommitLogRequest".into()
813    }
814    fn type_url() -> ::prost::alloc::string::String {
815        "/xmtp.mls.api.v1.QueryCommitLogRequest".into()
816    }
817}
818#[derive(Clone, PartialEq, ::prost::Message)]
819pub struct QueryCommitLogResponse {
820    #[prost(bytes = "vec", tag = "1")]
821    pub group_id: ::prost::alloc::vec::Vec<u8>,
822    #[prost(message, repeated, tag = "2")]
823    pub commit_log_entries: ::prost::alloc::vec::Vec<
824        super::super::message_contents::CommitLogEntry,
825    >,
826    #[prost(message, optional, tag = "3")]
827    pub paging_info: ::core::option::Option<PagingInfo>,
828}
829impl ::prost::Name for QueryCommitLogResponse {
830    const NAME: &'static str = "QueryCommitLogResponse";
831    const PACKAGE: &'static str = "xmtp.mls.api.v1";
832    fn full_name() -> ::prost::alloc::string::String {
833        "xmtp.mls.api.v1.QueryCommitLogResponse".into()
834    }
835    fn type_url() -> ::prost::alloc::string::String {
836        "/xmtp.mls.api.v1.QueryCommitLogResponse".into()
837    }
838}
839#[derive(Clone, PartialEq, ::prost::Message)]
840pub struct BatchQueryCommitLogRequest {
841    #[prost(message, repeated, tag = "1")]
842    pub requests: ::prost::alloc::vec::Vec<QueryCommitLogRequest>,
843}
844impl ::prost::Name for BatchQueryCommitLogRequest {
845    const NAME: &'static str = "BatchQueryCommitLogRequest";
846    const PACKAGE: &'static str = "xmtp.mls.api.v1";
847    fn full_name() -> ::prost::alloc::string::String {
848        "xmtp.mls.api.v1.BatchQueryCommitLogRequest".into()
849    }
850    fn type_url() -> ::prost::alloc::string::String {
851        "/xmtp.mls.api.v1.BatchQueryCommitLogRequest".into()
852    }
853}
854#[derive(Clone, PartialEq, ::prost::Message)]
855pub struct BatchQueryCommitLogResponse {
856    #[prost(message, repeated, tag = "1")]
857    pub responses: ::prost::alloc::vec::Vec<QueryCommitLogResponse>,
858}
859impl ::prost::Name for BatchQueryCommitLogResponse {
860    const NAME: &'static str = "BatchQueryCommitLogResponse";
861    const PACKAGE: &'static str = "xmtp.mls.api.v1";
862    fn full_name() -> ::prost::alloc::string::String {
863        "xmtp.mls.api.v1.BatchQueryCommitLogResponse".into()
864    }
865    fn type_url() -> ::prost::alloc::string::String {
866        "/xmtp.mls.api.v1.BatchQueryCommitLogResponse".into()
867    }
868}
869/// Request to get the newest group message from a range of topics
870#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
871pub struct GetNewestGroupMessageRequest {
872    /// Get the newest message from each of these topics
873    #[prost(bytes = "vec", repeated, tag = "1")]
874    pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
875    #[prost(bool, tag = "2")]
876    pub include_content: bool,
877}
878impl ::prost::Name for GetNewestGroupMessageRequest {
879    const NAME: &'static str = "GetNewestGroupMessageRequest";
880    const PACKAGE: &'static str = "xmtp.mls.api.v1";
881    fn full_name() -> ::prost::alloc::string::String {
882        "xmtp.mls.api.v1.GetNewestGroupMessageRequest".into()
883    }
884    fn type_url() -> ::prost::alloc::string::String {
885        "/xmtp.mls.api.v1.GetNewestGroupMessageRequest".into()
886    }
887}
888/// Returns a list of responses that will always be the same length as the
889/// request
890#[derive(Clone, PartialEq, ::prost::Message)]
891pub struct GetNewestGroupMessageResponse {
892    #[prost(message, repeated, tag = "1")]
893    pub responses: ::prost::alloc::vec::Vec<get_newest_group_message_response::Response>,
894}
895/// Nested message and enum types in `GetNewestGroupMessageResponse`.
896pub mod get_newest_group_message_response {
897    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
898    pub struct Response {
899        /// If no message is found on the topic, will be nil
900        #[prost(message, optional, tag = "1")]
901        pub group_message: ::core::option::Option<super::GroupMessage>,
902    }
903    impl ::prost::Name for Response {
904        const NAME: &'static str = "Response";
905        const PACKAGE: &'static str = "xmtp.mls.api.v1";
906        fn full_name() -> ::prost::alloc::string::String {
907            "xmtp.mls.api.v1.GetNewestGroupMessageResponse.Response".into()
908        }
909        fn type_url() -> ::prost::alloc::string::String {
910            "/xmtp.mls.api.v1.GetNewestGroupMessageResponse.Response".into()
911        }
912    }
913}
914impl ::prost::Name for GetNewestGroupMessageResponse {
915    const NAME: &'static str = "GetNewestGroupMessageResponse";
916    const PACKAGE: &'static str = "xmtp.mls.api.v1";
917    fn full_name() -> ::prost::alloc::string::String {
918        "xmtp.mls.api.v1.GetNewestGroupMessageResponse".into()
919    }
920    fn type_url() -> ::prost::alloc::string::String {
921        "/xmtp.mls.api.v1.GetNewestGroupMessageResponse".into()
922    }
923}
924/// Sort direction for queries
925#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
926#[repr(i32)]
927pub enum SortDirection {
928    Unspecified = 0,
929    Ascending = 1,
930    Descending = 2,
931}
932impl SortDirection {
933    /// String value of the enum field names used in the ProtoBuf definition.
934    ///
935    /// The values are not transformed in any way and thus are considered stable
936    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
937    pub fn as_str_name(&self) -> &'static str {
938        match self {
939            Self::Unspecified => "SORT_DIRECTION_UNSPECIFIED",
940            Self::Ascending => "SORT_DIRECTION_ASCENDING",
941            Self::Descending => "SORT_DIRECTION_DESCENDING",
942        }
943    }
944    /// Creates an enum from field names used in the ProtoBuf definition.
945    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
946        match value {
947            "SORT_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
948            "SORT_DIRECTION_ASCENDING" => Some(Self::Ascending),
949            "SORT_DIRECTION_DESCENDING" => Some(Self::Descending),
950            _ => None,
951        }
952    }
953}
954/// Generated server implementations.
955#[cfg(any(not(target_arch = "wasm32"), feature = "grpc_server_impls"))]
956pub mod mls_api_server {
957    #![allow(
958        unused_variables,
959        dead_code,
960        missing_docs,
961        clippy::wildcard_imports,
962        clippy::let_unit_value,
963    )]
964    use tonic::codegen::*;
965    /// Generated trait containing gRPC methods that should be implemented for use with MlsApiServer.
966    #[async_trait]
967    pub trait MlsApi: std::marker::Send + std::marker::Sync + 'static {
968        /// Send a MLS payload, that would be validated before being stored to the
969        /// network
970        async fn send_group_messages(
971            &self,
972            request: tonic::Request<super::SendGroupMessagesRequest>,
973        ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
974        /// Send a batch of welcome messages
975        async fn send_welcome_messages(
976            &self,
977            request: tonic::Request<super::SendWelcomeMessagesRequest>,
978        ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
979        /// Register a new installation, which would be validated before storage
980        async fn register_installation(
981            &self,
982            request: tonic::Request<super::RegisterInstallationRequest>,
983        ) -> std::result::Result<
984            tonic::Response<super::RegisterInstallationResponse>,
985            tonic::Status,
986        >;
987        /// Upload a new KeyPackage, which would be validated before storage
988        async fn upload_key_package(
989            &self,
990            request: tonic::Request<super::UploadKeyPackageRequest>,
991        ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
992        /// Get one or more Key Packages by installation_id
993        async fn fetch_key_packages(
994            &self,
995            request: tonic::Request<super::FetchKeyPackagesRequest>,
996        ) -> std::result::Result<
997            tonic::Response<super::FetchKeyPackagesResponse>,
998            tonic::Status,
999        >;
1000        /// Would delete all key packages associated with the installation and mark
1001        /// the installation as having been revoked
1002        async fn revoke_installation(
1003            &self,
1004            request: tonic::Request<super::RevokeInstallationRequest>,
1005        ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
1006        /// Used to check for changes related to members of a group.
1007        /// Would return an array of any new installations associated with the wallet
1008        /// address, and any revocations that have happened.
1009        async fn get_identity_updates(
1010            &self,
1011            request: tonic::Request<super::GetIdentityUpdatesRequest>,
1012        ) -> std::result::Result<
1013            tonic::Response<super::GetIdentityUpdatesResponse>,
1014            tonic::Status,
1015        >;
1016        /// Query stored group messages
1017        async fn query_group_messages(
1018            &self,
1019            request: tonic::Request<super::QueryGroupMessagesRequest>,
1020        ) -> std::result::Result<
1021            tonic::Response<super::QueryGroupMessagesResponse>,
1022            tonic::Status,
1023        >;
1024        /// Query stored group messages
1025        async fn query_welcome_messages(
1026            &self,
1027            request: tonic::Request<super::QueryWelcomeMessagesRequest>,
1028        ) -> std::result::Result<
1029            tonic::Response<super::QueryWelcomeMessagesResponse>,
1030            tonic::Status,
1031        >;
1032        /// Server streaming response type for the SubscribeGroupMessages method.
1033        type SubscribeGroupMessagesStream: tonic::codegen::tokio_stream::Stream<
1034                Item = std::result::Result<super::GroupMessage, tonic::Status>,
1035            >
1036            + std::marker::Send
1037            + 'static;
1038        /// Subscribe stream of new group messages
1039        async fn subscribe_group_messages(
1040            &self,
1041            request: tonic::Request<super::SubscribeGroupMessagesRequest>,
1042        ) -> std::result::Result<
1043            tonic::Response<Self::SubscribeGroupMessagesStream>,
1044            tonic::Status,
1045        >;
1046        /// Server streaming response type for the SubscribeWelcomeMessages method.
1047        type SubscribeWelcomeMessagesStream: tonic::codegen::tokio_stream::Stream<
1048                Item = std::result::Result<super::WelcomeMessage, tonic::Status>,
1049            >
1050            + std::marker::Send
1051            + 'static;
1052        /// Subscribe stream of new welcome messages
1053        async fn subscribe_welcome_messages(
1054            &self,
1055            request: tonic::Request<super::SubscribeWelcomeMessagesRequest>,
1056        ) -> std::result::Result<
1057            tonic::Response<Self::SubscribeWelcomeMessagesStream>,
1058            tonic::Status,
1059        >;
1060        async fn batch_publish_commit_log(
1061            &self,
1062            request: tonic::Request<super::BatchPublishCommitLogRequest>,
1063        ) -> std::result::Result<tonic::Response<::pbjson_types::Empty>, tonic::Status>;
1064        async fn batch_query_commit_log(
1065            &self,
1066            request: tonic::Request<super::BatchQueryCommitLogRequest>,
1067        ) -> std::result::Result<
1068            tonic::Response<super::BatchQueryCommitLogResponse>,
1069            tonic::Status,
1070        >;
1071        async fn get_newest_group_message(
1072            &self,
1073            request: tonic::Request<super::GetNewestGroupMessageRequest>,
1074        ) -> std::result::Result<
1075            tonic::Response<super::GetNewestGroupMessageResponse>,
1076            tonic::Status,
1077        >;
1078    }
1079    /// RPCs for the new MLS API
1080    #[derive(Debug)]
1081    pub struct MlsApiServer<T> {
1082        inner: Arc<T>,
1083        accept_compression_encodings: EnabledCompressionEncodings,
1084        send_compression_encodings: EnabledCompressionEncodings,
1085        max_decoding_message_size: Option<usize>,
1086        max_encoding_message_size: Option<usize>,
1087    }
1088    impl<T> MlsApiServer<T> {
1089        pub fn new(inner: T) -> Self {
1090            Self::from_arc(Arc::new(inner))
1091        }
1092        pub fn from_arc(inner: Arc<T>) -> Self {
1093            Self {
1094                inner,
1095                accept_compression_encodings: Default::default(),
1096                send_compression_encodings: Default::default(),
1097                max_decoding_message_size: None,
1098                max_encoding_message_size: None,
1099            }
1100        }
1101        pub fn with_interceptor<F>(
1102            inner: T,
1103            interceptor: F,
1104        ) -> InterceptedService<Self, F>
1105        where
1106            F: tonic::service::Interceptor,
1107        {
1108            InterceptedService::new(Self::new(inner), interceptor)
1109        }
1110        /// Enable decompressing requests with the given encoding.
1111        #[must_use]
1112        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1113            self.accept_compression_encodings.enable(encoding);
1114            self
1115        }
1116        /// Compress responses with the given encoding, if the client supports it.
1117        #[must_use]
1118        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1119            self.send_compression_encodings.enable(encoding);
1120            self
1121        }
1122        /// Limits the maximum size of a decoded message.
1123        ///
1124        /// Default: `4MB`
1125        #[must_use]
1126        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1127            self.max_decoding_message_size = Some(limit);
1128            self
1129        }
1130        /// Limits the maximum size of an encoded message.
1131        ///
1132        /// Default: `usize::MAX`
1133        #[must_use]
1134        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1135            self.max_encoding_message_size = Some(limit);
1136            self
1137        }
1138    }
1139    impl<T, B> tonic::codegen::Service<http::Request<B>> for MlsApiServer<T>
1140    where
1141        T: MlsApi,
1142        B: Body + std::marker::Send + 'static,
1143        B::Error: Into<StdError> + std::marker::Send + 'static,
1144    {
1145        type Response = http::Response<tonic::body::Body>;
1146        type Error = std::convert::Infallible;
1147        type Future = BoxFuture<Self::Response, Self::Error>;
1148        fn poll_ready(
1149            &mut self,
1150            _cx: &mut Context<'_>,
1151        ) -> Poll<std::result::Result<(), Self::Error>> {
1152            Poll::Ready(Ok(()))
1153        }
1154        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1155            match req.uri().path() {
1156                "/xmtp.mls.api.v1.MlsApi/SendGroupMessages" => {
1157                    #[allow(non_camel_case_types)]
1158                    struct SendGroupMessagesSvc<T: MlsApi>(pub Arc<T>);
1159                    impl<
1160                        T: MlsApi,
1161                    > tonic::server::UnaryService<super::SendGroupMessagesRequest>
1162                    for SendGroupMessagesSvc<T> {
1163                        type Response = ::pbjson_types::Empty;
1164                        type Future = BoxFuture<
1165                            tonic::Response<Self::Response>,
1166                            tonic::Status,
1167                        >;
1168                        fn call(
1169                            &mut self,
1170                            request: tonic::Request<super::SendGroupMessagesRequest>,
1171                        ) -> Self::Future {
1172                            let inner = Arc::clone(&self.0);
1173                            let fut = async move {
1174                                <T as MlsApi>::send_group_messages(&inner, request).await
1175                            };
1176                            Box::pin(fut)
1177                        }
1178                    }
1179                    let accept_compression_encodings = self.accept_compression_encodings;
1180                    let send_compression_encodings = self.send_compression_encodings;
1181                    let max_decoding_message_size = self.max_decoding_message_size;
1182                    let max_encoding_message_size = self.max_encoding_message_size;
1183                    let inner = self.inner.clone();
1184                    let fut = async move {
1185                        let method = SendGroupMessagesSvc(inner);
1186                        let codec = tonic_prost::ProstCodec::default();
1187                        let mut grpc = tonic::server::Grpc::new(codec)
1188                            .apply_compression_config(
1189                                accept_compression_encodings,
1190                                send_compression_encodings,
1191                            )
1192                            .apply_max_message_size_config(
1193                                max_decoding_message_size,
1194                                max_encoding_message_size,
1195                            );
1196                        let res = grpc.unary(method, req).await;
1197                        Ok(res)
1198                    };
1199                    Box::pin(fut)
1200                }
1201                "/xmtp.mls.api.v1.MlsApi/SendWelcomeMessages" => {
1202                    #[allow(non_camel_case_types)]
1203                    struct SendWelcomeMessagesSvc<T: MlsApi>(pub Arc<T>);
1204                    impl<
1205                        T: MlsApi,
1206                    > tonic::server::UnaryService<super::SendWelcomeMessagesRequest>
1207                    for SendWelcomeMessagesSvc<T> {
1208                        type Response = ::pbjson_types::Empty;
1209                        type Future = BoxFuture<
1210                            tonic::Response<Self::Response>,
1211                            tonic::Status,
1212                        >;
1213                        fn call(
1214                            &mut self,
1215                            request: tonic::Request<super::SendWelcomeMessagesRequest>,
1216                        ) -> Self::Future {
1217                            let inner = Arc::clone(&self.0);
1218                            let fut = async move {
1219                                <T as MlsApi>::send_welcome_messages(&inner, request).await
1220                            };
1221                            Box::pin(fut)
1222                        }
1223                    }
1224                    let accept_compression_encodings = self.accept_compression_encodings;
1225                    let send_compression_encodings = self.send_compression_encodings;
1226                    let max_decoding_message_size = self.max_decoding_message_size;
1227                    let max_encoding_message_size = self.max_encoding_message_size;
1228                    let inner = self.inner.clone();
1229                    let fut = async move {
1230                        let method = SendWelcomeMessagesSvc(inner);
1231                        let codec = tonic_prost::ProstCodec::default();
1232                        let mut grpc = tonic::server::Grpc::new(codec)
1233                            .apply_compression_config(
1234                                accept_compression_encodings,
1235                                send_compression_encodings,
1236                            )
1237                            .apply_max_message_size_config(
1238                                max_decoding_message_size,
1239                                max_encoding_message_size,
1240                            );
1241                        let res = grpc.unary(method, req).await;
1242                        Ok(res)
1243                    };
1244                    Box::pin(fut)
1245                }
1246                "/xmtp.mls.api.v1.MlsApi/RegisterInstallation" => {
1247                    #[allow(non_camel_case_types)]
1248                    struct RegisterInstallationSvc<T: MlsApi>(pub Arc<T>);
1249                    impl<
1250                        T: MlsApi,
1251                    > tonic::server::UnaryService<super::RegisterInstallationRequest>
1252                    for RegisterInstallationSvc<T> {
1253                        type Response = super::RegisterInstallationResponse;
1254                        type Future = BoxFuture<
1255                            tonic::Response<Self::Response>,
1256                            tonic::Status,
1257                        >;
1258                        fn call(
1259                            &mut self,
1260                            request: tonic::Request<super::RegisterInstallationRequest>,
1261                        ) -> Self::Future {
1262                            let inner = Arc::clone(&self.0);
1263                            let fut = async move {
1264                                <T as MlsApi>::register_installation(&inner, request).await
1265                            };
1266                            Box::pin(fut)
1267                        }
1268                    }
1269                    let accept_compression_encodings = self.accept_compression_encodings;
1270                    let send_compression_encodings = self.send_compression_encodings;
1271                    let max_decoding_message_size = self.max_decoding_message_size;
1272                    let max_encoding_message_size = self.max_encoding_message_size;
1273                    let inner = self.inner.clone();
1274                    let fut = async move {
1275                        let method = RegisterInstallationSvc(inner);
1276                        let codec = tonic_prost::ProstCodec::default();
1277                        let mut grpc = tonic::server::Grpc::new(codec)
1278                            .apply_compression_config(
1279                                accept_compression_encodings,
1280                                send_compression_encodings,
1281                            )
1282                            .apply_max_message_size_config(
1283                                max_decoding_message_size,
1284                                max_encoding_message_size,
1285                            );
1286                        let res = grpc.unary(method, req).await;
1287                        Ok(res)
1288                    };
1289                    Box::pin(fut)
1290                }
1291                "/xmtp.mls.api.v1.MlsApi/UploadKeyPackage" => {
1292                    #[allow(non_camel_case_types)]
1293                    struct UploadKeyPackageSvc<T: MlsApi>(pub Arc<T>);
1294                    impl<
1295                        T: MlsApi,
1296                    > tonic::server::UnaryService<super::UploadKeyPackageRequest>
1297                    for UploadKeyPackageSvc<T> {
1298                        type Response = ::pbjson_types::Empty;
1299                        type Future = BoxFuture<
1300                            tonic::Response<Self::Response>,
1301                            tonic::Status,
1302                        >;
1303                        fn call(
1304                            &mut self,
1305                            request: tonic::Request<super::UploadKeyPackageRequest>,
1306                        ) -> Self::Future {
1307                            let inner = Arc::clone(&self.0);
1308                            let fut = async move {
1309                                <T as MlsApi>::upload_key_package(&inner, request).await
1310                            };
1311                            Box::pin(fut)
1312                        }
1313                    }
1314                    let accept_compression_encodings = self.accept_compression_encodings;
1315                    let send_compression_encodings = self.send_compression_encodings;
1316                    let max_decoding_message_size = self.max_decoding_message_size;
1317                    let max_encoding_message_size = self.max_encoding_message_size;
1318                    let inner = self.inner.clone();
1319                    let fut = async move {
1320                        let method = UploadKeyPackageSvc(inner);
1321                        let codec = tonic_prost::ProstCodec::default();
1322                        let mut grpc = tonic::server::Grpc::new(codec)
1323                            .apply_compression_config(
1324                                accept_compression_encodings,
1325                                send_compression_encodings,
1326                            )
1327                            .apply_max_message_size_config(
1328                                max_decoding_message_size,
1329                                max_encoding_message_size,
1330                            );
1331                        let res = grpc.unary(method, req).await;
1332                        Ok(res)
1333                    };
1334                    Box::pin(fut)
1335                }
1336                "/xmtp.mls.api.v1.MlsApi/FetchKeyPackages" => {
1337                    #[allow(non_camel_case_types)]
1338                    struct FetchKeyPackagesSvc<T: MlsApi>(pub Arc<T>);
1339                    impl<
1340                        T: MlsApi,
1341                    > tonic::server::UnaryService<super::FetchKeyPackagesRequest>
1342                    for FetchKeyPackagesSvc<T> {
1343                        type Response = super::FetchKeyPackagesResponse;
1344                        type Future = BoxFuture<
1345                            tonic::Response<Self::Response>,
1346                            tonic::Status,
1347                        >;
1348                        fn call(
1349                            &mut self,
1350                            request: tonic::Request<super::FetchKeyPackagesRequest>,
1351                        ) -> Self::Future {
1352                            let inner = Arc::clone(&self.0);
1353                            let fut = async move {
1354                                <T as MlsApi>::fetch_key_packages(&inner, request).await
1355                            };
1356                            Box::pin(fut)
1357                        }
1358                    }
1359                    let accept_compression_encodings = self.accept_compression_encodings;
1360                    let send_compression_encodings = self.send_compression_encodings;
1361                    let max_decoding_message_size = self.max_decoding_message_size;
1362                    let max_encoding_message_size = self.max_encoding_message_size;
1363                    let inner = self.inner.clone();
1364                    let fut = async move {
1365                        let method = FetchKeyPackagesSvc(inner);
1366                        let codec = tonic_prost::ProstCodec::default();
1367                        let mut grpc = tonic::server::Grpc::new(codec)
1368                            .apply_compression_config(
1369                                accept_compression_encodings,
1370                                send_compression_encodings,
1371                            )
1372                            .apply_max_message_size_config(
1373                                max_decoding_message_size,
1374                                max_encoding_message_size,
1375                            );
1376                        let res = grpc.unary(method, req).await;
1377                        Ok(res)
1378                    };
1379                    Box::pin(fut)
1380                }
1381                "/xmtp.mls.api.v1.MlsApi/RevokeInstallation" => {
1382                    #[allow(non_camel_case_types)]
1383                    struct RevokeInstallationSvc<T: MlsApi>(pub Arc<T>);
1384                    impl<
1385                        T: MlsApi,
1386                    > tonic::server::UnaryService<super::RevokeInstallationRequest>
1387                    for RevokeInstallationSvc<T> {
1388                        type Response = ::pbjson_types::Empty;
1389                        type Future = BoxFuture<
1390                            tonic::Response<Self::Response>,
1391                            tonic::Status,
1392                        >;
1393                        fn call(
1394                            &mut self,
1395                            request: tonic::Request<super::RevokeInstallationRequest>,
1396                        ) -> Self::Future {
1397                            let inner = Arc::clone(&self.0);
1398                            let fut = async move {
1399                                <T as MlsApi>::revoke_installation(&inner, request).await
1400                            };
1401                            Box::pin(fut)
1402                        }
1403                    }
1404                    let accept_compression_encodings = self.accept_compression_encodings;
1405                    let send_compression_encodings = self.send_compression_encodings;
1406                    let max_decoding_message_size = self.max_decoding_message_size;
1407                    let max_encoding_message_size = self.max_encoding_message_size;
1408                    let inner = self.inner.clone();
1409                    let fut = async move {
1410                        let method = RevokeInstallationSvc(inner);
1411                        let codec = tonic_prost::ProstCodec::default();
1412                        let mut grpc = tonic::server::Grpc::new(codec)
1413                            .apply_compression_config(
1414                                accept_compression_encodings,
1415                                send_compression_encodings,
1416                            )
1417                            .apply_max_message_size_config(
1418                                max_decoding_message_size,
1419                                max_encoding_message_size,
1420                            );
1421                        let res = grpc.unary(method, req).await;
1422                        Ok(res)
1423                    };
1424                    Box::pin(fut)
1425                }
1426                "/xmtp.mls.api.v1.MlsApi/GetIdentityUpdates" => {
1427                    #[allow(non_camel_case_types)]
1428                    struct GetIdentityUpdatesSvc<T: MlsApi>(pub Arc<T>);
1429                    impl<
1430                        T: MlsApi,
1431                    > tonic::server::UnaryService<super::GetIdentityUpdatesRequest>
1432                    for GetIdentityUpdatesSvc<T> {
1433                        type Response = super::GetIdentityUpdatesResponse;
1434                        type Future = BoxFuture<
1435                            tonic::Response<Self::Response>,
1436                            tonic::Status,
1437                        >;
1438                        fn call(
1439                            &mut self,
1440                            request: tonic::Request<super::GetIdentityUpdatesRequest>,
1441                        ) -> Self::Future {
1442                            let inner = Arc::clone(&self.0);
1443                            let fut = async move {
1444                                <T as MlsApi>::get_identity_updates(&inner, request).await
1445                            };
1446                            Box::pin(fut)
1447                        }
1448                    }
1449                    let accept_compression_encodings = self.accept_compression_encodings;
1450                    let send_compression_encodings = self.send_compression_encodings;
1451                    let max_decoding_message_size = self.max_decoding_message_size;
1452                    let max_encoding_message_size = self.max_encoding_message_size;
1453                    let inner = self.inner.clone();
1454                    let fut = async move {
1455                        let method = GetIdentityUpdatesSvc(inner);
1456                        let codec = tonic_prost::ProstCodec::default();
1457                        let mut grpc = tonic::server::Grpc::new(codec)
1458                            .apply_compression_config(
1459                                accept_compression_encodings,
1460                                send_compression_encodings,
1461                            )
1462                            .apply_max_message_size_config(
1463                                max_decoding_message_size,
1464                                max_encoding_message_size,
1465                            );
1466                        let res = grpc.unary(method, req).await;
1467                        Ok(res)
1468                    };
1469                    Box::pin(fut)
1470                }
1471                "/xmtp.mls.api.v1.MlsApi/QueryGroupMessages" => {
1472                    #[allow(non_camel_case_types)]
1473                    struct QueryGroupMessagesSvc<T: MlsApi>(pub Arc<T>);
1474                    impl<
1475                        T: MlsApi,
1476                    > tonic::server::UnaryService<super::QueryGroupMessagesRequest>
1477                    for QueryGroupMessagesSvc<T> {
1478                        type Response = super::QueryGroupMessagesResponse;
1479                        type Future = BoxFuture<
1480                            tonic::Response<Self::Response>,
1481                            tonic::Status,
1482                        >;
1483                        fn call(
1484                            &mut self,
1485                            request: tonic::Request<super::QueryGroupMessagesRequest>,
1486                        ) -> Self::Future {
1487                            let inner = Arc::clone(&self.0);
1488                            let fut = async move {
1489                                <T as MlsApi>::query_group_messages(&inner, request).await
1490                            };
1491                            Box::pin(fut)
1492                        }
1493                    }
1494                    let accept_compression_encodings = self.accept_compression_encodings;
1495                    let send_compression_encodings = self.send_compression_encodings;
1496                    let max_decoding_message_size = self.max_decoding_message_size;
1497                    let max_encoding_message_size = self.max_encoding_message_size;
1498                    let inner = self.inner.clone();
1499                    let fut = async move {
1500                        let method = QueryGroupMessagesSvc(inner);
1501                        let codec = tonic_prost::ProstCodec::default();
1502                        let mut grpc = tonic::server::Grpc::new(codec)
1503                            .apply_compression_config(
1504                                accept_compression_encodings,
1505                                send_compression_encodings,
1506                            )
1507                            .apply_max_message_size_config(
1508                                max_decoding_message_size,
1509                                max_encoding_message_size,
1510                            );
1511                        let res = grpc.unary(method, req).await;
1512                        Ok(res)
1513                    };
1514                    Box::pin(fut)
1515                }
1516                "/xmtp.mls.api.v1.MlsApi/QueryWelcomeMessages" => {
1517                    #[allow(non_camel_case_types)]
1518                    struct QueryWelcomeMessagesSvc<T: MlsApi>(pub Arc<T>);
1519                    impl<
1520                        T: MlsApi,
1521                    > tonic::server::UnaryService<super::QueryWelcomeMessagesRequest>
1522                    for QueryWelcomeMessagesSvc<T> {
1523                        type Response = super::QueryWelcomeMessagesResponse;
1524                        type Future = BoxFuture<
1525                            tonic::Response<Self::Response>,
1526                            tonic::Status,
1527                        >;
1528                        fn call(
1529                            &mut self,
1530                            request: tonic::Request<super::QueryWelcomeMessagesRequest>,
1531                        ) -> Self::Future {
1532                            let inner = Arc::clone(&self.0);
1533                            let fut = async move {
1534                                <T as MlsApi>::query_welcome_messages(&inner, request).await
1535                            };
1536                            Box::pin(fut)
1537                        }
1538                    }
1539                    let accept_compression_encodings = self.accept_compression_encodings;
1540                    let send_compression_encodings = self.send_compression_encodings;
1541                    let max_decoding_message_size = self.max_decoding_message_size;
1542                    let max_encoding_message_size = self.max_encoding_message_size;
1543                    let inner = self.inner.clone();
1544                    let fut = async move {
1545                        let method = QueryWelcomeMessagesSvc(inner);
1546                        let codec = tonic_prost::ProstCodec::default();
1547                        let mut grpc = tonic::server::Grpc::new(codec)
1548                            .apply_compression_config(
1549                                accept_compression_encodings,
1550                                send_compression_encodings,
1551                            )
1552                            .apply_max_message_size_config(
1553                                max_decoding_message_size,
1554                                max_encoding_message_size,
1555                            );
1556                        let res = grpc.unary(method, req).await;
1557                        Ok(res)
1558                    };
1559                    Box::pin(fut)
1560                }
1561                "/xmtp.mls.api.v1.MlsApi/SubscribeGroupMessages" => {
1562                    #[allow(non_camel_case_types)]
1563                    struct SubscribeGroupMessagesSvc<T: MlsApi>(pub Arc<T>);
1564                    impl<
1565                        T: MlsApi,
1566                    > tonic::server::ServerStreamingService<
1567                        super::SubscribeGroupMessagesRequest,
1568                    > for SubscribeGroupMessagesSvc<T> {
1569                        type Response = super::GroupMessage;
1570                        type ResponseStream = T::SubscribeGroupMessagesStream;
1571                        type Future = BoxFuture<
1572                            tonic::Response<Self::ResponseStream>,
1573                            tonic::Status,
1574                        >;
1575                        fn call(
1576                            &mut self,
1577                            request: tonic::Request<super::SubscribeGroupMessagesRequest>,
1578                        ) -> Self::Future {
1579                            let inner = Arc::clone(&self.0);
1580                            let fut = async move {
1581                                <T as MlsApi>::subscribe_group_messages(&inner, request)
1582                                    .await
1583                            };
1584                            Box::pin(fut)
1585                        }
1586                    }
1587                    let accept_compression_encodings = self.accept_compression_encodings;
1588                    let send_compression_encodings = self.send_compression_encodings;
1589                    let max_decoding_message_size = self.max_decoding_message_size;
1590                    let max_encoding_message_size = self.max_encoding_message_size;
1591                    let inner = self.inner.clone();
1592                    let fut = async move {
1593                        let method = SubscribeGroupMessagesSvc(inner);
1594                        let codec = tonic_prost::ProstCodec::default();
1595                        let mut grpc = tonic::server::Grpc::new(codec)
1596                            .apply_compression_config(
1597                                accept_compression_encodings,
1598                                send_compression_encodings,
1599                            )
1600                            .apply_max_message_size_config(
1601                                max_decoding_message_size,
1602                                max_encoding_message_size,
1603                            );
1604                        let res = grpc.server_streaming(method, req).await;
1605                        Ok(res)
1606                    };
1607                    Box::pin(fut)
1608                }
1609                "/xmtp.mls.api.v1.MlsApi/SubscribeWelcomeMessages" => {
1610                    #[allow(non_camel_case_types)]
1611                    struct SubscribeWelcomeMessagesSvc<T: MlsApi>(pub Arc<T>);
1612                    impl<
1613                        T: MlsApi,
1614                    > tonic::server::ServerStreamingService<
1615                        super::SubscribeWelcomeMessagesRequest,
1616                    > for SubscribeWelcomeMessagesSvc<T> {
1617                        type Response = super::WelcomeMessage;
1618                        type ResponseStream = T::SubscribeWelcomeMessagesStream;
1619                        type Future = BoxFuture<
1620                            tonic::Response<Self::ResponseStream>,
1621                            tonic::Status,
1622                        >;
1623                        fn call(
1624                            &mut self,
1625                            request: tonic::Request<
1626                                super::SubscribeWelcomeMessagesRequest,
1627                            >,
1628                        ) -> Self::Future {
1629                            let inner = Arc::clone(&self.0);
1630                            let fut = async move {
1631                                <T as MlsApi>::subscribe_welcome_messages(&inner, request)
1632                                    .await
1633                            };
1634                            Box::pin(fut)
1635                        }
1636                    }
1637                    let accept_compression_encodings = self.accept_compression_encodings;
1638                    let send_compression_encodings = self.send_compression_encodings;
1639                    let max_decoding_message_size = self.max_decoding_message_size;
1640                    let max_encoding_message_size = self.max_encoding_message_size;
1641                    let inner = self.inner.clone();
1642                    let fut = async move {
1643                        let method = SubscribeWelcomeMessagesSvc(inner);
1644                        let codec = tonic_prost::ProstCodec::default();
1645                        let mut grpc = tonic::server::Grpc::new(codec)
1646                            .apply_compression_config(
1647                                accept_compression_encodings,
1648                                send_compression_encodings,
1649                            )
1650                            .apply_max_message_size_config(
1651                                max_decoding_message_size,
1652                                max_encoding_message_size,
1653                            );
1654                        let res = grpc.server_streaming(method, req).await;
1655                        Ok(res)
1656                    };
1657                    Box::pin(fut)
1658                }
1659                "/xmtp.mls.api.v1.MlsApi/BatchPublishCommitLog" => {
1660                    #[allow(non_camel_case_types)]
1661                    struct BatchPublishCommitLogSvc<T: MlsApi>(pub Arc<T>);
1662                    impl<
1663                        T: MlsApi,
1664                    > tonic::server::UnaryService<super::BatchPublishCommitLogRequest>
1665                    for BatchPublishCommitLogSvc<T> {
1666                        type Response = ::pbjson_types::Empty;
1667                        type Future = BoxFuture<
1668                            tonic::Response<Self::Response>,
1669                            tonic::Status,
1670                        >;
1671                        fn call(
1672                            &mut self,
1673                            request: tonic::Request<super::BatchPublishCommitLogRequest>,
1674                        ) -> Self::Future {
1675                            let inner = Arc::clone(&self.0);
1676                            let fut = async move {
1677                                <T as MlsApi>::batch_publish_commit_log(&inner, request)
1678                                    .await
1679                            };
1680                            Box::pin(fut)
1681                        }
1682                    }
1683                    let accept_compression_encodings = self.accept_compression_encodings;
1684                    let send_compression_encodings = self.send_compression_encodings;
1685                    let max_decoding_message_size = self.max_decoding_message_size;
1686                    let max_encoding_message_size = self.max_encoding_message_size;
1687                    let inner = self.inner.clone();
1688                    let fut = async move {
1689                        let method = BatchPublishCommitLogSvc(inner);
1690                        let codec = tonic_prost::ProstCodec::default();
1691                        let mut grpc = tonic::server::Grpc::new(codec)
1692                            .apply_compression_config(
1693                                accept_compression_encodings,
1694                                send_compression_encodings,
1695                            )
1696                            .apply_max_message_size_config(
1697                                max_decoding_message_size,
1698                                max_encoding_message_size,
1699                            );
1700                        let res = grpc.unary(method, req).await;
1701                        Ok(res)
1702                    };
1703                    Box::pin(fut)
1704                }
1705                "/xmtp.mls.api.v1.MlsApi/BatchQueryCommitLog" => {
1706                    #[allow(non_camel_case_types)]
1707                    struct BatchQueryCommitLogSvc<T: MlsApi>(pub Arc<T>);
1708                    impl<
1709                        T: MlsApi,
1710                    > tonic::server::UnaryService<super::BatchQueryCommitLogRequest>
1711                    for BatchQueryCommitLogSvc<T> {
1712                        type Response = super::BatchQueryCommitLogResponse;
1713                        type Future = BoxFuture<
1714                            tonic::Response<Self::Response>,
1715                            tonic::Status,
1716                        >;
1717                        fn call(
1718                            &mut self,
1719                            request: tonic::Request<super::BatchQueryCommitLogRequest>,
1720                        ) -> Self::Future {
1721                            let inner = Arc::clone(&self.0);
1722                            let fut = async move {
1723                                <T as MlsApi>::batch_query_commit_log(&inner, request).await
1724                            };
1725                            Box::pin(fut)
1726                        }
1727                    }
1728                    let accept_compression_encodings = self.accept_compression_encodings;
1729                    let send_compression_encodings = self.send_compression_encodings;
1730                    let max_decoding_message_size = self.max_decoding_message_size;
1731                    let max_encoding_message_size = self.max_encoding_message_size;
1732                    let inner = self.inner.clone();
1733                    let fut = async move {
1734                        let method = BatchQueryCommitLogSvc(inner);
1735                        let codec = tonic_prost::ProstCodec::default();
1736                        let mut grpc = tonic::server::Grpc::new(codec)
1737                            .apply_compression_config(
1738                                accept_compression_encodings,
1739                                send_compression_encodings,
1740                            )
1741                            .apply_max_message_size_config(
1742                                max_decoding_message_size,
1743                                max_encoding_message_size,
1744                            );
1745                        let res = grpc.unary(method, req).await;
1746                        Ok(res)
1747                    };
1748                    Box::pin(fut)
1749                }
1750                "/xmtp.mls.api.v1.MlsApi/GetNewestGroupMessage" => {
1751                    #[allow(non_camel_case_types)]
1752                    struct GetNewestGroupMessageSvc<T: MlsApi>(pub Arc<T>);
1753                    impl<
1754                        T: MlsApi,
1755                    > tonic::server::UnaryService<super::GetNewestGroupMessageRequest>
1756                    for GetNewestGroupMessageSvc<T> {
1757                        type Response = super::GetNewestGroupMessageResponse;
1758                        type Future = BoxFuture<
1759                            tonic::Response<Self::Response>,
1760                            tonic::Status,
1761                        >;
1762                        fn call(
1763                            &mut self,
1764                            request: tonic::Request<super::GetNewestGroupMessageRequest>,
1765                        ) -> Self::Future {
1766                            let inner = Arc::clone(&self.0);
1767                            let fut = async move {
1768                                <T as MlsApi>::get_newest_group_message(&inner, request)
1769                                    .await
1770                            };
1771                            Box::pin(fut)
1772                        }
1773                    }
1774                    let accept_compression_encodings = self.accept_compression_encodings;
1775                    let send_compression_encodings = self.send_compression_encodings;
1776                    let max_decoding_message_size = self.max_decoding_message_size;
1777                    let max_encoding_message_size = self.max_encoding_message_size;
1778                    let inner = self.inner.clone();
1779                    let fut = async move {
1780                        let method = GetNewestGroupMessageSvc(inner);
1781                        let codec = tonic_prost::ProstCodec::default();
1782                        let mut grpc = tonic::server::Grpc::new(codec)
1783                            .apply_compression_config(
1784                                accept_compression_encodings,
1785                                send_compression_encodings,
1786                            )
1787                            .apply_max_message_size_config(
1788                                max_decoding_message_size,
1789                                max_encoding_message_size,
1790                            );
1791                        let res = grpc.unary(method, req).await;
1792                        Ok(res)
1793                    };
1794                    Box::pin(fut)
1795                }
1796                _ => {
1797                    Box::pin(async move {
1798                        let mut response = http::Response::new(
1799                            tonic::body::Body::default(),
1800                        );
1801                        let headers = response.headers_mut();
1802                        headers
1803                            .insert(
1804                                tonic::Status::GRPC_STATUS,
1805                                (tonic::Code::Unimplemented as i32).into(),
1806                            );
1807                        headers
1808                            .insert(
1809                                http::header::CONTENT_TYPE,
1810                                tonic::metadata::GRPC_CONTENT_TYPE,
1811                            );
1812                        Ok(response)
1813                    })
1814                }
1815            }
1816        }
1817    }
1818    impl<T> Clone for MlsApiServer<T> {
1819        fn clone(&self) -> Self {
1820            let inner = self.inner.clone();
1821            Self {
1822                inner,
1823                accept_compression_encodings: self.accept_compression_encodings,
1824                send_compression_encodings: self.send_compression_encodings,
1825                max_decoding_message_size: self.max_decoding_message_size,
1826                max_encoding_message_size: self.max_encoding_message_size,
1827            }
1828        }
1829    }
1830    /// Generated gRPC service name
1831    pub const SERVICE_NAME: &str = "xmtp.mls.api.v1.MlsApi";
1832    impl<T> tonic::server::NamedService for MlsApiServer<T> {
1833        const NAME: &'static str = SERVICE_NAME;
1834    }
1835}