xmtp_proto/gen/
xmtp.keystore_api.v1.rs

1// This file is @generated by prost-build.
2/// Wrapper class for errors from the Keystore API
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct KeystoreError {
5    #[prost(string, tag = "1")]
6    pub message: ::prost::alloc::string::String,
7    #[prost(enumeration = "ErrorCode", tag = "2")]
8    pub code: i32,
9}
10impl ::prost::Name for KeystoreError {
11    const NAME: &'static str = "KeystoreError";
12    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
13    fn full_name() -> ::prost::alloc::string::String {
14        "xmtp.keystore_api.v1.KeystoreError".into()
15    }
16    fn type_url() -> ::prost::alloc::string::String {
17        "/xmtp.keystore_api.v1.KeystoreError".into()
18    }
19}
20/// Decrypt a batch of messages using X3DH key agreement
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct DecryptV1Request {
23    #[prost(message, repeated, tag = "1")]
24    pub requests: ::prost::alloc::vec::Vec<decrypt_v1_request::Request>,
25}
26/// Nested message and enum types in `DecryptV1Request`.
27pub mod decrypt_v1_request {
28    /// A single decryption request
29    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
30    pub struct Request {
31        #[prost(message, optional, tag = "1")]
32        pub payload: ::core::option::Option<
33            super::super::super::message_contents::Ciphertext,
34        >,
35        #[prost(message, optional, tag = "2")]
36        pub peer_keys: ::core::option::Option<
37            super::super::super::message_contents::PublicKeyBundle,
38        >,
39        #[prost(bytes = "vec", tag = "3")]
40        pub header_bytes: ::prost::alloc::vec::Vec<u8>,
41        #[prost(bool, tag = "4")]
42        pub is_sender: bool,
43    }
44    impl ::prost::Name for Request {
45        const NAME: &'static str = "Request";
46        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
47        fn full_name() -> ::prost::alloc::string::String {
48            "xmtp.keystore_api.v1.DecryptV1Request.Request".into()
49        }
50        fn type_url() -> ::prost::alloc::string::String {
51            "/xmtp.keystore_api.v1.DecryptV1Request.Request".into()
52        }
53    }
54}
55impl ::prost::Name for DecryptV1Request {
56    const NAME: &'static str = "DecryptV1Request";
57    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
58    fn full_name() -> ::prost::alloc::string::String {
59        "xmtp.keystore_api.v1.DecryptV1Request".into()
60    }
61    fn type_url() -> ::prost::alloc::string::String {
62        "/xmtp.keystore_api.v1.DecryptV1Request".into()
63    }
64}
65/// Response type for both V1 and V2 decryption requests
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct DecryptResponse {
68    #[prost(message, repeated, tag = "1")]
69    pub responses: ::prost::alloc::vec::Vec<decrypt_response::Response>,
70}
71/// Nested message and enum types in `DecryptResponse`.
72pub mod decrypt_response {
73    /// A single decryption response
74    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
75    pub struct Response {
76        #[prost(oneof = "response::Response", tags = "1, 2")]
77        pub response: ::core::option::Option<response::Response>,
78    }
79    /// Nested message and enum types in `Response`.
80    pub mod response {
81        /// Wrapper object for success response
82        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
83        pub struct Success {
84            #[prost(bytes = "vec", tag = "1")]
85            pub decrypted: ::prost::alloc::vec::Vec<u8>,
86        }
87        impl ::prost::Name for Success {
88            const NAME: &'static str = "Success";
89            const PACKAGE: &'static str = "xmtp.keystore_api.v1";
90            fn full_name() -> ::prost::alloc::string::String {
91                "xmtp.keystore_api.v1.DecryptResponse.Response.Success".into()
92            }
93            fn type_url() -> ::prost::alloc::string::String {
94                "/xmtp.keystore_api.v1.DecryptResponse.Response.Success".into()
95            }
96        }
97        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
98        pub enum Response {
99            #[prost(message, tag = "1")]
100            Result(Success),
101            #[prost(message, tag = "2")]
102            Error(super::super::KeystoreError),
103        }
104    }
105    impl ::prost::Name for Response {
106        const NAME: &'static str = "Response";
107        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
108        fn full_name() -> ::prost::alloc::string::String {
109            "xmtp.keystore_api.v1.DecryptResponse.Response".into()
110        }
111        fn type_url() -> ::prost::alloc::string::String {
112            "/xmtp.keystore_api.v1.DecryptResponse.Response".into()
113        }
114    }
115}
116impl ::prost::Name for DecryptResponse {
117    const NAME: &'static str = "DecryptResponse";
118    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
119    fn full_name() -> ::prost::alloc::string::String {
120        "xmtp.keystore_api.v1.DecryptResponse".into()
121    }
122    fn type_url() -> ::prost::alloc::string::String {
123        "/xmtp.keystore_api.v1.DecryptResponse".into()
124    }
125}
126/// Decrypt a batch of messages using the appropriate topic keys
127#[derive(Clone, PartialEq, ::prost::Message)]
128pub struct DecryptV2Request {
129    #[prost(message, repeated, tag = "1")]
130    pub requests: ::prost::alloc::vec::Vec<decrypt_v2_request::Request>,
131}
132/// Nested message and enum types in `DecryptV2Request`.
133pub mod decrypt_v2_request {
134    /// A single decryption request
135    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
136    pub struct Request {
137        #[prost(message, optional, tag = "1")]
138        pub payload: ::core::option::Option<
139            super::super::super::message_contents::Ciphertext,
140        >,
141        #[prost(bytes = "vec", tag = "2")]
142        pub header_bytes: ::prost::alloc::vec::Vec<u8>,
143        #[prost(string, tag = "3")]
144        pub content_topic: ::prost::alloc::string::String,
145    }
146    impl ::prost::Name for Request {
147        const NAME: &'static str = "Request";
148        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
149        fn full_name() -> ::prost::alloc::string::String {
150            "xmtp.keystore_api.v1.DecryptV2Request.Request".into()
151        }
152        fn type_url() -> ::prost::alloc::string::String {
153            "/xmtp.keystore_api.v1.DecryptV2Request.Request".into()
154        }
155    }
156}
157impl ::prost::Name for DecryptV2Request {
158    const NAME: &'static str = "DecryptV2Request";
159    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
160    fn full_name() -> ::prost::alloc::string::String {
161        "xmtp.keystore_api.v1.DecryptV2Request".into()
162    }
163    fn type_url() -> ::prost::alloc::string::String {
164        "/xmtp.keystore_api.v1.DecryptV2Request".into()
165    }
166}
167/// Encrypt a batch of messages using X3DH key agreement
168#[derive(Clone, PartialEq, ::prost::Message)]
169pub struct EncryptV1Request {
170    #[prost(message, repeated, tag = "1")]
171    pub requests: ::prost::alloc::vec::Vec<encrypt_v1_request::Request>,
172}
173/// Nested message and enum types in `EncryptV1Request`.
174pub mod encrypt_v1_request {
175    /// A single encryption request
176    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
177    pub struct Request {
178        #[prost(message, optional, tag = "1")]
179        pub recipient: ::core::option::Option<
180            super::super::super::message_contents::PublicKeyBundle,
181        >,
182        #[prost(bytes = "vec", tag = "2")]
183        pub payload: ::prost::alloc::vec::Vec<u8>,
184        #[prost(bytes = "vec", tag = "3")]
185        pub header_bytes: ::prost::alloc::vec::Vec<u8>,
186    }
187    impl ::prost::Name for Request {
188        const NAME: &'static str = "Request";
189        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
190        fn full_name() -> ::prost::alloc::string::String {
191            "xmtp.keystore_api.v1.EncryptV1Request.Request".into()
192        }
193        fn type_url() -> ::prost::alloc::string::String {
194            "/xmtp.keystore_api.v1.EncryptV1Request.Request".into()
195        }
196    }
197}
198impl ::prost::Name for EncryptV1Request {
199    const NAME: &'static str = "EncryptV1Request";
200    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
201    fn full_name() -> ::prost::alloc::string::String {
202        "xmtp.keystore_api.v1.EncryptV1Request".into()
203    }
204    fn type_url() -> ::prost::alloc::string::String {
205        "/xmtp.keystore_api.v1.EncryptV1Request".into()
206    }
207}
208/// Response type for both V1 and V2 encryption requests
209#[derive(Clone, PartialEq, ::prost::Message)]
210pub struct EncryptResponse {
211    #[prost(message, repeated, tag = "1")]
212    pub responses: ::prost::alloc::vec::Vec<encrypt_response::Response>,
213}
214/// Nested message and enum types in `EncryptResponse`.
215pub mod encrypt_response {
216    /// A single encryption response
217    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
218    pub struct Response {
219        #[prost(oneof = "response::Response", tags = "1, 2")]
220        pub response: ::core::option::Option<response::Response>,
221    }
222    /// Nested message and enum types in `Response`.
223    pub mod response {
224        /// Wrapper object for success response
225        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
226        pub struct Success {
227            #[prost(message, optional, tag = "1")]
228            pub encrypted: ::core::option::Option<
229                super::super::super::super::message_contents::Ciphertext,
230            >,
231            #[prost(bytes = "vec", tag = "2")]
232            pub sender_hmac: ::prost::alloc::vec::Vec<u8>,
233        }
234        impl ::prost::Name for Success {
235            const NAME: &'static str = "Success";
236            const PACKAGE: &'static str = "xmtp.keystore_api.v1";
237            fn full_name() -> ::prost::alloc::string::String {
238                "xmtp.keystore_api.v1.EncryptResponse.Response.Success".into()
239            }
240            fn type_url() -> ::prost::alloc::string::String {
241                "/xmtp.keystore_api.v1.EncryptResponse.Response.Success".into()
242            }
243        }
244        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
245        pub enum Response {
246            #[prost(message, tag = "1")]
247            Result(Success),
248            #[prost(message, tag = "2")]
249            Error(super::super::KeystoreError),
250        }
251    }
252    impl ::prost::Name for Response {
253        const NAME: &'static str = "Response";
254        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
255        fn full_name() -> ::prost::alloc::string::String {
256            "xmtp.keystore_api.v1.EncryptResponse.Response".into()
257        }
258        fn type_url() -> ::prost::alloc::string::String {
259            "/xmtp.keystore_api.v1.EncryptResponse.Response".into()
260        }
261    }
262}
263impl ::prost::Name for EncryptResponse {
264    const NAME: &'static str = "EncryptResponse";
265    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
266    fn full_name() -> ::prost::alloc::string::String {
267        "xmtp.keystore_api.v1.EncryptResponse".into()
268    }
269    fn type_url() -> ::prost::alloc::string::String {
270        "/xmtp.keystore_api.v1.EncryptResponse".into()
271    }
272}
273/// Encrypt a batch of messages using the appropriate topic keys
274#[derive(Clone, PartialEq, ::prost::Message)]
275pub struct EncryptV2Request {
276    #[prost(message, repeated, tag = "1")]
277    pub requests: ::prost::alloc::vec::Vec<encrypt_v2_request::Request>,
278}
279/// Nested message and enum types in `EncryptV2Request`.
280pub mod encrypt_v2_request {
281    /// A single encryption request
282    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
283    pub struct Request {
284        #[prost(bytes = "vec", tag = "1")]
285        pub payload: ::prost::alloc::vec::Vec<u8>,
286        #[prost(bytes = "vec", tag = "2")]
287        pub header_bytes: ::prost::alloc::vec::Vec<u8>,
288        #[prost(string, tag = "3")]
289        pub content_topic: ::prost::alloc::string::String,
290    }
291    impl ::prost::Name for Request {
292        const NAME: &'static str = "Request";
293        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
294        fn full_name() -> ::prost::alloc::string::String {
295            "xmtp.keystore_api.v1.EncryptV2Request.Request".into()
296        }
297        fn type_url() -> ::prost::alloc::string::String {
298            "/xmtp.keystore_api.v1.EncryptV2Request.Request".into()
299        }
300    }
301}
302impl ::prost::Name for EncryptV2Request {
303    const NAME: &'static str = "EncryptV2Request";
304    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
305    fn full_name() -> ::prost::alloc::string::String {
306        "xmtp.keystore_api.v1.EncryptV2Request".into()
307    }
308    fn type_url() -> ::prost::alloc::string::String {
309        "/xmtp.keystore_api.v1.EncryptV2Request".into()
310    }
311}
312/// Encrypt a message for yourself
313#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct SelfEncryptRequest {
315    #[prost(message, repeated, tag = "1")]
316    pub requests: ::prost::alloc::vec::Vec<self_encrypt_request::Request>,
317}
318/// Nested message and enum types in `SelfEncryptRequest`.
319pub mod self_encrypt_request {
320    /// Request type
321    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
322    pub struct Request {
323        #[prost(bytes = "vec", tag = "1")]
324        pub payload: ::prost::alloc::vec::Vec<u8>,
325    }
326    impl ::prost::Name for Request {
327        const NAME: &'static str = "Request";
328        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
329        fn full_name() -> ::prost::alloc::string::String {
330            "xmtp.keystore_api.v1.SelfEncryptRequest.Request".into()
331        }
332        fn type_url() -> ::prost::alloc::string::String {
333            "/xmtp.keystore_api.v1.SelfEncryptRequest.Request".into()
334        }
335    }
336}
337impl ::prost::Name for SelfEncryptRequest {
338    const NAME: &'static str = "SelfEncryptRequest";
339    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
340    fn full_name() -> ::prost::alloc::string::String {
341        "xmtp.keystore_api.v1.SelfEncryptRequest".into()
342    }
343    fn type_url() -> ::prost::alloc::string::String {
344        "/xmtp.keystore_api.v1.SelfEncryptRequest".into()
345    }
346}
347/// Response type for SelfEncryptRequest
348#[derive(Clone, PartialEq, ::prost::Message)]
349pub struct SelfEncryptResponse {
350    #[prost(message, repeated, tag = "1")]
351    pub responses: ::prost::alloc::vec::Vec<self_encrypt_response::Response>,
352}
353/// Nested message and enum types in `SelfEncryptResponse`.
354pub mod self_encrypt_response {
355    /// Response type
356    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
357    pub struct Response {
358        #[prost(oneof = "response::Response", tags = "1, 2")]
359        pub response: ::core::option::Option<response::Response>,
360    }
361    /// Nested message and enum types in `Response`.
362    pub mod response {
363        /// Success response
364        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
365        pub struct Success {
366            #[prost(bytes = "vec", tag = "1")]
367            pub encrypted: ::prost::alloc::vec::Vec<u8>,
368        }
369        impl ::prost::Name for Success {
370            const NAME: &'static str = "Success";
371            const PACKAGE: &'static str = "xmtp.keystore_api.v1";
372            fn full_name() -> ::prost::alloc::string::String {
373                "xmtp.keystore_api.v1.SelfEncryptResponse.Response.Success".into()
374            }
375            fn type_url() -> ::prost::alloc::string::String {
376                "/xmtp.keystore_api.v1.SelfEncryptResponse.Response.Success".into()
377            }
378        }
379        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
380        pub enum Response {
381            #[prost(message, tag = "1")]
382            Result(Success),
383            #[prost(message, tag = "2")]
384            Error(super::super::KeystoreError),
385        }
386    }
387    impl ::prost::Name for Response {
388        const NAME: &'static str = "Response";
389        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
390        fn full_name() -> ::prost::alloc::string::String {
391            "xmtp.keystore_api.v1.SelfEncryptResponse.Response".into()
392        }
393        fn type_url() -> ::prost::alloc::string::String {
394            "/xmtp.keystore_api.v1.SelfEncryptResponse.Response".into()
395        }
396    }
397}
398impl ::prost::Name for SelfEncryptResponse {
399    const NAME: &'static str = "SelfEncryptResponse";
400    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
401    fn full_name() -> ::prost::alloc::string::String {
402        "xmtp.keystore_api.v1.SelfEncryptResponse".into()
403    }
404    fn type_url() -> ::prost::alloc::string::String {
405        "/xmtp.keystore_api.v1.SelfEncryptResponse".into()
406    }
407}
408/// SelfDecryptRequest
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct SelfDecryptRequest {
411    #[prost(message, repeated, tag = "1")]
412    pub requests: ::prost::alloc::vec::Vec<self_decrypt_request::Request>,
413}
414/// Nested message and enum types in `SelfDecryptRequest`.
415pub mod self_decrypt_request {
416    /// Request type
417    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
418    pub struct Request {
419        #[prost(bytes = "vec", tag = "1")]
420        pub payload: ::prost::alloc::vec::Vec<u8>,
421    }
422    impl ::prost::Name for Request {
423        const NAME: &'static str = "Request";
424        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
425        fn full_name() -> ::prost::alloc::string::String {
426            "xmtp.keystore_api.v1.SelfDecryptRequest.Request".into()
427        }
428        fn type_url() -> ::prost::alloc::string::String {
429            "/xmtp.keystore_api.v1.SelfDecryptRequest.Request".into()
430        }
431    }
432}
433impl ::prost::Name for SelfDecryptRequest {
434    const NAME: &'static str = "SelfDecryptRequest";
435    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
436    fn full_name() -> ::prost::alloc::string::String {
437        "xmtp.keystore_api.v1.SelfDecryptRequest".into()
438    }
439    fn type_url() -> ::prost::alloc::string::String {
440        "/xmtp.keystore_api.v1.SelfDecryptRequest".into()
441    }
442}
443/// Get the private preferences topic identifier
444#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
445pub struct GetPrivatePreferencesTopicIdentifierResponse {
446    #[prost(string, tag = "1")]
447    pub identifier: ::prost::alloc::string::String,
448}
449impl ::prost::Name for GetPrivatePreferencesTopicIdentifierResponse {
450    const NAME: &'static str = "GetPrivatePreferencesTopicIdentifierResponse";
451    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
452    fn full_name() -> ::prost::alloc::string::String {
453        "xmtp.keystore_api.v1.GetPrivatePreferencesTopicIdentifierResponse".into()
454    }
455    fn type_url() -> ::prost::alloc::string::String {
456        "/xmtp.keystore_api.v1.GetPrivatePreferencesTopicIdentifierResponse".into()
457    }
458}
459/// Request to create an invite payload, and store the topic keys in the Keystore
460#[derive(Clone, PartialEq, ::prost::Message)]
461pub struct CreateInviteRequest {
462    #[prost(message, optional, tag = "1")]
463    pub context: ::core::option::Option<
464        super::super::message_contents::invitation_v1::Context,
465    >,
466    #[prost(message, optional, tag = "2")]
467    pub recipient: ::core::option::Option<
468        super::super::message_contents::SignedPublicKeyBundle,
469    >,
470    #[prost(uint64, tag = "3")]
471    pub created_ns: u64,
472    #[prost(message, optional, tag = "4")]
473    pub consent_proof: ::core::option::Option<
474        super::super::message_contents::ConsentProofPayload,
475    >,
476}
477impl ::prost::Name for CreateInviteRequest {
478    const NAME: &'static str = "CreateInviteRequest";
479    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
480    fn full_name() -> ::prost::alloc::string::String {
481        "xmtp.keystore_api.v1.CreateInviteRequest".into()
482    }
483    fn type_url() -> ::prost::alloc::string::String {
484        "/xmtp.keystore_api.v1.CreateInviteRequest".into()
485    }
486}
487/// Response to a CreateInviteRequest
488#[derive(Clone, PartialEq, ::prost::Message)]
489pub struct CreateInviteResponse {
490    #[prost(message, optional, tag = "1")]
491    pub conversation: ::core::option::Option<
492        super::super::message_contents::ConversationReference,
493    >,
494    #[prost(bytes = "vec", tag = "2")]
495    pub payload: ::prost::alloc::vec::Vec<u8>,
496}
497impl ::prost::Name for CreateInviteResponse {
498    const NAME: &'static str = "CreateInviteResponse";
499    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
500    fn full_name() -> ::prost::alloc::string::String {
501        "xmtp.keystore_api.v1.CreateInviteResponse".into()
502    }
503    fn type_url() -> ::prost::alloc::string::String {
504        "/xmtp.keystore_api.v1.CreateInviteResponse".into()
505    }
506}
507/// Request to save a batch of invite messages to the Keystore
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct SaveInvitesRequest {
510    #[prost(message, repeated, tag = "1")]
511    pub requests: ::prost::alloc::vec::Vec<save_invites_request::Request>,
512}
513/// Nested message and enum types in `SaveInvitesRequest`.
514pub mod save_invites_request {
515    /// Mirrors xmtp.envelope schema
516    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
517    pub struct Request {
518        #[prost(string, tag = "1")]
519        pub content_topic: ::prost::alloc::string::String,
520        #[prost(uint64, tag = "2")]
521        pub timestamp_ns: u64,
522        #[prost(bytes = "vec", tag = "3")]
523        pub payload: ::prost::alloc::vec::Vec<u8>,
524    }
525    impl ::prost::Name for Request {
526        const NAME: &'static str = "Request";
527        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
528        fn full_name() -> ::prost::alloc::string::String {
529            "xmtp.keystore_api.v1.SaveInvitesRequest.Request".into()
530        }
531        fn type_url() -> ::prost::alloc::string::String {
532            "/xmtp.keystore_api.v1.SaveInvitesRequest.Request".into()
533        }
534    }
535}
536impl ::prost::Name for SaveInvitesRequest {
537    const NAME: &'static str = "SaveInvitesRequest";
538    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
539    fn full_name() -> ::prost::alloc::string::String {
540        "xmtp.keystore_api.v1.SaveInvitesRequest".into()
541    }
542    fn type_url() -> ::prost::alloc::string::String {
543        "/xmtp.keystore_api.v1.SaveInvitesRequest".into()
544    }
545}
546/// Response to a SaveInvitesRequest
547#[derive(Clone, PartialEq, ::prost::Message)]
548pub struct SaveInvitesResponse {
549    #[prost(message, repeated, tag = "1")]
550    pub responses: ::prost::alloc::vec::Vec<save_invites_response::Response>,
551}
552/// Nested message and enum types in `SaveInvitesResponse`.
553pub mod save_invites_response {
554    /// A single response
555    #[derive(Clone, PartialEq, ::prost::Message)]
556    pub struct Response {
557        #[prost(oneof = "response::Response", tags = "1, 2")]
558        pub response: ::core::option::Option<response::Response>,
559    }
560    /// Nested message and enum types in `Response`.
561    pub mod response {
562        /// Wrapper object for success response
563        #[derive(Clone, PartialEq, ::prost::Message)]
564        pub struct Success {
565            #[prost(message, optional, tag = "1")]
566            pub conversation: ::core::option::Option<
567                super::super::super::super::message_contents::ConversationReference,
568            >,
569        }
570        impl ::prost::Name for Success {
571            const NAME: &'static str = "Success";
572            const PACKAGE: &'static str = "xmtp.keystore_api.v1";
573            fn full_name() -> ::prost::alloc::string::String {
574                "xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success".into()
575            }
576            fn type_url() -> ::prost::alloc::string::String {
577                "/xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success".into()
578            }
579        }
580        #[derive(Clone, PartialEq, ::prost::Oneof)]
581        pub enum Response {
582            #[prost(message, tag = "1")]
583            Result(Success),
584            #[prost(message, tag = "2")]
585            Error(super::super::KeystoreError),
586        }
587    }
588    impl ::prost::Name for Response {
589        const NAME: &'static str = "Response";
590        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
591        fn full_name() -> ::prost::alloc::string::String {
592            "xmtp.keystore_api.v1.SaveInvitesResponse.Response".into()
593        }
594        fn type_url() -> ::prost::alloc::string::String {
595            "/xmtp.keystore_api.v1.SaveInvitesResponse.Response".into()
596        }
597    }
598}
599impl ::prost::Name for SaveInvitesResponse {
600    const NAME: &'static str = "SaveInvitesResponse";
601    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
602    fn full_name() -> ::prost::alloc::string::String {
603        "xmtp.keystore_api.v1.SaveInvitesResponse".into()
604    }
605    fn type_url() -> ::prost::alloc::string::String {
606        "/xmtp.keystore_api.v1.SaveInvitesResponse".into()
607    }
608}
609/// CreateAuthTokenRequest is used to create an auth token for the XMTP API
610#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
611pub struct CreateAuthTokenRequest {
612    #[prost(uint64, optional, tag = "1")]
613    pub timestamp_ns: ::core::option::Option<u64>,
614}
615impl ::prost::Name for CreateAuthTokenRequest {
616    const NAME: &'static str = "CreateAuthTokenRequest";
617    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
618    fn full_name() -> ::prost::alloc::string::String {
619        "xmtp.keystore_api.v1.CreateAuthTokenRequest".into()
620    }
621    fn type_url() -> ::prost::alloc::string::String {
622        "/xmtp.keystore_api.v1.CreateAuthTokenRequest".into()
623    }
624}
625/// SaveV1ConversationsRequest is used to save a batch of conversations to the
626/// built in persistence
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct SaveV1ConversationsRequest {
629    #[prost(message, repeated, tag = "1")]
630    pub conversations: ::prost::alloc::vec::Vec<
631        super::super::message_contents::ConversationReference,
632    >,
633}
634impl ::prost::Name for SaveV1ConversationsRequest {
635    const NAME: &'static str = "SaveV1ConversationsRequest";
636    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
637    fn full_name() -> ::prost::alloc::string::String {
638        "xmtp.keystore_api.v1.SaveV1ConversationsRequest".into()
639    }
640    fn type_url() -> ::prost::alloc::string::String {
641        "/xmtp.keystore_api.v1.SaveV1ConversationsRequest".into()
642    }
643}
644/// Placeholder response type for SaveV1Conversations
645#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
646pub struct SaveV1ConversationsResponse {}
647impl ::prost::Name for SaveV1ConversationsResponse {
648    const NAME: &'static str = "SaveV1ConversationsResponse";
649    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
650    fn full_name() -> ::prost::alloc::string::String {
651        "xmtp.keystore_api.v1.SaveV1ConversationsResponse".into()
652    }
653    fn type_url() -> ::prost::alloc::string::String {
654        "/xmtp.keystore_api.v1.SaveV1ConversationsResponse".into()
655    }
656}
657/// Response for GetV2Conversations
658#[derive(Clone, PartialEq, ::prost::Message)]
659pub struct GetConversationsResponse {
660    #[prost(message, repeated, tag = "1")]
661    pub conversations: ::prost::alloc::vec::Vec<
662        super::super::message_contents::ConversationReference,
663    >,
664}
665impl ::prost::Name for GetConversationsResponse {
666    const NAME: &'static str = "GetConversationsResponse";
667    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
668    fn full_name() -> ::prost::alloc::string::String {
669        "xmtp.keystore_api.v1.GetConversationsResponse".into()
670    }
671    fn type_url() -> ::prost::alloc::string::String {
672        "/xmtp.keystore_api.v1.GetConversationsResponse".into()
673    }
674}
675/// Used to check if the Keystore implementation has been setup for the given
676/// wallet address Only used for MM Snap Keystore currently
677#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
678pub struct GetKeystoreStatusRequest {
679    #[prost(string, tag = "1")]
680    pub wallet_address: ::prost::alloc::string::String,
681}
682impl ::prost::Name for GetKeystoreStatusRequest {
683    const NAME: &'static str = "GetKeystoreStatusRequest";
684    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
685    fn full_name() -> ::prost::alloc::string::String {
686        "xmtp.keystore_api.v1.GetKeystoreStatusRequest".into()
687    }
688    fn type_url() -> ::prost::alloc::string::String {
689        "/xmtp.keystore_api.v1.GetKeystoreStatusRequest".into()
690    }
691}
692/// Response to GetKeystoreStatusRequest
693#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
694pub struct GetKeystoreStatusResponse {
695    #[prost(enumeration = "get_keystore_status_response::KeystoreStatus", tag = "1")]
696    pub status: i32,
697}
698/// Nested message and enum types in `GetKeystoreStatusResponse`.
699pub mod get_keystore_status_response {
700    /// Status of the Keystore for the specified wallet address
701    #[derive(
702        Clone,
703        Copy,
704        Debug,
705        PartialEq,
706        Eq,
707        Hash,
708        PartialOrd,
709        Ord,
710        ::prost::Enumeration
711    )]
712    #[repr(i32)]
713    pub enum KeystoreStatus {
714        Unspecified = 0,
715        Uninitialized = 1,
716        Initialized = 2,
717    }
718    impl KeystoreStatus {
719        /// String value of the enum field names used in the ProtoBuf definition.
720        ///
721        /// The values are not transformed in any way and thus are considered stable
722        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
723        pub fn as_str_name(&self) -> &'static str {
724            match self {
725                Self::Unspecified => "KEYSTORE_STATUS_UNSPECIFIED",
726                Self::Uninitialized => "KEYSTORE_STATUS_UNINITIALIZED",
727                Self::Initialized => "KEYSTORE_STATUS_INITIALIZED",
728            }
729        }
730        /// Creates an enum from field names used in the ProtoBuf definition.
731        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
732            match value {
733                "KEYSTORE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
734                "KEYSTORE_STATUS_UNINITIALIZED" => Some(Self::Uninitialized),
735                "KEYSTORE_STATUS_INITIALIZED" => Some(Self::Initialized),
736                _ => None,
737            }
738        }
739    }
740}
741impl ::prost::Name for GetKeystoreStatusResponse {
742    const NAME: &'static str = "GetKeystoreStatusResponse";
743    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
744    fn full_name() -> ::prost::alloc::string::String {
745        "xmtp.keystore_api.v1.GetKeystoreStatusResponse".into()
746    }
747    fn type_url() -> ::prost::alloc::string::String {
748        "/xmtp.keystore_api.v1.GetKeystoreStatusResponse".into()
749    }
750}
751/// Used to initialize the Keystore with a private key bundle retrieved from the
752/// client
753#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct InitKeystoreRequest {
755    #[prost(oneof = "init_keystore_request::Bundle", tags = "1")]
756    pub bundle: ::core::option::Option<init_keystore_request::Bundle>,
757}
758/// Nested message and enum types in `InitKeystoreRequest`.
759pub mod init_keystore_request {
760    #[derive(Clone, PartialEq, ::prost::Oneof)]
761    pub enum Bundle {
762        #[prost(message, tag = "1")]
763        V1(super::super::super::message_contents::PrivateKeyBundleV1),
764    }
765}
766impl ::prost::Name for InitKeystoreRequest {
767    const NAME: &'static str = "InitKeystoreRequest";
768    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
769    fn full_name() -> ::prost::alloc::string::String {
770        "xmtp.keystore_api.v1.InitKeystoreRequest".into()
771    }
772    fn type_url() -> ::prost::alloc::string::String {
773        "/xmtp.keystore_api.v1.InitKeystoreRequest".into()
774    }
775}
776/// Response to the request to initialize the Keystore
777#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
778pub struct InitKeystoreResponse {
779    #[prost(message, optional, tag = "1")]
780    pub error: ::core::option::Option<KeystoreError>,
781}
782impl ::prost::Name for InitKeystoreResponse {
783    const NAME: &'static str = "InitKeystoreResponse";
784    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
785    fn full_name() -> ::prost::alloc::string::String {
786        "xmtp.keystore_api.v1.InitKeystoreResponse".into()
787    }
788    fn type_url() -> ::prost::alloc::string::String {
789        "/xmtp.keystore_api.v1.InitKeystoreResponse".into()
790    }
791}
792/// SignDigestRequest is used to sign a digest with either the identity key
793/// or a prekey
794#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
795pub struct SignDigestRequest {
796    #[prost(bytes = "vec", tag = "1")]
797    pub digest: ::prost::alloc::vec::Vec<u8>,
798    #[prost(oneof = "sign_digest_request::Signer", tags = "2, 3")]
799    pub signer: ::core::option::Option<sign_digest_request::Signer>,
800}
801/// Nested message and enum types in `SignDigestRequest`.
802pub mod sign_digest_request {
803    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
804    pub enum Signer {
805        #[prost(bool, tag = "2")]
806        IdentityKey(bool),
807        #[prost(uint32, tag = "3")]
808        PrekeyIndex(u32),
809    }
810}
811impl ::prost::Name for SignDigestRequest {
812    const NAME: &'static str = "SignDigestRequest";
813    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
814    fn full_name() -> ::prost::alloc::string::String {
815        "xmtp.keystore_api.v1.SignDigestRequest".into()
816    }
817    fn type_url() -> ::prost::alloc::string::String {
818        "/xmtp.keystore_api.v1.SignDigestRequest".into()
819    }
820}
821/// GetRefreshJobRequest is used to get the last run time of a refresh job
822#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
823pub struct GetRefreshJobRequest {
824    #[prost(enumeration = "JobType", tag = "1")]
825    pub job_type: i32,
826}
827impl ::prost::Name for GetRefreshJobRequest {
828    const NAME: &'static str = "GetRefreshJobRequest";
829    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
830    fn full_name() -> ::prost::alloc::string::String {
831        "xmtp.keystore_api.v1.GetRefreshJobRequest".into()
832    }
833    fn type_url() -> ::prost::alloc::string::String {
834        "/xmtp.keystore_api.v1.GetRefreshJobRequest".into()
835    }
836}
837/// GetRefreshJobResponse is used to return the last run time of a refresh job
838#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
839pub struct GetRefreshJobResponse {
840    #[prost(int64, tag = "1")]
841    pub last_run_ns: i64,
842}
843impl ::prost::Name for GetRefreshJobResponse {
844    const NAME: &'static str = "GetRefreshJobResponse";
845    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
846    fn full_name() -> ::prost::alloc::string::String {
847        "xmtp.keystore_api.v1.GetRefreshJobResponse".into()
848    }
849    fn type_url() -> ::prost::alloc::string::String {
850        "/xmtp.keystore_api.v1.GetRefreshJobResponse".into()
851    }
852}
853/// SetRefreshJobRequest is used to set the last run time of a refresh job
854#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
855pub struct SetRefeshJobRequest {
856    #[prost(enumeration = "JobType", tag = "1")]
857    pub job_type: i32,
858    #[prost(int64, tag = "2")]
859    pub last_run_ns: i64,
860}
861impl ::prost::Name for SetRefeshJobRequest {
862    const NAME: &'static str = "SetRefeshJobRequest";
863    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
864    fn full_name() -> ::prost::alloc::string::String {
865        "xmtp.keystore_api.v1.SetRefeshJobRequest".into()
866    }
867    fn type_url() -> ::prost::alloc::string::String {
868        "/xmtp.keystore_api.v1.SetRefeshJobRequest".into()
869    }
870}
871/// SetRefreshJobResponse is an empty response type
872#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
873pub struct SetRefreshJobResponse {}
874impl ::prost::Name for SetRefreshJobResponse {
875    const NAME: &'static str = "SetRefreshJobResponse";
876    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
877    fn full_name() -> ::prost::alloc::string::String {
878        "xmtp.keystore_api.v1.SetRefreshJobResponse".into()
879    }
880    fn type_url() -> ::prost::alloc::string::String {
881        "/xmtp.keystore_api.v1.SetRefreshJobResponse".into()
882    }
883}
884/// A mapping of topics to their decrypted invitations
885#[derive(Clone, PartialEq, ::prost::Message)]
886pub struct TopicMap {
887    #[prost(map = "string, message", tag = "1")]
888    pub topics: ::std::collections::HashMap<
889        ::prost::alloc::string::String,
890        topic_map::TopicData,
891    >,
892}
893/// Nested message and enum types in `TopicMap`.
894pub mod topic_map {
895    /// TopicData wraps the invitation and the timestamp it was created
896    #[derive(Clone, PartialEq, ::prost::Message)]
897    pub struct TopicData {
898        #[prost(uint64, tag = "1")]
899        pub created_ns: u64,
900        #[prost(string, tag = "2")]
901        pub peer_address: ::prost::alloc::string::String,
902        #[prost(message, optional, tag = "3")]
903        pub invitation: ::core::option::Option<
904            super::super::super::message_contents::InvitationV1,
905        >,
906    }
907    impl ::prost::Name for TopicData {
908        const NAME: &'static str = "TopicData";
909        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
910        fn full_name() -> ::prost::alloc::string::String {
911            "xmtp.keystore_api.v1.TopicMap.TopicData".into()
912        }
913        fn type_url() -> ::prost::alloc::string::String {
914            "/xmtp.keystore_api.v1.TopicMap.TopicData".into()
915        }
916    }
917}
918impl ::prost::Name for TopicMap {
919    const NAME: &'static str = "TopicMap";
920    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
921    fn full_name() -> ::prost::alloc::string::String {
922        "xmtp.keystore_api.v1.TopicMap".into()
923    }
924    fn type_url() -> ::prost::alloc::string::String {
925        "/xmtp.keystore_api.v1.TopicMap".into()
926    }
927}
928/// Used to get a mapping of conversation topics to their HMAC keys
929#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
930pub struct GetConversationHmacKeysRequest {
931    #[prost(string, repeated, tag = "1")]
932    pub topics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
933}
934impl ::prost::Name for GetConversationHmacKeysRequest {
935    const NAME: &'static str = "GetConversationHmacKeysRequest";
936    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
937    fn full_name() -> ::prost::alloc::string::String {
938        "xmtp.keystore_api.v1.GetConversationHmacKeysRequest".into()
939    }
940    fn type_url() -> ::prost::alloc::string::String {
941        "/xmtp.keystore_api.v1.GetConversationHmacKeysRequest".into()
942    }
943}
944/// A mapping of topics to their HMAC keys
945#[derive(Clone, PartialEq, ::prost::Message)]
946pub struct GetConversationHmacKeysResponse {
947    #[prost(map = "string, message", tag = "1")]
948    pub hmac_keys: ::std::collections::HashMap<
949        ::prost::alloc::string::String,
950        get_conversation_hmac_keys_response::HmacKeys,
951    >,
952}
953/// Nested message and enum types in `GetConversationHmacKeysResponse`.
954pub mod get_conversation_hmac_keys_response {
955    /// HmacKeyData wraps the HMAC key and the number of 30 day periods since epoch
956    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
957    pub struct HmacKeyData {
958        #[prost(int32, tag = "1")]
959        pub thirty_day_periods_since_epoch: i32,
960        #[prost(bytes = "vec", tag = "2")]
961        pub hmac_key: ::prost::alloc::vec::Vec<u8>,
962    }
963    impl ::prost::Name for HmacKeyData {
964        const NAME: &'static str = "HmacKeyData";
965        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
966        fn full_name() -> ::prost::alloc::string::String {
967            "xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeyData".into()
968        }
969        fn type_url() -> ::prost::alloc::string::String {
970            "/xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeyData".into()
971        }
972    }
973    /// HmacKeys represents multiple HmacKeyData objects
974    #[derive(Clone, PartialEq, ::prost::Message)]
975    pub struct HmacKeys {
976        #[prost(message, repeated, tag = "1")]
977        pub values: ::prost::alloc::vec::Vec<HmacKeyData>,
978    }
979    impl ::prost::Name for HmacKeys {
980        const NAME: &'static str = "HmacKeys";
981        const PACKAGE: &'static str = "xmtp.keystore_api.v1";
982        fn full_name() -> ::prost::alloc::string::String {
983            "xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeys".into()
984        }
985        fn type_url() -> ::prost::alloc::string::String {
986            "/xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeys".into()
987        }
988    }
989}
990impl ::prost::Name for GetConversationHmacKeysResponse {
991    const NAME: &'static str = "GetConversationHmacKeysResponse";
992    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
993    fn full_name() -> ::prost::alloc::string::String {
994        "xmtp.keystore_api.v1.GetConversationHmacKeysResponse".into()
995    }
996    fn type_url() -> ::prost::alloc::string::String {
997        "/xmtp.keystore_api.v1.GetConversationHmacKeysResponse".into()
998    }
999}
1000/// A mapping of message hashes to their private preferences action
1001#[derive(Clone, PartialEq, ::prost::Message)]
1002pub struct PrivatePreferencesActionMap {
1003    #[prost(map = "string, message", tag = "1")]
1004    pub actions: ::std::collections::HashMap<
1005        ::prost::alloc::string::String,
1006        super::super::message_contents::PrivatePreferencesAction,
1007    >,
1008}
1009impl ::prost::Name for PrivatePreferencesActionMap {
1010    const NAME: &'static str = "PrivatePreferencesActionMap";
1011    const PACKAGE: &'static str = "xmtp.keystore_api.v1";
1012    fn full_name() -> ::prost::alloc::string::String {
1013        "xmtp.keystore_api.v1.PrivatePreferencesActionMap".into()
1014    }
1015    fn type_url() -> ::prost::alloc::string::String {
1016        "/xmtp.keystore_api.v1.PrivatePreferencesActionMap".into()
1017    }
1018}
1019/// Application-specific error codes for the Keystore API.
1020#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1021#[repr(i32)]
1022pub enum ErrorCode {
1023    Unspecified = 0,
1024    InvalidInput = 1,
1025    NoMatchingPrekey = 2,
1026}
1027impl ErrorCode {
1028    /// String value of the enum field names used in the ProtoBuf definition.
1029    ///
1030    /// The values are not transformed in any way and thus are considered stable
1031    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1032    pub fn as_str_name(&self) -> &'static str {
1033        match self {
1034            Self::Unspecified => "ERROR_CODE_UNSPECIFIED",
1035            Self::InvalidInput => "ERROR_CODE_INVALID_INPUT",
1036            Self::NoMatchingPrekey => "ERROR_CODE_NO_MATCHING_PREKEY",
1037        }
1038    }
1039    /// Creates an enum from field names used in the ProtoBuf definition.
1040    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1041        match value {
1042            "ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
1043            "ERROR_CODE_INVALID_INPUT" => Some(Self::InvalidInput),
1044            "ERROR_CODE_NO_MATCHING_PREKEY" => Some(Self::NoMatchingPrekey),
1045            _ => None,
1046        }
1047    }
1048}
1049/// JobType is used to specify the type of job the caller would like info on
1050#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1051#[repr(i32)]
1052pub enum JobType {
1053    Unspecified = 0,
1054    RefreshV1 = 1,
1055    RefreshV2 = 2,
1056    RefreshPppp = 3,
1057}
1058impl JobType {
1059    /// String value of the enum field names used in the ProtoBuf definition.
1060    ///
1061    /// The values are not transformed in any way and thus are considered stable
1062    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1063    pub fn as_str_name(&self) -> &'static str {
1064        match self {
1065            Self::Unspecified => "JOB_TYPE_UNSPECIFIED",
1066            Self::RefreshV1 => "JOB_TYPE_REFRESH_V1",
1067            Self::RefreshV2 => "JOB_TYPE_REFRESH_V2",
1068            Self::RefreshPppp => "JOB_TYPE_REFRESH_PPPP",
1069        }
1070    }
1071    /// Creates an enum from field names used in the ProtoBuf definition.
1072    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1073        match value {
1074            "JOB_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1075            "JOB_TYPE_REFRESH_V1" => Some(Self::RefreshV1),
1076            "JOB_TYPE_REFRESH_V2" => Some(Self::RefreshV2),
1077            "JOB_TYPE_REFRESH_PPPP" => Some(Self::RefreshPppp),
1078            _ => None,
1079        }
1080    }
1081}