exomind_protos/generated/
exomind.base.v1.rs

1#![allow(clippy::derive_partial_eq_without_eq)]
2// Fields groups
3//   #1: Fields necessary for search/listing
4
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Collection {
7    #[prost(string, tag = "1")]
8    pub name: ::prost::alloc::string::String,
9    #[prost(string, tag = "2")]
10    pub description: ::prost::alloc::string::String,
11}
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct CollectionChild {
14    #[prost(message, optional, tag = "1")]
15    pub collection: ::core::option::Option<super::super::super::exocore::store::Reference>,
16    #[prost(uint64, tag = "2")]
17    pub weight: u64,
18}
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct Snoozed {
21    #[prost(message, optional, tag = "2")]
22    pub until_date: ::core::option::Option<::prost_types::Timestamp>,
23}
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct Unread {
26    /// Reference to the unread trait of the entity.
27    /// Ex: points to the email trait that hasn't been read.
28    #[prost(message, optional, tag = "1")]
29    pub entity: ::core::option::Option<super::super::super::exocore::store::Reference>,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct Account {
33    #[prost(string, tag = "1")]
34    pub key: ::prost::alloc::string::String,
35    #[prost(string, tag = "2")]
36    pub name: ::prost::alloc::string::String,
37    #[prost(enumeration = "AccountType", tag = "3")]
38    pub r#type: i32,
39    #[prost(enumeration = "AccountScope", repeated, tag = "4")]
40    pub scopes: ::prost::alloc::vec::Vec<i32>,
41    #[prost(map = "string, string", tag = "5")]
42    pub data:
43        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
44}
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct EmailThread {
47    /// TODO: These 2 fields should probably be into a "source" object ?
48    #[prost(message, optional, tag = "1")]
49    pub account: ::core::option::Option<super::super::super::exocore::store::Reference>,
50    #[prost(string, tag = "2")]
51    pub source_id: ::prost::alloc::string::String,
52    #[prost(message, optional, tag = "3")]
53    pub from: ::core::option::Option<Contact>,
54    #[prost(string, tag = "4")]
55    pub subject: ::prost::alloc::string::String,
56    #[prost(string, tag = "5")]
57    pub snippet: ::prost::alloc::string::String,
58    #[prost(message, optional, tag = "6")]
59    pub last_email: ::core::option::Option<super::super::super::exocore::store::Reference>,
60    #[deprecated]
61    #[prost(bool, tag = "7")]
62    pub read: bool,
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct Email {
66    #[prost(message, optional, tag = "1")]
67    pub account: ::core::option::Option<super::super::super::exocore::store::Reference>,
68    #[prost(string, tag = "2")]
69    pub source_id: ::prost::alloc::string::String,
70    #[prost(message, optional, tag = "3")]
71    pub from: ::core::option::Option<Contact>,
72    #[prost(message, optional, tag = "4")]
73    pub received_date: ::core::option::Option<::prost_types::Timestamp>,
74    #[prost(message, repeated, tag = "5")]
75    pub to: ::prost::alloc::vec::Vec<Contact>,
76    #[prost(message, repeated, tag = "6")]
77    pub cc: ::prost::alloc::vec::Vec<Contact>,
78    #[prost(message, repeated, tag = "7")]
79    pub bcc: ::prost::alloc::vec::Vec<Contact>,
80    #[prost(string, tag = "8")]
81    pub subject: ::prost::alloc::string::String,
82    #[prost(string, tag = "9")]
83    pub snippet: ::prost::alloc::string::String,
84    #[prost(message, repeated, tag = "10")]
85    pub parts: ::prost::alloc::vec::Vec<EmailPart>,
86    #[prost(message, repeated, tag = "11")]
87    pub attachments: ::prost::alloc::vec::Vec<EmailAttachment>,
88    #[deprecated]
89    #[prost(bool, tag = "14")]
90    pub read: bool,
91}
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct DraftEmail {
94    #[prost(message, optional, tag = "1")]
95    pub account: ::core::option::Option<super::super::super::exocore::store::Reference>,
96    #[prost(message, optional, tag = "2")]
97    pub in_reply_to: ::core::option::Option<super::super::super::exocore::store::Reference>,
98    #[prost(message, repeated, tag = "3")]
99    pub to: ::prost::alloc::vec::Vec<Contact>,
100    #[prost(message, repeated, tag = "4")]
101    pub cc: ::prost::alloc::vec::Vec<Contact>,
102    #[prost(message, repeated, tag = "5")]
103    pub bcc: ::prost::alloc::vec::Vec<Contact>,
104    #[prost(string, tag = "6")]
105    pub subject: ::prost::alloc::string::String,
106    #[prost(message, repeated, tag = "7")]
107    pub parts: ::prost::alloc::vec::Vec<EmailPart>,
108    #[prost(message, repeated, tag = "8")]
109    pub attachments: ::prost::alloc::vec::Vec<EmailAttachment>,
110    #[prost(message, optional, tag = "9")]
111    pub sending_date: ::core::option::Option<::prost_types::Timestamp>,
112    #[prost(message, optional, tag = "10")]
113    pub sent_date: ::core::option::Option<::prost_types::Timestamp>,
114}
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct EmailPart {
117    #[prost(string, tag = "1")]
118    pub mime_type: ::prost::alloc::string::String,
119    #[prost(string, tag = "2")]
120    pub body: ::prost::alloc::string::String,
121}
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct EmailAttachment {
124    #[prost(string, tag = "1")]
125    pub key: ::prost::alloc::string::String,
126    #[prost(string, tag = "2")]
127    pub name: ::prost::alloc::string::String,
128    #[prost(string, tag = "3")]
129    pub mime_type: ::prost::alloc::string::String,
130    #[prost(uint64, tag = "4")]
131    pub size: u64,
132    #[prost(string, tag = "5")]
133    pub inline_placeholder: ::prost::alloc::string::String,
134    #[prost(map = "string, string", tag = "6")]
135    pub data:
136        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
137}
138#[derive(Clone, PartialEq, ::prost::Message)]
139pub struct Note {
140    #[prost(string, tag = "1")]
141    pub title: ::prost::alloc::string::String,
142    #[prost(string, tag = "2")]
143    pub body: ::prost::alloc::string::String,
144}
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct Contact {
147    #[prost(string, tag = "1")]
148    pub name: ::prost::alloc::string::String,
149    #[prost(string, tag = "2")]
150    pub email: ::prost::alloc::string::String,
151}
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct Task {
154    #[prost(string, tag = "1")]
155    pub title: ::prost::alloc::string::String,
156}
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct Link {
159    #[prost(string, tag = "1")]
160    pub url: ::prost::alloc::string::String,
161    #[prost(string, tag = "2")]
162    pub title: ::prost::alloc::string::String,
163}
164#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
165#[repr(i32)]
166pub enum AccountType {
167    Invalid = 0,
168    Gmail = 1,
169}
170impl AccountType {
171    /// String value of the enum field names used in the ProtoBuf definition.
172    ///
173    /// The values are not transformed in any way and thus are considered stable
174    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
175    pub fn as_str_name(&self) -> &'static str {
176        match self {
177            AccountType::Invalid => "ACCOUNT_TYPE_INVALID",
178            AccountType::Gmail => "ACCOUNT_TYPE_GMAIL",
179        }
180    }
181}
182#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
183#[repr(i32)]
184pub enum AccountScope {
185    Invalid = 0,
186    Email = 1,
187}
188impl AccountScope {
189    /// String value of the enum field names used in the ProtoBuf definition.
190    ///
191    /// The values are not transformed in any way and thus are considered stable
192    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
193    pub fn as_str_name(&self) -> &'static str {
194        match self {
195            AccountScope::Invalid => "ACCOUNT_SCOPE_INVALID",
196            AccountScope::Email => "ACCOUNT_SCOPE_EMAIL",
197        }
198    }
199}