Skip to main content

xmtp_proto/gen/
xmtp.mls.message_contents.rs

1// This file is @generated by prost-build.
2/// PlaintextCommitLogEntry indicates whether a commit was successful or not,
3/// when applied on top of the indicated `last_epoch_authenticator`.
4#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5pub struct PlaintextCommitLogEntry {
6    /// The group_id of the group that the commit belongs to.
7    #[prost(bytes = "vec", tag = "1")]
8    pub group_id: ::prost::alloc::vec::Vec<u8>,
9    /// The sequence ID of the commit payload being validated.
10    #[prost(uint64, tag = "2")]
11    pub commit_sequence_id: u64,
12    /// The encryption state before the commit was applied.
13    #[prost(bytes = "vec", tag = "3")]
14    pub last_epoch_authenticator: ::prost::alloc::vec::Vec<u8>,
15    /// Indicates whether the commit was successful, or why it failed.
16    #[prost(enumeration = "CommitResult", tag = "4")]
17    pub commit_result: i32,
18    /// The epoch number after the commit was applied, if successful.
19    #[prost(uint64, tag = "5")]
20    pub applied_epoch_number: u64,
21    /// The encryption state after the commit was applied, if successful.
22    #[prost(bytes = "vec", tag = "6")]
23    pub applied_epoch_authenticator: ::prost::alloc::vec::Vec<u8>,
24}
25impl ::prost::Name for PlaintextCommitLogEntry {
26    const NAME: &'static str = "PlaintextCommitLogEntry";
27    const PACKAGE: &'static str = "xmtp.mls.message_contents";
28    fn full_name() -> ::prost::alloc::string::String {
29        "xmtp.mls.message_contents.PlaintextCommitLogEntry".into()
30    }
31    fn type_url() -> ::prost::alloc::string::String {
32        "/xmtp.mls.message_contents.PlaintextCommitLogEntry".into()
33    }
34}
35#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
36pub struct CommitLogEntry {
37    #[prost(uint64, tag = "1")]
38    pub sequence_id: u64,
39    #[prost(bytes = "vec", tag = "2")]
40    pub serialized_commit_log_entry: ::prost::alloc::vec::Vec<u8>,
41    #[prost(message, optional, tag = "3")]
42    pub signature: ::core::option::Option<
43        super::super::identity::associations::RecoverableEd25519Signature,
44    >,
45}
46impl ::prost::Name for CommitLogEntry {
47    const NAME: &'static str = "CommitLogEntry";
48    const PACKAGE: &'static str = "xmtp.mls.message_contents";
49    fn full_name() -> ::prost::alloc::string::String {
50        "xmtp.mls.message_contents.CommitLogEntry".into()
51    }
52    fn type_url() -> ::prost::alloc::string::String {
53        "/xmtp.mls.message_contents.CommitLogEntry".into()
54    }
55}
56#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
57#[repr(i32)]
58pub enum CommitResult {
59    Unspecified = 0,
60    Applied = 1,
61    WrongEpoch = 2,
62    Undecryptable = 3,
63    Invalid = 4,
64}
65impl CommitResult {
66    /// String value of the enum field names used in the ProtoBuf definition.
67    ///
68    /// The values are not transformed in any way and thus are considered stable
69    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
70    pub fn as_str_name(&self) -> &'static str {
71        match self {
72            Self::Unspecified => "COMMIT_RESULT_UNSPECIFIED",
73            Self::Applied => "COMMIT_RESULT_APPLIED",
74            Self::WrongEpoch => "COMMIT_RESULT_WRONG_EPOCH",
75            Self::Undecryptable => "COMMIT_RESULT_UNDECRYPTABLE",
76            Self::Invalid => "COMMIT_RESULT_INVALID",
77        }
78    }
79    /// Creates an enum from field names used in the ProtoBuf definition.
80    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
81        match value {
82            "COMMIT_RESULT_UNSPECIFIED" => Some(Self::Unspecified),
83            "COMMIT_RESULT_APPLIED" => Some(Self::Applied),
84            "COMMIT_RESULT_WRONG_EPOCH" => Some(Self::WrongEpoch),
85            "COMMIT_RESULT_UNDECRYPTABLE" => Some(Self::Undecryptable),
86            "COMMIT_RESULT_INVALID" => Some(Self::Invalid),
87            _ => None,
88        }
89    }
90}
91/// A WelcomePointer is used to point to the welcome message for several installations at once to save overhead
92#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
93pub struct WelcomePointer {
94    #[prost(oneof = "welcome_pointer::Version", tags = "1")]
95    pub version: ::core::option::Option<welcome_pointer::Version>,
96}
97/// Nested message and enum types in `WelcomePointer`.
98pub mod welcome_pointer {
99    /// Points to a V1 WelcomeMessage
100    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
101    pub struct WelcomeV1Pointer {
102        /// The topic of the welcome message. For V1, this means that it will be the first message in the topic, so no other identifier is required
103        #[prost(bytes = "vec", tag = "1")]
104        pub destination: ::prost::alloc::vec::Vec<u8>,
105        /// The algorithm used to encrypt the welcome pointer
106        #[prost(enumeration = "super::WelcomePointeeEncryptionAeadType", tag = "2")]
107        pub aead_type: i32,
108        /// The encryption key of the welcome message. Must match key size specified by the aead_type.
109        #[prost(bytes = "vec", tag = "3")]
110        pub encryption_key: ::prost::alloc::vec::Vec<u8>,
111        /// Nonce used to encrypt the data field. Must match nonce size specified by the aead_type.
112        #[prost(bytes = "vec", tag = "4")]
113        pub data_nonce: ::prost::alloc::vec::Vec<u8>,
114        /// Nonce used to encrypt the welcome_metadata field. Must match nonce size specified by the aead_type.
115        #[prost(bytes = "vec", tag = "5")]
116        pub welcome_metadata_nonce: ::prost::alloc::vec::Vec<u8>,
117    }
118    impl ::prost::Name for WelcomeV1Pointer {
119        const NAME: &'static str = "WelcomeV1Pointer";
120        const PACKAGE: &'static str = "xmtp.mls.message_contents";
121        fn full_name() -> ::prost::alloc::string::String {
122            "xmtp.mls.message_contents.WelcomePointer.WelcomeV1Pointer".into()
123        }
124        fn type_url() -> ::prost::alloc::string::String {
125            "/xmtp.mls.message_contents.WelcomePointer.WelcomeV1Pointer".into()
126        }
127    }
128    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
129    pub enum Version {
130        #[prost(message, tag = "1")]
131        WelcomeV1Pointer(WelcomeV1Pointer),
132    }
133}
134impl ::prost::Name for WelcomePointer {
135    const NAME: &'static str = "WelcomePointer";
136    const PACKAGE: &'static str = "xmtp.mls.message_contents";
137    fn full_name() -> ::prost::alloc::string::String {
138        "xmtp.mls.message_contents.WelcomePointer".into()
139    }
140    fn type_url() -> ::prost::alloc::string::String {
141        "/xmtp.mls.message_contents.WelcomePointer".into()
142    }
143}
144/// Extension message that indicates the types of encryption supported by a client
145#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
146pub struct WelcomePointeeEncryptionAeadTypesExtension {
147    #[prost(enumeration = "WelcomePointeeEncryptionAeadType", repeated, tag = "1")]
148    pub supported_aead_types: ::prost::alloc::vec::Vec<i32>,
149}
150impl ::prost::Name for WelcomePointeeEncryptionAeadTypesExtension {
151    const NAME: &'static str = "WelcomePointeeEncryptionAeadTypesExtension";
152    const PACKAGE: &'static str = "xmtp.mls.message_contents";
153    fn full_name() -> ::prost::alloc::string::String {
154        "xmtp.mls.message_contents.WelcomePointeeEncryptionAeadTypesExtension".into()
155    }
156    fn type_url() -> ::prost::alloc::string::String {
157        "/xmtp.mls.message_contents.WelcomePointeeEncryptionAeadTypesExtension".into()
158    }
159}
160#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
161#[repr(i32)]
162pub enum WelcomePointeeEncryptionAeadType {
163    Unspecified = 0,
164    /// Use same encoding as openmls::AeadType
165    Chacha20Poly1305 = 3,
166}
167impl WelcomePointeeEncryptionAeadType {
168    /// String value of the enum field names used in the ProtoBuf definition.
169    ///
170    /// The values are not transformed in any way and thus are considered stable
171    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
172    pub fn as_str_name(&self) -> &'static str {
173        match self {
174            Self::Unspecified => "WELCOME_POINTEE_ENCRYPTION_AEAD_TYPE_UNSPECIFIED",
175            Self::Chacha20Poly1305 => {
176                "WELCOME_POINTEE_ENCRYPTION_AEAD_TYPE_CHACHA20_POLY1305"
177            }
178        }
179    }
180    /// Creates an enum from field names used in the ProtoBuf definition.
181    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
182        match value {
183            "WELCOME_POINTEE_ENCRYPTION_AEAD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
184            "WELCOME_POINTEE_ENCRYPTION_AEAD_TYPE_CHACHA20_POLY1305" => {
185                Some(Self::Chacha20Poly1305)
186            }
187            _ => None,
188        }
189    }
190}
191/// MUST match the WelcomeWrapperAlgorithm enum values without 25519 so that the i32 transformations are compatible
192#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
193#[repr(i32)]
194pub enum WelcomePointerWrapperAlgorithm {
195    Unspecified = 0,
196    XwingMlkem768Draft6 = 2,
197}
198impl WelcomePointerWrapperAlgorithm {
199    /// String value of the enum field names used in the ProtoBuf definition.
200    ///
201    /// The values are not transformed in any way and thus are considered stable
202    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
203    pub fn as_str_name(&self) -> &'static str {
204        match self {
205            Self::Unspecified => "WELCOME_POINTER_WRAPPER_ALGORITHM_UNSPECIFIED",
206            Self::XwingMlkem768Draft6 => {
207                "WELCOME_POINTER_WRAPPER_ALGORITHM_XWING_MLKEM_768_DRAFT_6"
208            }
209        }
210    }
211    /// Creates an enum from field names used in the ProtoBuf definition.
212    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
213        match value {
214            "WELCOME_POINTER_WRAPPER_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
215            "WELCOME_POINTER_WRAPPER_ALGORITHM_XWING_MLKEM_768_DRAFT_6" => {
216                Some(Self::XwingMlkem768Draft6)
217            }
218            _ => None,
219        }
220    }
221}
222/// The KeyPackageExtension that stores the PubKey and the WelcomeWrapperEncryption
223#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
224pub struct WelcomeWrapperEncryption {
225    #[prost(bytes = "vec", tag = "1")]
226    pub pub_key: ::prost::alloc::vec::Vec<u8>,
227    #[prost(enumeration = "WelcomeWrapperAlgorithm", tag = "2")]
228    pub algorithm: i32,
229}
230impl ::prost::Name for WelcomeWrapperEncryption {
231    const NAME: &'static str = "WelcomeWrapperEncryption";
232    const PACKAGE: &'static str = "xmtp.mls.message_contents";
233    fn full_name() -> ::prost::alloc::string::String {
234        "xmtp.mls.message_contents.WelcomeWrapperEncryption".into()
235    }
236    fn type_url() -> ::prost::alloc::string::String {
237        "/xmtp.mls.message_contents.WelcomeWrapperEncryption".into()
238    }
239}
240/// Describes the algorithm used to encrypt the Welcome Wrapper
241#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
242#[repr(i32)]
243pub enum WelcomeWrapperAlgorithm {
244    Unspecified = 0,
245    Curve25519 = 1,
246    XwingMlkem768Draft6 = 2,
247    /// Only used for WelcomePointee's
248    SymmetricKey = 3,
249}
250impl WelcomeWrapperAlgorithm {
251    /// String value of the enum field names used in the ProtoBuf definition.
252    ///
253    /// The values are not transformed in any way and thus are considered stable
254    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
255    pub fn as_str_name(&self) -> &'static str {
256        match self {
257            Self::Unspecified => "WELCOME_WRAPPER_ALGORITHM_UNSPECIFIED",
258            Self::Curve25519 => "WELCOME_WRAPPER_ALGORITHM_CURVE25519",
259            Self::XwingMlkem768Draft6 => {
260                "WELCOME_WRAPPER_ALGORITHM_XWING_MLKEM_768_DRAFT_6"
261            }
262            Self::SymmetricKey => "WELCOME_WRAPPER_ALGORITHM_SYMMETRIC_KEY",
263        }
264    }
265    /// Creates an enum from field names used in the ProtoBuf definition.
266    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
267        match value {
268            "WELCOME_WRAPPER_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
269            "WELCOME_WRAPPER_ALGORITHM_CURVE25519" => Some(Self::Curve25519),
270            "WELCOME_WRAPPER_ALGORITHM_XWING_MLKEM_768_DRAFT_6" => {
271                Some(Self::XwingMlkem768Draft6)
272            }
273            "WELCOME_WRAPPER_ALGORITHM_SYMMETRIC_KEY" => Some(Self::SymmetricKey),
274            _ => None,
275        }
276    }
277}
278/// Message for group mutable metadata
279#[derive(Clone, PartialEq, ::prost::Message)]
280pub struct GroupMutablePermissionsV1 {
281    #[prost(message, optional, tag = "1")]
282    pub policies: ::core::option::Option<PolicySet>,
283}
284impl ::prost::Name for GroupMutablePermissionsV1 {
285    const NAME: &'static str = "GroupMutablePermissionsV1";
286    const PACKAGE: &'static str = "xmtp.mls.message_contents";
287    fn full_name() -> ::prost::alloc::string::String {
288        "xmtp.mls.message_contents.GroupMutablePermissionsV1".into()
289    }
290    fn type_url() -> ::prost::alloc::string::String {
291        "/xmtp.mls.message_contents.GroupMutablePermissionsV1".into()
292    }
293}
294/// The set of policies that govern the group
295#[derive(Clone, PartialEq, ::prost::Message)]
296pub struct PolicySet {
297    #[prost(message, optional, tag = "1")]
298    pub add_member_policy: ::core::option::Option<MembershipPolicy>,
299    #[prost(message, optional, tag = "2")]
300    pub remove_member_policy: ::core::option::Option<MembershipPolicy>,
301    #[prost(map = "string, message", tag = "3")]
302    pub update_metadata_policy: ::std::collections::HashMap<
303        ::prost::alloc::string::String,
304        MetadataPolicy,
305    >,
306    #[prost(message, optional, tag = "4")]
307    pub add_admin_policy: ::core::option::Option<PermissionsUpdatePolicy>,
308    #[prost(message, optional, tag = "5")]
309    pub remove_admin_policy: ::core::option::Option<PermissionsUpdatePolicy>,
310    #[prost(message, optional, tag = "6")]
311    pub update_permissions_policy: ::core::option::Option<PermissionsUpdatePolicy>,
312}
313impl ::prost::Name for PolicySet {
314    const NAME: &'static str = "PolicySet";
315    const PACKAGE: &'static str = "xmtp.mls.message_contents";
316    fn full_name() -> ::prost::alloc::string::String {
317        "xmtp.mls.message_contents.PolicySet".into()
318    }
319    fn type_url() -> ::prost::alloc::string::String {
320        "/xmtp.mls.message_contents.PolicySet".into()
321    }
322}
323/// A policy that governs adding/removing members or installations
324#[derive(Clone, PartialEq, ::prost::Message)]
325pub struct MembershipPolicy {
326    #[prost(oneof = "membership_policy::Kind", tags = "1, 2, 3")]
327    pub kind: ::core::option::Option<membership_policy::Kind>,
328}
329/// Nested message and enum types in `MembershipPolicy`.
330pub mod membership_policy {
331    /// Combine multiple policies. All must evaluate to true
332    #[derive(Clone, PartialEq, ::prost::Message)]
333    pub struct AndCondition {
334        #[prost(message, repeated, tag = "1")]
335        pub policies: ::prost::alloc::vec::Vec<super::MembershipPolicy>,
336    }
337    impl ::prost::Name for AndCondition {
338        const NAME: &'static str = "AndCondition";
339        const PACKAGE: &'static str = "xmtp.mls.message_contents";
340        fn full_name() -> ::prost::alloc::string::String {
341            "xmtp.mls.message_contents.MembershipPolicy.AndCondition".into()
342        }
343        fn type_url() -> ::prost::alloc::string::String {
344            "/xmtp.mls.message_contents.MembershipPolicy.AndCondition".into()
345        }
346    }
347    /// Combine multiple policies. Any must evaluate to true
348    #[derive(Clone, PartialEq, ::prost::Message)]
349    pub struct AnyCondition {
350        #[prost(message, repeated, tag = "1")]
351        pub policies: ::prost::alloc::vec::Vec<super::MembershipPolicy>,
352    }
353    impl ::prost::Name for AnyCondition {
354        const NAME: &'static str = "AnyCondition";
355        const PACKAGE: &'static str = "xmtp.mls.message_contents";
356        fn full_name() -> ::prost::alloc::string::String {
357            "xmtp.mls.message_contents.MembershipPolicy.AnyCondition".into()
358        }
359        fn type_url() -> ::prost::alloc::string::String {
360            "/xmtp.mls.message_contents.MembershipPolicy.AnyCondition".into()
361        }
362    }
363    /// Base policy
364    #[derive(
365        Clone,
366        Copy,
367        Debug,
368        PartialEq,
369        Eq,
370        Hash,
371        PartialOrd,
372        Ord,
373        ::prost::Enumeration
374    )]
375    #[repr(i32)]
376    pub enum BasePolicy {
377        Unspecified = 0,
378        Allow = 1,
379        Deny = 2,
380        AllowIfAdminOrSuperAdmin = 3,
381        AllowIfSuperAdmin = 4,
382    }
383    impl BasePolicy {
384        /// String value of the enum field names used in the ProtoBuf definition.
385        ///
386        /// The values are not transformed in any way and thus are considered stable
387        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
388        pub fn as_str_name(&self) -> &'static str {
389            match self {
390                Self::Unspecified => "BASE_POLICY_UNSPECIFIED",
391                Self::Allow => "BASE_POLICY_ALLOW",
392                Self::Deny => "BASE_POLICY_DENY",
393                Self::AllowIfAdminOrSuperAdmin => {
394                    "BASE_POLICY_ALLOW_IF_ADMIN_OR_SUPER_ADMIN"
395                }
396                Self::AllowIfSuperAdmin => "BASE_POLICY_ALLOW_IF_SUPER_ADMIN",
397            }
398        }
399        /// Creates an enum from field names used in the ProtoBuf definition.
400        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
401            match value {
402                "BASE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
403                "BASE_POLICY_ALLOW" => Some(Self::Allow),
404                "BASE_POLICY_DENY" => Some(Self::Deny),
405                "BASE_POLICY_ALLOW_IF_ADMIN_OR_SUPER_ADMIN" => {
406                    Some(Self::AllowIfAdminOrSuperAdmin)
407                }
408                "BASE_POLICY_ALLOW_IF_SUPER_ADMIN" => Some(Self::AllowIfSuperAdmin),
409                _ => None,
410            }
411        }
412    }
413    #[derive(Clone, PartialEq, ::prost::Oneof)]
414    pub enum Kind {
415        #[prost(enumeration = "BasePolicy", tag = "1")]
416        Base(i32),
417        #[prost(message, tag = "2")]
418        AndCondition(AndCondition),
419        #[prost(message, tag = "3")]
420        AnyCondition(AnyCondition),
421    }
422}
423impl ::prost::Name for MembershipPolicy {
424    const NAME: &'static str = "MembershipPolicy";
425    const PACKAGE: &'static str = "xmtp.mls.message_contents";
426    fn full_name() -> ::prost::alloc::string::String {
427        "xmtp.mls.message_contents.MembershipPolicy".into()
428    }
429    fn type_url() -> ::prost::alloc::string::String {
430        "/xmtp.mls.message_contents.MembershipPolicy".into()
431    }
432}
433/// A policy that governs updating metadata
434#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct MetadataPolicy {
436    #[prost(oneof = "metadata_policy::Kind", tags = "1, 2, 3")]
437    pub kind: ::core::option::Option<metadata_policy::Kind>,
438}
439/// Nested message and enum types in `MetadataPolicy`.
440pub mod metadata_policy {
441    /// Combine multiple policies. All must evaluate to true
442    #[derive(Clone, PartialEq, ::prost::Message)]
443    pub struct AndCondition {
444        #[prost(message, repeated, tag = "1")]
445        pub policies: ::prost::alloc::vec::Vec<super::MetadataPolicy>,
446    }
447    impl ::prost::Name for AndCondition {
448        const NAME: &'static str = "AndCondition";
449        const PACKAGE: &'static str = "xmtp.mls.message_contents";
450        fn full_name() -> ::prost::alloc::string::String {
451            "xmtp.mls.message_contents.MetadataPolicy.AndCondition".into()
452        }
453        fn type_url() -> ::prost::alloc::string::String {
454            "/xmtp.mls.message_contents.MetadataPolicy.AndCondition".into()
455        }
456    }
457    /// Combine multiple policies. Any must evaluate to true
458    #[derive(Clone, PartialEq, ::prost::Message)]
459    pub struct AnyCondition {
460        #[prost(message, repeated, tag = "1")]
461        pub policies: ::prost::alloc::vec::Vec<super::MetadataPolicy>,
462    }
463    impl ::prost::Name for AnyCondition {
464        const NAME: &'static str = "AnyCondition";
465        const PACKAGE: &'static str = "xmtp.mls.message_contents";
466        fn full_name() -> ::prost::alloc::string::String {
467            "xmtp.mls.message_contents.MetadataPolicy.AnyCondition".into()
468        }
469        fn type_url() -> ::prost::alloc::string::String {
470            "/xmtp.mls.message_contents.MetadataPolicy.AnyCondition".into()
471        }
472    }
473    /// Base policy
474    #[derive(
475        Clone,
476        Copy,
477        Debug,
478        PartialEq,
479        Eq,
480        Hash,
481        PartialOrd,
482        Ord,
483        ::prost::Enumeration
484    )]
485    #[repr(i32)]
486    pub enum MetadataBasePolicy {
487        Unspecified = 0,
488        Allow = 1,
489        Deny = 2,
490        AllowIfAdmin = 3,
491        AllowIfSuperAdmin = 4,
492    }
493    impl MetadataBasePolicy {
494        /// String value of the enum field names used in the ProtoBuf definition.
495        ///
496        /// The values are not transformed in any way and thus are considered stable
497        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
498        pub fn as_str_name(&self) -> &'static str {
499            match self {
500                Self::Unspecified => "METADATA_BASE_POLICY_UNSPECIFIED",
501                Self::Allow => "METADATA_BASE_POLICY_ALLOW",
502                Self::Deny => "METADATA_BASE_POLICY_DENY",
503                Self::AllowIfAdmin => "METADATA_BASE_POLICY_ALLOW_IF_ADMIN",
504                Self::AllowIfSuperAdmin => "METADATA_BASE_POLICY_ALLOW_IF_SUPER_ADMIN",
505            }
506        }
507        /// Creates an enum from field names used in the ProtoBuf definition.
508        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
509            match value {
510                "METADATA_BASE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
511                "METADATA_BASE_POLICY_ALLOW" => Some(Self::Allow),
512                "METADATA_BASE_POLICY_DENY" => Some(Self::Deny),
513                "METADATA_BASE_POLICY_ALLOW_IF_ADMIN" => Some(Self::AllowIfAdmin),
514                "METADATA_BASE_POLICY_ALLOW_IF_SUPER_ADMIN" => {
515                    Some(Self::AllowIfSuperAdmin)
516                }
517                _ => None,
518            }
519        }
520    }
521    #[derive(Clone, PartialEq, ::prost::Oneof)]
522    pub enum Kind {
523        #[prost(enumeration = "MetadataBasePolicy", tag = "1")]
524        Base(i32),
525        #[prost(message, tag = "2")]
526        AndCondition(AndCondition),
527        #[prost(message, tag = "3")]
528        AnyCondition(AnyCondition),
529    }
530}
531impl ::prost::Name for MetadataPolicy {
532    const NAME: &'static str = "MetadataPolicy";
533    const PACKAGE: &'static str = "xmtp.mls.message_contents";
534    fn full_name() -> ::prost::alloc::string::String {
535        "xmtp.mls.message_contents.MetadataPolicy".into()
536    }
537    fn type_url() -> ::prost::alloc::string::String {
538        "/xmtp.mls.message_contents.MetadataPolicy".into()
539    }
540}
541/// A policy that governs updating permissions
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct PermissionsUpdatePolicy {
544    #[prost(oneof = "permissions_update_policy::Kind", tags = "1, 2, 3")]
545    pub kind: ::core::option::Option<permissions_update_policy::Kind>,
546}
547/// Nested message and enum types in `PermissionsUpdatePolicy`.
548pub mod permissions_update_policy {
549    /// Combine multiple policies. All must evaluate to true
550    #[derive(Clone, PartialEq, ::prost::Message)]
551    pub struct AndCondition {
552        #[prost(message, repeated, tag = "1")]
553        pub policies: ::prost::alloc::vec::Vec<super::PermissionsUpdatePolicy>,
554    }
555    impl ::prost::Name for AndCondition {
556        const NAME: &'static str = "AndCondition";
557        const PACKAGE: &'static str = "xmtp.mls.message_contents";
558        fn full_name() -> ::prost::alloc::string::String {
559            "xmtp.mls.message_contents.PermissionsUpdatePolicy.AndCondition".into()
560        }
561        fn type_url() -> ::prost::alloc::string::String {
562            "/xmtp.mls.message_contents.PermissionsUpdatePolicy.AndCondition".into()
563        }
564    }
565    /// Combine multiple policies. Any must evaluate to true
566    #[derive(Clone, PartialEq, ::prost::Message)]
567    pub struct AnyCondition {
568        #[prost(message, repeated, tag = "1")]
569        pub policies: ::prost::alloc::vec::Vec<super::PermissionsUpdatePolicy>,
570    }
571    impl ::prost::Name for AnyCondition {
572        const NAME: &'static str = "AnyCondition";
573        const PACKAGE: &'static str = "xmtp.mls.message_contents";
574        fn full_name() -> ::prost::alloc::string::String {
575            "xmtp.mls.message_contents.PermissionsUpdatePolicy.AnyCondition".into()
576        }
577        fn type_url() -> ::prost::alloc::string::String {
578            "/xmtp.mls.message_contents.PermissionsUpdatePolicy.AnyCondition".into()
579        }
580    }
581    /// Base policy
582    #[derive(
583        Clone,
584        Copy,
585        Debug,
586        PartialEq,
587        Eq,
588        Hash,
589        PartialOrd,
590        Ord,
591        ::prost::Enumeration
592    )]
593    #[repr(i32)]
594    pub enum PermissionsBasePolicy {
595        Unspecified = 0,
596        Deny = 1,
597        AllowIfAdmin = 2,
598        AllowIfSuperAdmin = 3,
599    }
600    impl PermissionsBasePolicy {
601        /// String value of the enum field names used in the ProtoBuf definition.
602        ///
603        /// The values are not transformed in any way and thus are considered stable
604        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
605        pub fn as_str_name(&self) -> &'static str {
606            match self {
607                Self::Unspecified => "PERMISSIONS_BASE_POLICY_UNSPECIFIED",
608                Self::Deny => "PERMISSIONS_BASE_POLICY_DENY",
609                Self::AllowIfAdmin => "PERMISSIONS_BASE_POLICY_ALLOW_IF_ADMIN",
610                Self::AllowIfSuperAdmin => "PERMISSIONS_BASE_POLICY_ALLOW_IF_SUPER_ADMIN",
611            }
612        }
613        /// Creates an enum from field names used in the ProtoBuf definition.
614        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
615            match value {
616                "PERMISSIONS_BASE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
617                "PERMISSIONS_BASE_POLICY_DENY" => Some(Self::Deny),
618                "PERMISSIONS_BASE_POLICY_ALLOW_IF_ADMIN" => Some(Self::AllowIfAdmin),
619                "PERMISSIONS_BASE_POLICY_ALLOW_IF_SUPER_ADMIN" => {
620                    Some(Self::AllowIfSuperAdmin)
621                }
622                _ => None,
623            }
624        }
625    }
626    #[derive(Clone, PartialEq, ::prost::Oneof)]
627    pub enum Kind {
628        #[prost(enumeration = "PermissionsBasePolicy", tag = "1")]
629        Base(i32),
630        #[prost(message, tag = "2")]
631        AndCondition(AndCondition),
632        #[prost(message, tag = "3")]
633        AnyCondition(AnyCondition),
634    }
635}
636impl ::prost::Name for PermissionsUpdatePolicy {
637    const NAME: &'static str = "PermissionsUpdatePolicy";
638    const PACKAGE: &'static str = "xmtp.mls.message_contents";
639    fn full_name() -> ::prost::alloc::string::String {
640        "xmtp.mls.message_contents.PermissionsUpdatePolicy".into()
641    }
642    fn type_url() -> ::prost::alloc::string::String {
643        "/xmtp.mls.message_contents.PermissionsUpdatePolicy".into()
644    }
645}
646/// Per-component permission policy with separate rules for insert, update,
647/// and delete operations.
648///
649/// Insert and update are separate because some components need different
650/// permission levels for creating vs modifying entries. For example, group
651/// membership allows any member to update (installations/sequence ID) but
652/// only admins to insert (add a new member).
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct ComponentPermissions {
655    /// Policy for inserting a new value (component does not yet exist)
656    #[prost(message, optional, tag = "1")]
657    pub insert_policy: ::core::option::Option<MetadataPolicy>,
658    /// Policy for updating an existing value
659    #[prost(message, optional, tag = "2")]
660    pub update_policy: ::core::option::Option<MetadataPolicy>,
661    /// Policy for deleting a value
662    #[prost(message, optional, tag = "3")]
663    pub delete_policy: ::core::option::Option<MetadataPolicy>,
664}
665impl ::prost::Name for ComponentPermissions {
666    const NAME: &'static str = "ComponentPermissions";
667    const PACKAGE: &'static str = "xmtp.mls.message_contents";
668    fn full_name() -> ::prost::alloc::string::String {
669        "xmtp.mls.message_contents.ComponentPermissions".into()
670    }
671    fn type_url() -> ::prost::alloc::string::String {
672        "/xmtp.mls.message_contents.ComponentPermissions".into()
673    }
674}
675/// Metadata describing a component: its data type and permission policies.
676///
677/// Stored as the value in the component registry (ComponentId 0x8000).
678/// Each registered component has one of these describing what kind of data
679/// it holds and who can insert, update, or delete it.
680#[derive(Clone, PartialEq, ::prost::Message)]
681pub struct ComponentMetadata {
682    /// The data structure type of the component's value
683    #[prost(enumeration = "ComponentType", tag = "1")]
684    pub component_type: i32,
685    /// Permission policies for this component, evaluated against regular
686    /// (member-issued) commits.
687    #[prost(message, optional, tag = "2")]
688    pub permissions: ::core::option::Option<ComponentPermissions>,
689    /// Permission policies for this component, evaluated against MLS External
690    /// Commits (RFC 9420 §12.4.3.2). Absent / unset is equivalent to all-Deny:
691    /// external committers cannot touch this component. Each component opts in
692    /// explicitly by setting this field. Combined with the EXTERNAL_COMMIT_POLICY
693    /// master switch (`allow_external_commit`), this is the per-component declarative
694    /// authorization for external-commit-driven joins.
695    #[prost(message, optional, tag = "3")]
696    pub external_committer_permissions: ::core::option::Option<ComponentPermissions>,
697}
698impl ::prost::Name for ComponentMetadata {
699    const NAME: &'static str = "ComponentMetadata";
700    const PACKAGE: &'static str = "xmtp.mls.message_contents";
701    fn full_name() -> ::prost::alloc::string::String {
702        "xmtp.mls.message_contents.ComponentMetadata".into()
703    }
704    fn type_url() -> ::prost::alloc::string::String {
705        "/xmtp.mls.message_contents.ComponentMetadata".into()
706    }
707}
708/// The data structure type of a component's value
709#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
710#[repr(i32)]
711pub enum ComponentType {
712    Unspecified = 0,
713    /// Opaque bytes, replaced atomically
714    Bytes = 1,
715    /// A utf-8 encoded string, replaced atomically
716    String = 2,
717    /// A TlsMap\<bytes, bytes> supporting key-level insert/update/delete via deltas
718    TlsMapBytesBytes = 3,
719    /// A TlsMap\<InboxId, bytes> supporting key-level insert/update/delete via deltas
720    TlsMapInboxIdBytes = 4,
721    /// A TlsSet<bytes> supporting insert/remove/remove-by-hash via deltas
722    TlsSetBytes = 5,
723    /// A TlsSet<InboxId> supporting insert/remove/remove-by-hash via deltas
724    TlsSetInboxId = 6,
725}
726impl ComponentType {
727    /// String value of the enum field names used in the ProtoBuf definition.
728    ///
729    /// The values are not transformed in any way and thus are considered stable
730    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
731    pub fn as_str_name(&self) -> &'static str {
732        match self {
733            Self::Unspecified => "COMPONENT_TYPE_UNSPECIFIED",
734            Self::Bytes => "COMPONENT_TYPE_BYTES",
735            Self::String => "COMPONENT_TYPE_STRING",
736            Self::TlsMapBytesBytes => "COMPONENT_TYPE_TLS_MAP_BYTES_BYTES",
737            Self::TlsMapInboxIdBytes => "COMPONENT_TYPE_TLS_MAP_INBOX_ID_BYTES",
738            Self::TlsSetBytes => "COMPONENT_TYPE_TLS_SET_BYTES",
739            Self::TlsSetInboxId => "COMPONENT_TYPE_TLS_SET_INBOX_ID",
740        }
741    }
742    /// Creates an enum from field names used in the ProtoBuf definition.
743    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
744        match value {
745            "COMPONENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
746            "COMPONENT_TYPE_BYTES" => Some(Self::Bytes),
747            "COMPONENT_TYPE_STRING" => Some(Self::String),
748            "COMPONENT_TYPE_TLS_MAP_BYTES_BYTES" => Some(Self::TlsMapBytesBytes),
749            "COMPONENT_TYPE_TLS_MAP_INBOX_ID_BYTES" => Some(Self::TlsMapInboxIdBytes),
750            "COMPONENT_TYPE_TLS_SET_BYTES" => Some(Self::TlsSetBytes),
751            "COMPONENT_TYPE_TLS_SET_INBOX_ID" => Some(Self::TlsSetInboxId),
752            _ => None,
753        }
754    }
755}
756/// ContentTypeId is used to identify the type of content stored in a Message.
757#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
758pub struct ContentTypeId {
759    /// authority governing this content type
760    #[prost(string, tag = "1")]
761    pub authority_id: ::prost::alloc::string::String,
762    /// type identifier
763    #[prost(string, tag = "2")]
764    pub type_id: ::prost::alloc::string::String,
765    /// major version of the type
766    #[prost(uint32, tag = "3")]
767    pub version_major: u32,
768    /// minor version of the type
769    #[prost(uint32, tag = "4")]
770    pub version_minor: u32,
771}
772impl ::prost::Name for ContentTypeId {
773    const NAME: &'static str = "ContentTypeId";
774    const PACKAGE: &'static str = "xmtp.mls.message_contents";
775    fn full_name() -> ::prost::alloc::string::String {
776        "xmtp.mls.message_contents.ContentTypeId".into()
777    }
778    fn type_url() -> ::prost::alloc::string::String {
779        "/xmtp.mls.message_contents.ContentTypeId".into()
780    }
781}
782/// EncodedContent bundles the content with metadata identifying its type
783/// and parameters required for correct decoding and presentation of the content.
784#[derive(Clone, PartialEq, ::prost::Message)]
785pub struct EncodedContent {
786    /// content type identifier used to match the payload with
787    /// the correct decoding machinery
788    #[prost(message, optional, tag = "1")]
789    pub r#type: ::core::option::Option<ContentTypeId>,
790    /// optional encoding parameters required to correctly decode the content
791    #[prost(map = "string, string", tag = "2")]
792    pub parameters: ::std::collections::HashMap<
793        ::prost::alloc::string::String,
794        ::prost::alloc::string::String,
795    >,
796    /// optional fallback description of the content that can be used in case
797    /// the client cannot decode or render the content
798    #[prost(string, optional, tag = "3")]
799    pub fallback: ::core::option::Option<::prost::alloc::string::String>,
800    /// optional compression; the value indicates algorithm used to
801    /// compress the encoded content bytes
802    #[prost(enumeration = "Compression", optional, tag = "5")]
803    pub compression: ::core::option::Option<i32>,
804    /// encoded content itself
805    #[prost(bytes = "vec", tag = "4")]
806    pub content: ::prost::alloc::vec::Vec<u8>,
807}
808impl ::prost::Name for EncodedContent {
809    const NAME: &'static str = "EncodedContent";
810    const PACKAGE: &'static str = "xmtp.mls.message_contents";
811    fn full_name() -> ::prost::alloc::string::String {
812        "xmtp.mls.message_contents.EncodedContent".into()
813    }
814    fn type_url() -> ::prost::alloc::string::String {
815        "/xmtp.mls.message_contents.EncodedContent".into()
816    }
817}
818/// A PlaintextEnvelope is the outermost payload that gets encrypted by MLS
819#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
820pub struct PlaintextEnvelope {
821    /// Selector which declares which version of the EncodedContent this
822    /// PlaintextEnvelope is
823    #[prost(oneof = "plaintext_envelope::Content", tags = "1, 2")]
824    pub content: ::core::option::Option<plaintext_envelope::Content>,
825}
826/// Nested message and enum types in `PlaintextEnvelope`.
827pub mod plaintext_envelope {
828    /// Version 1 of the encrypted envelope
829    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
830    pub struct V1 {
831        /// Expected to be EncodedContent
832        #[prost(bytes = "vec", tag = "1")]
833        pub content: ::prost::alloc::vec::Vec<u8>,
834        /// A unique value that can be used to ensure that the same content can
835        /// produce different hashes. May be the sender timestamp.
836        #[prost(string, tag = "2")]
837        pub idempotency_key: ::prost::alloc::string::String,
838    }
839    impl ::prost::Name for V1 {
840        const NAME: &'static str = "V1";
841        const PACKAGE: &'static str = "xmtp.mls.message_contents";
842        fn full_name() -> ::prost::alloc::string::String {
843            "xmtp.mls.message_contents.PlaintextEnvelope.V1".into()
844        }
845        fn type_url() -> ::prost::alloc::string::String {
846            "/xmtp.mls.message_contents.PlaintextEnvelope.V1".into()
847        }
848    }
849    /// Version 2 of the encrypted envelope
850    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
851    pub struct V2 {
852        /// A unique value that can be used to ensure that the same content can
853        /// produce different hashes. May be the sender timestamp.
854        #[prost(string, tag = "1")]
855        pub idempotency_key: ::prost::alloc::string::String,
856        #[prost(oneof = "v2::MessageType", tags = "2, 3, 4, 5")]
857        pub message_type: ::core::option::Option<v2::MessageType>,
858    }
859    /// Nested message and enum types in `V2`.
860    pub mod v2 {
861        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
862        pub enum MessageType {
863            /// Expected to be EncodedContent
864            #[prost(bytes, tag = "2")]
865            Content(::prost::alloc::vec::Vec<u8>),
866            /// Initiator sends a request to receive sync payload
867            #[prost(message, tag = "3")]
868            DeviceSyncRequest(
869                super::super::super::super::device_sync::content::DeviceSyncRequest,
870            ),
871            /// Some other authorized installation sends a reply with a link to payload
872            #[prost(message, tag = "4")]
873            DeviceSyncReply(
874                super::super::super::super::device_sync::content::DeviceSyncReply,
875            ),
876            /// A serialized user preference update
877            #[prost(message, tag = "5")]
878            UserPreferenceUpdate(
879                super::super::super::super::device_sync::content::V1UserPreferenceUpdate,
880            ),
881        }
882    }
883    impl ::prost::Name for V2 {
884        const NAME: &'static str = "V2";
885        const PACKAGE: &'static str = "xmtp.mls.message_contents";
886        fn full_name() -> ::prost::alloc::string::String {
887            "xmtp.mls.message_contents.PlaintextEnvelope.V2".into()
888        }
889        fn type_url() -> ::prost::alloc::string::String {
890            "/xmtp.mls.message_contents.PlaintextEnvelope.V2".into()
891        }
892    }
893    /// Selector which declares which version of the EncodedContent this
894    /// PlaintextEnvelope is
895    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
896    pub enum Content {
897        #[prost(message, tag = "1")]
898        V1(V1),
899        #[prost(message, tag = "2")]
900        V2(V2),
901    }
902}
903impl ::prost::Name for PlaintextEnvelope {
904    const NAME: &'static str = "PlaintextEnvelope";
905    const PACKAGE: &'static str = "xmtp.mls.message_contents";
906    fn full_name() -> ::prost::alloc::string::String {
907        "xmtp.mls.message_contents.PlaintextEnvelope".into()
908    }
909    fn type_url() -> ::prost::alloc::string::String {
910        "/xmtp.mls.message_contents.PlaintextEnvelope".into()
911    }
912}
913/// Recognized compression algorithms
914/// protolint:disable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
915#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
916#[repr(i32)]
917pub enum Compression {
918    Deflate = 0,
919    Gzip = 1,
920}
921impl Compression {
922    /// String value of the enum field names used in the ProtoBuf definition.
923    ///
924    /// The values are not transformed in any way and thus are considered stable
925    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
926    pub fn as_str_name(&self) -> &'static str {
927        match self {
928            Self::Deflate => "COMPRESSION_DEFLATE",
929            Self::Gzip => "COMPRESSION_GZIP",
930        }
931    }
932    /// Creates an enum from field names used in the ProtoBuf definition.
933    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
934        match value {
935            "COMPRESSION_DEFLATE" => Some(Self::Deflate),
936            "COMPRESSION_GZIP" => Some(Self::Gzip),
937            _ => None,
938        }
939    }
940}
941/// v1 external-commit-policy payload.
942/// Field-coupling invariants enforced by libxmtp when applying an
943/// AppDataUpdate(EXTERNAL_COMMIT_POLICY) proposal:
944///
945/// * When `allow_external_commit` transitions to true: `symmetric_key`
946///   and `external_group_id` MUST be populated (non-empty, meeting
947///   their length requirements) in the same proposal. The two
948///   transitions are atomic — there is no window where the bit is on
949///   but the invite coordinates are unset.
950///
951/// * When `allow_external_commit` transitions to false (revoke):
952///   `symmetric_key` and `external_group_id` MUST be cleared (set to
953///   empty bytes) in the same proposal. Leaving stale coordinates in
954///   the group state after revoke would let a future re-enable
955///   accidentally revive a previously-distributed key.
956///
957/// * On re-enable (false → true after a prior revoke): the new
958///   `symmetric_key` MUST differ from every previously-used value for
959///   this group, and the new `external_group_id` SHOULD differ as
960///   well. Reusing a revoked key would re-validate every QR ever
961///   printed under that key, defeating the revocation. Admin clients
962///   are responsible for generating fresh material on each enable.
963#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
964pub struct ExternalCommitPolicyV1 {
965    /// Master switch for MLS External Commits adding new members.
966    /// Required for the QR-invite flow. Defaults to false; admins
967    /// (super-admin by default) opt in via
968    /// AppDataUpdate(EXTERNAL_COMMIT_POLICY).
969    ///
970    /// See the field-coupling invariants in the message-level comment
971    /// above: enabling MUST populate symmetric_key + external_group_id;
972    /// revoking (true → false) MUST clear them.
973    #[prost(bool, tag = "1")]
974    pub allow_external_commit: bool,
975    /// Wall-clock auto-disable timestamp (ns since UNIX epoch).
976    /// 0 = no automatic expiry. After this timestamp the validator
977    /// rejects all external commits regardless of `allow_external_commit`.
978    /// Lets admins issue time-bounded invite campaigns without having to
979    /// come back and flip the bit manually.
980    #[prost(uint64, tag = "2")]
981    pub expires_at_ns: u64,
982    /// Maximum staleness of the GroupInfo referenced by an external
983    /// commit, in nanoseconds since GroupInfo export. 0 = no staleness
984    /// limit. External commits whose referenced GroupInfo was exported
985    /// more than `expire_in_ns` ago are rejected. Narrows the replay
986    /// window for stolen-blob attacks and forces re-export frequency.
987    #[prost(uint64, tag = "3")]
988    pub expire_in_ns: u64,
989    /// 32-byte ChaCha20Poly1305 key used to wrap the EncryptedGroupInfoBlob
990    /// for the currently-active invite. Carried in the group state so any
991    /// member (especially a just-joined external committer) can re-export
992    /// GroupInfo and re-upload a refreshed blob under the same key after a
993    /// join — without this, a printed QR / link would die the moment the
994    /// issuing admin went offline.
995    ///
996    /// The QR carries the same key bytes. Rotation = admin sets a new value
997    /// here in a single AppDataUpdate(EXTERNAL_COMMIT_POLICY) proposal AND
998    /// issues a new QR carrying the matching key; old QR holders' keys no
999    /// longer decrypt blobs the service serves under the rotated slot.
1000    ///
1001    /// Length MUST be exactly 32 bytes when populated. Empty (zero-length)
1002    /// means no active invite — and MUST coincide with
1003    /// `allow_external_commit == false` (see the field-coupling invariants
1004    /// at the top of this message). Revoking the invite MUST clear this
1005    /// field; re-enabling MUST populate it with a freshly-generated value
1006    /// distinct from any previously-used key for this group.
1007    ///
1008    /// Note: the service_pointer (where the blob lives) is intentionally
1009    /// NOT stored in the group. It is per-QR application-defined opaque
1010    /// bytes; different invites for the same group may point at different
1011    /// services. Joiners use the service_pointer from the QR they scanned.
1012    #[prost(bytes = "vec", tag = "4")]
1013    pub symmetric_key: ::prost::alloc::vec::Vec<u8>,
1014    /// Identifier for the service slot holding the active invite's
1015    /// encrypted blob. Application-defined opaque bytes (UUID, snowflake,
1016    /// short slot key, etc.); decoupled from the MLS group_id. Admins
1017    /// MAY rotate the symmetric_key while keeping this stable (overwrite
1018    /// the same slot on the service) or change both together (new slot,
1019    /// leaves the old slot orphaned for application-side GC).
1020    ///
1021    /// The QR carries the same value. The joiner verifies that the QR's
1022    /// `external_group_id` equals this field after joining, as
1023    /// defense-in-depth against a stale or swapped QR. Mismatch indicates
1024    /// the admin rotated to a new slot after the QR was minted; the
1025    /// joining client SHOULD treat the just-published commit as orphaned
1026    /// (it validates fine, but the refreshed blob the joiner would upload
1027    /// to the old slot will not be reachable by holders of the new QR).
1028    ///
1029    /// MUST be at least 4 bytes when populated (collision-avoidance floor
1030    /// for tiny services). RECOMMENDED: 16 random bytes when no
1031    /// application-specific scheme is in use. Empty (zero-length) means
1032    /// no active invite — and MUST coincide with
1033    /// `allow_external_commit == false` (see the field-coupling
1034    /// invariants at the top of this message). Revoking the invite MUST
1035    /// clear this field; re-enabling SHOULD use a freshly-generated value
1036    /// (reusing a prior `external_group_id` is permitted only when the
1037    /// admin intends to overwrite the old service slot — typically the
1038    /// admin generates a new value to leave the prior slot orphaned).
1039    #[prost(bytes = "vec", tag = "5")]
1040    pub external_group_id: ::prost::alloc::vec::Vec<u8>,
1041}
1042impl ::prost::Name for ExternalCommitPolicyV1 {
1043    const NAME: &'static str = "ExternalCommitPolicyV1";
1044    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1045    fn full_name() -> ::prost::alloc::string::String {
1046        "xmtp.mls.message_contents.ExternalCommitPolicyV1".into()
1047    }
1048    fn type_url() -> ::prost::alloc::string::String {
1049        "/xmtp.mls.message_contents.ExternalCommitPolicyV1".into()
1050    }
1051}
1052/// Versioned envelope. New variants are added as new oneof variants;
1053/// readers that don't recognize a variant treat the policy as default
1054/// (all fields zero) per the standard unknown-variant tolerance rules.
1055#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1056pub struct ExternalCommitPolicyEntry {
1057    #[prost(oneof = "external_commit_policy_entry::Version", tags = "1")]
1058    pub version: ::core::option::Option<external_commit_policy_entry::Version>,
1059}
1060/// Nested message and enum types in `ExternalCommitPolicyEntry`.
1061pub mod external_commit_policy_entry {
1062    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1063    pub enum Version {
1064        #[prost(message, tag = "1")]
1065        V1(super::ExternalCommitPolicyV1),
1066    }
1067}
1068impl ::prost::Name for ExternalCommitPolicyEntry {
1069    const NAME: &'static str = "ExternalCommitPolicyEntry";
1070    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1071    fn full_name() -> ::prost::alloc::string::String {
1072        "xmtp.mls.message_contents.ExternalCommitPolicyEntry".into()
1073    }
1074    fn type_url() -> ::prost::alloc::string::String {
1075        "/xmtp.mls.message_contents.ExternalCommitPolicyEntry".into()
1076    }
1077}
1078/// v1 shape of the shareable invite blob for QR-code or link-based joining
1079/// of an XMTP group via an MLS external commit.
1080#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1081pub struct ExternalInvitePayloadV1 {
1082    /// Application-defined opaque bytes identifying the service location.
1083    #[prost(bytes = "vec", tag = "1")]
1084    pub service_pointer: ::prost::alloc::vec::Vec<u8>,
1085    /// Identifier for the service slot holding the encrypted blob. Format
1086    /// is application-defined (UUID, snowflake, short slot key, etc.) and
1087    /// opaque to libxmtp; the only constraint is that the value is unique
1088    /// within the chosen service. Decoupled from the MLS group_id —
1089    /// rotation may keep this stable (overwrite the same slot) or change
1090    /// it (new slot on the service); the admin chooses per invite.
1091    ///
1092    /// MUST be at least 4 bytes (collision-avoidance floor for tiny
1093    /// services). RECOMMENDED: 16 random bytes when no application-
1094    /// specific scheme is in use. Maximum length is not capped by the
1095    /// protocol; applications should bound it to fit their QR / link
1096    /// transport.
1097    ///
1098    /// After joining, the joiner verifies this matches
1099    /// `EXTERNAL_COMMIT_POLICY.external_group_id` in the group state as
1100    /// defense-in-depth against a stale or swapped QR.
1101    #[prost(bytes = "vec", tag = "2")]
1102    pub external_group_id: ::prost::alloc::vec::Vec<u8>,
1103    /// 32 bytes; ChaCha20Poly1305 key used to wrap the GroupInfo. Matches
1104    /// `EXTERNAL_COMMIT_POLICY.symmetric_key` in the group state.
1105    #[prost(bytes = "vec", tag = "3")]
1106    pub symmetric_key: ::prost::alloc::vec::Vec<u8>,
1107}
1108impl ::prost::Name for ExternalInvitePayloadV1 {
1109    const NAME: &'static str = "ExternalInvitePayloadV1";
1110    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1111    fn full_name() -> ::prost::alloc::string::String {
1112        "xmtp.mls.message_contents.ExternalInvitePayloadV1".into()
1113    }
1114    fn type_url() -> ::prost::alloc::string::String {
1115        "/xmtp.mls.message_contents.ExternalInvitePayloadV1".into()
1116    }
1117}
1118/// Versioned envelope for the shareable invite blob. The application embeds
1119/// the serialized bytes in whatever transport it prefers (hex, base64, raw
1120/// QR, NFC, etc.) and stores the corresponding EncryptedGroupInfoBlob on an
1121/// external service keyed by the v1 payload's `external_group_id`.
1122///
1123/// New wire-format variants are added as new oneof entries; readers that
1124/// don't recognize a variant treat the invite as unparseable and fail
1125/// closed (no implicit downgrade).
1126#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1127pub struct ExternalInvitePayload {
1128    #[prost(oneof = "external_invite_payload::Version", tags = "1")]
1129    pub version: ::core::option::Option<external_invite_payload::Version>,
1130}
1131/// Nested message and enum types in `ExternalInvitePayload`.
1132pub mod external_invite_payload {
1133    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1134    pub enum Version {
1135        #[prost(message, tag = "1")]
1136        V1(super::ExternalInvitePayloadV1),
1137    }
1138}
1139impl ::prost::Name for ExternalInvitePayload {
1140    const NAME: &'static str = "ExternalInvitePayload";
1141    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1142    fn full_name() -> ::prost::alloc::string::String {
1143        "xmtp.mls.message_contents.ExternalInvitePayload".into()
1144    }
1145    fn type_url() -> ::prost::alloc::string::String {
1146        "/xmtp.mls.message_contents.ExternalInvitePayload".into()
1147    }
1148}
1149/// v1 shape of the encrypted-GroupInfo envelope.
1150///
1151/// `epoch` and `group_state_hash` are plaintext metadata serving two
1152/// distinct purposes:
1153///
1154/// * `epoch` provides a total ordering on uploads. The service accepts
1155///   an upload iff `upload.epoch > current.epoch` (strictly newer);
1156///   lower-epoch uploads are stale and rejected outright.
1157///
1158/// * `group_state_hash` is a consistency check at a single epoch. MLS
1159///   is deterministic — every member that applies the same commit
1160///   derives identical group state — so two correct uploads at the
1161///   same epoch MUST carry the same hash. When `upload.epoch == current.epoch`: equal hashes mean an idempotent re-upload (no-op
1162///   or duplicate-reject); different hashes mean the uploaders are on
1163///   forked views of the group and the service must refuse to pick a
1164///   winner.
1165///
1166/// The joiner additionally verifies on download that the blob's `epoch`
1167/// and `group_state_hash` match the decrypted GroupInfo before
1168/// attempting to join — closes the "malicious service swapped
1169/// ciphertext" gap.
1170#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1171pub struct EncryptedGroupInfoBlobV1 {
1172    /// 12 bytes; ChaCha20Poly1305 nonce specific to this ciphertext.
1173    #[prost(bytes = "vec", tag = "1")]
1174    pub nonce: ::prost::alloc::vec::Vec<u8>,
1175    /// wrap_payload_symmetric output: AEAD ciphertext over the serialized
1176    /// MlsMessageOut(GroupInfo).
1177    #[prost(bytes = "vec", tag = "2")]
1178    pub ciphertext: ::prost::alloc::vec::Vec<u8>,
1179    /// MLS group epoch of the wrapped GroupInfo. Plaintext; the service
1180    /// totally orders uploads by this value — strictly-newer wins, stale
1181    /// is rejected. Joiner verifies against the decrypted GroupInfo
1182    /// before joining.
1183    #[prost(uint64, tag = "3")]
1184    pub epoch: u64,
1185    /// Tree-hash (or equivalent group-state digest) of the wrapped
1186    /// GroupInfo. Plaintext; the service uses this only at equal epochs
1187    /// to detect forks (same epoch + differing hash = forked uploaders).
1188    /// Not used for ordering. Joiner verifies against the decrypted
1189    /// GroupInfo before joining.
1190    #[prost(bytes = "vec", tag = "4")]
1191    pub group_state_hash: ::prost::alloc::vec::Vec<u8>,
1192    /// Wall-clock expiry of this blob, in nanoseconds since UNIX epoch.
1193    /// 0 means no expiry. The service uses this as a TTL hint and MAY
1194    /// garbage-collect blobs past their `expires_at_ns` autonomously.
1195    /// The joining client also enforces this — refuses to join from an
1196    /// expired blob even if the service is still serving it. Admin
1197    /// bounds the campaign by setting this at upload time; extending an
1198    /// invite is a re-upload with a later value.
1199    #[prost(uint64, tag = "5")]
1200    pub expires_at_ns: u64,
1201}
1202impl ::prost::Name for EncryptedGroupInfoBlobV1 {
1203    const NAME: &'static str = "EncryptedGroupInfoBlobV1";
1204    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1205    fn full_name() -> ::prost::alloc::string::String {
1206        "xmtp.mls.message_contents.EncryptedGroupInfoBlobV1".into()
1207    }
1208    fn type_url() -> ::prost::alloc::string::String {
1209        "/xmtp.mls.message_contents.EncryptedGroupInfoBlobV1".into()
1210    }
1211}
1212/// Versioned envelope wrapping a single GroupInfo TLS-serialized bytes
1213/// under an AEAD scheme (ChaCha20Poly1305 in v1) with a fresh nonce per
1214/// re-encryption. Stored on the external service and replaced by joiners
1215/// (with a fresh nonce) after each successful join.
1216///
1217/// New variants represent breaking wire-format changes (different AEAD,
1218/// different metadata layout). Readers that don't recognize a variant
1219/// fail closed — the joiner cannot attempt MLS state transitions against
1220/// a blob it can't validate.
1221#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1222pub struct EncryptedGroupInfoBlob {
1223    #[prost(oneof = "encrypted_group_info_blob::Version", tags = "1")]
1224    pub version: ::core::option::Option<encrypted_group_info_blob::Version>,
1225}
1226/// Nested message and enum types in `EncryptedGroupInfoBlob`.
1227pub mod encrypted_group_info_blob {
1228    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1229    pub enum Version {
1230        #[prost(message, tag = "1")]
1231        V1(super::EncryptedGroupInfoBlobV1),
1232    }
1233}
1234impl ::prost::Name for EncryptedGroupInfoBlob {
1235    const NAME: &'static str = "EncryptedGroupInfoBlob";
1236    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1237    fn full_name() -> ::prost::alloc::string::String {
1238        "xmtp.mls.message_contents.EncryptedGroupInfoBlob".into()
1239    }
1240    fn type_url() -> ::prost::alloc::string::String {
1241        "/xmtp.mls.message_contents.EncryptedGroupInfoBlob".into()
1242    }
1243}
1244/// Contains a mapping of `inbox_id` -> `sequence_id` for all members of a group.
1245/// Designed to be stored in the group context extension of the MLS group
1246#[derive(Clone, PartialEq, ::prost::Message)]
1247pub struct GroupMembership {
1248    #[prost(map = "string, uint64", tag = "1")]
1249    pub members: ::std::collections::HashMap<::prost::alloc::string::String, u64>,
1250    /// List of installations that failed to be added due to errors encountered during the evaluation process.
1251    #[prost(bytes = "vec", repeated, tag = "2")]
1252    pub failed_installations: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1253}
1254impl ::prost::Name for GroupMembership {
1255    const NAME: &'static str = "GroupMembership";
1256    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1257    fn full_name() -> ::prost::alloc::string::String {
1258        "xmtp.mls.message_contents.GroupMembership".into()
1259    }
1260    fn type_url() -> ::prost::alloc::string::String {
1261        "/xmtp.mls.message_contents.GroupMembership".into()
1262    }
1263}
1264/// Per-member membership state stored inside the GROUP_MEMBERSHIP component
1265/// as a TlsMap\<InboxId, bytes>. Keys are 32-byte inbox ids, values are the
1266/// encoded bytes of this message.
1267#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1268pub struct GroupMembershipEntry {
1269    #[prost(oneof = "group_membership_entry::Version", tags = "1")]
1270    pub version: ::core::option::Option<group_membership_entry::Version>,
1271}
1272/// Nested message and enum types in `GroupMembershipEntry`.
1273pub mod group_membership_entry {
1274    /// V1 of the per-member membership state.
1275    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1276    pub struct V1 {
1277        /// Latest identity-update sequence id this client has applied for this
1278        /// member. Validator-checked at bootstrap against the pre-flip
1279        /// `GroupMembership.members\[inbox_id\]` value.
1280        #[prost(uint64, tag = "1")]
1281        pub sequence_id: u64,
1282        /// Installation ids belonging to this member that we previously failed
1283        /// to add (expired key package, validation failure, etc.). Used to
1284        /// suppress retries on later membership updates.
1285        ///
1286        /// Sender-authoritative at migration: the migrator partitions the
1287        /// global `failed_installations` per inbox by walking identity-update
1288        /// history. Receivers accept these bytes as-is — the validator only
1289        /// checks `sequence_id`, so the blast radius of a bad partition is
1290        /// bounded to extra or silenced retries. Installations whose owning
1291        /// inbox can't be determined are dropped.
1292        #[prost(bytes = "vec", repeated, tag = "2")]
1293        pub failed_installations: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1294    }
1295    impl ::prost::Name for V1 {
1296        const NAME: &'static str = "V1";
1297        const PACKAGE: &'static str = "xmtp.mls.message_contents";
1298        fn full_name() -> ::prost::alloc::string::String {
1299            "xmtp.mls.message_contents.GroupMembershipEntry.V1".into()
1300        }
1301        fn type_url() -> ::prost::alloc::string::String {
1302            "/xmtp.mls.message_contents.GroupMembershipEntry.V1".into()
1303        }
1304    }
1305    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1306    pub enum Version {
1307        #[prost(message, tag = "1")]
1308        V1(V1),
1309    }
1310}
1311impl ::prost::Name for GroupMembershipEntry {
1312    const NAME: &'static str = "GroupMembershipEntry";
1313    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1314    fn full_name() -> ::prost::alloc::string::String {
1315        "xmtp.mls.message_contents.GroupMembershipEntry".into()
1316    }
1317    fn type_url() -> ::prost::alloc::string::String {
1318        "/xmtp.mls.message_contents.GroupMembershipEntry".into()
1319    }
1320}
1321#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1322pub struct OneshotMessage {
1323    #[prost(oneof = "oneshot_message::MessageType", tags = "1")]
1324    pub message_type: ::core::option::Option<oneshot_message::MessageType>,
1325}
1326/// Nested message and enum types in `OneshotMessage`.
1327pub mod oneshot_message {
1328    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1329    pub enum MessageType {
1330        #[prost(message, tag = "1")]
1331        ReaddRequest(super::ReaddRequest),
1332    }
1333}
1334impl ::prost::Name for OneshotMessage {
1335    const NAME: &'static str = "OneshotMessage";
1336    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1337    fn full_name() -> ::prost::alloc::string::String {
1338        "xmtp.mls.message_contents.OneshotMessage".into()
1339    }
1340    fn type_url() -> ::prost::alloc::string::String {
1341        "/xmtp.mls.message_contents.OneshotMessage".into()
1342    }
1343}
1344/// A request sent by an installation to recover from a fork. Other members
1345/// may remove and readd that installation from the group.
1346/// XIP: <https://community.xmtp.org/t/xip-68-draft-automated-fork-recovery/951>
1347#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1348pub struct ReaddRequest {
1349    #[prost(bytes = "vec", tag = "1")]
1350    pub group_id: ::prost::alloc::vec::Vec<u8>,
1351    /// The sequence ID of the latest commit log entry at the time the request
1352    /// is sent; used to disambiguate cases where an installation forks
1353    /// and is readded multiple times.
1354    #[prost(uint64, tag = "2")]
1355    pub latest_commit_sequence_id: u64,
1356}
1357impl ::prost::Name for ReaddRequest {
1358    const NAME: &'static str = "ReaddRequest";
1359    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1360    fn full_name() -> ::prost::alloc::string::String {
1361        "xmtp.mls.message_contents.ReaddRequest".into()
1362    }
1363    fn type_url() -> ::prost::alloc::string::String {
1364        "/xmtp.mls.message_contents.ReaddRequest".into()
1365    }
1366}
1367/// Parent message for group metadata
1368#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1369pub struct GroupMetadataV1 {
1370    #[prost(enumeration = "ConversationType", tag = "1")]
1371    pub conversation_type: i32,
1372    /// This will be removed soon
1373    #[prost(string, tag = "2")]
1374    pub creator_account_address: ::prost::alloc::string::String,
1375    #[prost(string, tag = "3")]
1376    pub creator_inbox_id: ::prost::alloc::string::String,
1377    /// Should only be present for CONVERSATION_TYPE_DM
1378    #[prost(message, optional, tag = "4")]
1379    pub dm_members: ::core::option::Option<DmMembers>,
1380    /// Should only be present for CONVERSATION_TYPE_ONESHOT
1381    #[prost(message, optional, tag = "5")]
1382    pub oneshot_message: ::core::option::Option<OneshotMessage>,
1383}
1384impl ::prost::Name for GroupMetadataV1 {
1385    const NAME: &'static str = "GroupMetadataV1";
1386    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1387    fn full_name() -> ::prost::alloc::string::String {
1388        "xmtp.mls.message_contents.GroupMetadataV1".into()
1389    }
1390    fn type_url() -> ::prost::alloc::string::String {
1391        "/xmtp.mls.message_contents.GroupMetadataV1".into()
1392    }
1393}
1394/// Wrapper around an Inbox Id
1395#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1396pub struct Inbox {
1397    #[prost(string, tag = "1")]
1398    pub inbox_id: ::prost::alloc::string::String,
1399}
1400impl ::prost::Name for Inbox {
1401    const NAME: &'static str = "Inbox";
1402    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1403    fn full_name() -> ::prost::alloc::string::String {
1404        "xmtp.mls.message_contents.Inbox".into()
1405    }
1406    fn type_url() -> ::prost::alloc::string::String {
1407        "/xmtp.mls.message_contents.Inbox".into()
1408    }
1409}
1410/// Ordering does not matter here
1411#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1412pub struct DmMembers {
1413    #[prost(message, optional, tag = "1")]
1414    pub dm_member_one: ::core::option::Option<Inbox>,
1415    #[prost(message, optional, tag = "2")]
1416    pub dm_member_two: ::core::option::Option<Inbox>,
1417}
1418impl ::prost::Name for DmMembers {
1419    const NAME: &'static str = "DmMembers";
1420    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1421    fn full_name() -> ::prost::alloc::string::String {
1422        "xmtp.mls.message_contents.DmMembers".into()
1423    }
1424    fn type_url() -> ::prost::alloc::string::String {
1425        "/xmtp.mls.message_contents.DmMembers".into()
1426    }
1427}
1428/// Defines the type of conversation
1429#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1430#[repr(i32)]
1431pub enum ConversationType {
1432    Unspecified = 0,
1433    Group = 1,
1434    Dm = 2,
1435    Sync = 3,
1436    Oneshot = 4,
1437}
1438impl ConversationType {
1439    /// String value of the enum field names used in the ProtoBuf definition.
1440    ///
1441    /// The values are not transformed in any way and thus are considered stable
1442    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1443    pub fn as_str_name(&self) -> &'static str {
1444        match self {
1445            Self::Unspecified => "CONVERSATION_TYPE_UNSPECIFIED",
1446            Self::Group => "CONVERSATION_TYPE_GROUP",
1447            Self::Dm => "CONVERSATION_TYPE_DM",
1448            Self::Sync => "CONVERSATION_TYPE_SYNC",
1449            Self::Oneshot => "CONVERSATION_TYPE_ONESHOT",
1450        }
1451    }
1452    /// Creates an enum from field names used in the ProtoBuf definition.
1453    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1454        match value {
1455            "CONVERSATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1456            "CONVERSATION_TYPE_GROUP" => Some(Self::Group),
1457            "CONVERSATION_TYPE_DM" => Some(Self::Dm),
1458            "CONVERSATION_TYPE_SYNC" => Some(Self::Sync),
1459            "CONVERSATION_TYPE_ONESHOT" => Some(Self::Oneshot),
1460            _ => None,
1461        }
1462    }
1463}
1464/// Message for group mutable metadata
1465#[derive(Clone, PartialEq, ::prost::Message)]
1466pub struct GroupMutableMetadataV1 {
1467    /// Map to store various metadata attributes (Group name, etc.)
1468    #[prost(map = "string, string", tag = "1")]
1469    pub attributes: ::std::collections::HashMap<
1470        ::prost::alloc::string::String,
1471        ::prost::alloc::string::String,
1472    >,
1473    #[prost(message, optional, tag = "2")]
1474    pub admin_list: ::core::option::Option<Inboxes>,
1475    /// Creator starts as only super_admin
1476    /// Only super_admin can add/remove other super_admin
1477    #[prost(message, optional, tag = "3")]
1478    pub super_admin_list: ::core::option::Option<Inboxes>,
1479}
1480impl ::prost::Name for GroupMutableMetadataV1 {
1481    const NAME: &'static str = "GroupMutableMetadataV1";
1482    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1483    fn full_name() -> ::prost::alloc::string::String {
1484        "xmtp.mls.message_contents.GroupMutableMetadataV1".into()
1485    }
1486    fn type_url() -> ::prost::alloc::string::String {
1487        "/xmtp.mls.message_contents.GroupMutableMetadataV1".into()
1488    }
1489}
1490/// Wrapper around a list of repeated Inbox Ids
1491#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1492pub struct Inboxes {
1493    #[prost(string, repeated, tag = "1")]
1494    pub inbox_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1495}
1496impl ::prost::Name for Inboxes {
1497    const NAME: &'static str = "Inboxes";
1498    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1499    fn full_name() -> ::prost::alloc::string::String {
1500        "xmtp.mls.message_contents.Inboxes".into()
1501    }
1502    fn type_url() -> ::prost::alloc::string::String {
1503        "/xmtp.mls.message_contents.Inboxes".into()
1504    }
1505}
1506/// Extension data for proposal support in group context.
1507/// When present in the group context extensions, indicates the group
1508/// uses proposal-by-reference flow.
1509#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1510pub struct ProposalSupport {
1511    #[prost(uint32, tag = "1")]
1512    pub version: u32,
1513}
1514impl ::prost::Name for ProposalSupport {
1515    const NAME: &'static str = "ProposalSupport";
1516    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1517    fn full_name() -> ::prost::alloc::string::String {
1518        "xmtp.mls.message_contents.ProposalSupport".into()
1519    }
1520    fn type_url() -> ::prost::alloc::string::String {
1521        "/xmtp.mls.message_contents.ProposalSupport".into()
1522    }
1523}
1524/// A group member and affected installation IDs
1525#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1526pub struct MembershipChange {
1527    #[prost(bytes = "vec", repeated, tag = "1")]
1528    pub installation_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1529    #[prost(string, tag = "2")]
1530    pub account_address: ::prost::alloc::string::String,
1531    #[prost(string, tag = "3")]
1532    pub initiated_by_account_address: ::prost::alloc::string::String,
1533}
1534impl ::prost::Name for MembershipChange {
1535    const NAME: &'static str = "MembershipChange";
1536    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1537    fn full_name() -> ::prost::alloc::string::String {
1538        "xmtp.mls.message_contents.MembershipChange".into()
1539    }
1540    fn type_url() -> ::prost::alloc::string::String {
1541        "/xmtp.mls.message_contents.MembershipChange".into()
1542    }
1543}
1544/// The group membership change proto
1545///
1546/// protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
1547#[derive(Clone, PartialEq, ::prost::Message)]
1548pub struct GroupMembershipChanges {
1549    /// Members that have been added in the commit
1550    #[prost(message, repeated, tag = "1")]
1551    pub members_added: ::prost::alloc::vec::Vec<MembershipChange>,
1552    /// Members that have been removed in the commit
1553    #[prost(message, repeated, tag = "2")]
1554    pub members_removed: ::prost::alloc::vec::Vec<MembershipChange>,
1555    /// Installations that have been added in the commit, grouped by member
1556    #[prost(message, repeated, tag = "3")]
1557    pub installations_added: ::prost::alloc::vec::Vec<MembershipChange>,
1558    /// Installations removed in the commit, grouped by member
1559    #[prost(message, repeated, tag = "4")]
1560    pub installations_removed: ::prost::alloc::vec::Vec<MembershipChange>,
1561}
1562impl ::prost::Name for GroupMembershipChanges {
1563    const NAME: &'static str = "GroupMembershipChanges";
1564    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1565    fn full_name() -> ::prost::alloc::string::String {
1566        "xmtp.mls.message_contents.GroupMembershipChanges".into()
1567    }
1568    fn type_url() -> ::prost::alloc::string::String {
1569        "/xmtp.mls.message_contents.GroupMembershipChanges".into()
1570    }
1571}
1572/// A summary of the changes in a commit.
1573/// Includes added/removed inboxes and changes to metadata
1574#[derive(Clone, PartialEq, ::prost::Message)]
1575pub struct GroupUpdated {
1576    #[prost(string, tag = "1")]
1577    pub initiated_by_inbox_id: ::prost::alloc::string::String,
1578    /// The inboxes added in the commit
1579    #[prost(message, repeated, tag = "2")]
1580    pub added_inboxes: ::prost::alloc::vec::Vec<group_updated::Inbox>,
1581    /// The inboxes removed in the commit
1582    #[prost(message, repeated, tag = "3")]
1583    pub removed_inboxes: ::prost::alloc::vec::Vec<group_updated::Inbox>,
1584    /// The metadata changes in the commit
1585    #[prost(message, repeated, tag = "4")]
1586    pub metadata_field_changes: ::prost::alloc::vec::Vec<
1587        group_updated::MetadataFieldChange,
1588    >,
1589    /// / The inboxes that were removed from the group in response to pending-remove/self-remove requests
1590    #[prost(message, repeated, tag = "5")]
1591    pub left_inboxes: ::prost::alloc::vec::Vec<group_updated::Inbox>,
1592    /// The inboxes that were added to admin list in the commit
1593    #[prost(message, repeated, tag = "6")]
1594    pub added_admin_inboxes: ::prost::alloc::vec::Vec<group_updated::Inbox>,
1595    /// The inboxes that were removed from admin list in the commit
1596    #[prost(message, repeated, tag = "7")]
1597    pub removed_admin_inboxes: ::prost::alloc::vec::Vec<group_updated::Inbox>,
1598    /// The inboxes that were added to super admin list in the commit
1599    #[prost(message, repeated, tag = "8")]
1600    pub added_super_admin_inboxes: ::prost::alloc::vec::Vec<group_updated::Inbox>,
1601    /// The inboxes that were removed from super admin list in the commit
1602    #[prost(message, repeated, tag = "9")]
1603    pub removed_super_admin_inboxes: ::prost::alloc::vec::Vec<group_updated::Inbox>,
1604}
1605/// Nested message and enum types in `GroupUpdated`.
1606pub mod group_updated {
1607    /// An inbox that was added or removed in this commit
1608    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1609    pub struct Inbox {
1610        #[prost(string, tag = "1")]
1611        pub inbox_id: ::prost::alloc::string::String,
1612    }
1613    impl ::prost::Name for Inbox {
1614        const NAME: &'static str = "Inbox";
1615        const PACKAGE: &'static str = "xmtp.mls.message_contents";
1616        fn full_name() -> ::prost::alloc::string::String {
1617            "xmtp.mls.message_contents.GroupUpdated.Inbox".into()
1618        }
1619        fn type_url() -> ::prost::alloc::string::String {
1620            "/xmtp.mls.message_contents.GroupUpdated.Inbox".into()
1621        }
1622    }
1623    /// A summary of a change to the mutable metadata
1624    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1625    pub struct MetadataFieldChange {
1626        /// The field that was changed
1627        #[prost(string, tag = "1")]
1628        pub field_name: ::prost::alloc::string::String,
1629        /// The previous value
1630        #[prost(string, optional, tag = "2")]
1631        pub old_value: ::core::option::Option<::prost::alloc::string::String>,
1632        /// The updated value
1633        #[prost(string, optional, tag = "3")]
1634        pub new_value: ::core::option::Option<::prost::alloc::string::String>,
1635    }
1636    impl ::prost::Name for MetadataFieldChange {
1637        const NAME: &'static str = "MetadataFieldChange";
1638        const PACKAGE: &'static str = "xmtp.mls.message_contents";
1639        fn full_name() -> ::prost::alloc::string::String {
1640            "xmtp.mls.message_contents.GroupUpdated.MetadataFieldChange".into()
1641        }
1642        fn type_url() -> ::prost::alloc::string::String {
1643            "/xmtp.mls.message_contents.GroupUpdated.MetadataFieldChange".into()
1644        }
1645    }
1646}
1647impl ::prost::Name for GroupUpdated {
1648    const NAME: &'static str = "GroupUpdated";
1649    const PACKAGE: &'static str = "xmtp.mls.message_contents";
1650    fn full_name() -> ::prost::alloc::string::String {
1651        "xmtp.mls.message_contents.GroupUpdated".into()
1652    }
1653    fn type_url() -> ::prost::alloc::string::String {
1654        "/xmtp.mls.message_contents.GroupUpdated".into()
1655    }
1656}