megacommerce_proto/
common.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct ConfigMain {
4    #[prost(string, optional, tag = "1")]
5    pub env: ::core::option::Option<::prost::alloc::string::String>,
6    #[prost(string, optional, tag = "2")]
7    pub site_name: ::core::option::Option<::prost::alloc::string::String>,
8    #[prost(string, optional, tag = "3")]
9    pub site_url: ::core::option::Option<::prost::alloc::string::String>,
10    #[prost(bool, optional, tag = "5")]
11    pub enable_link_previews: ::core::option::Option<bool>,
12    #[prost(string, optional, tag = "6")]
13    pub restrict_link_previews: ::core::option::Option<::prost::alloc::string::String>,
14    #[prost(bool, optional, tag = "7")]
15    pub enable_client_performance_debugging: ::core::option::Option<bool>,
16    #[prost(bool, optional, tag = "8")]
17    pub enable_gif_picker: ::core::option::Option<bool>,
18    #[prost(bool, optional, tag = "9")]
19    pub enable_custom_emoji: ::core::option::Option<bool>,
20    #[prost(bool, optional, tag = "10")]
21    pub enable_emoji_picker: ::core::option::Option<bool>,
22    #[prost(int64, optional, tag = "11")]
23    pub time_between_user_typing_updates_milliseconds: ::core::option::Option<i64>,
24    #[prost(bool, optional, tag = "12")]
25    pub enable_file_search: ::core::option::Option<bool>,
26    #[prost(bool, optional, tag = "13")]
27    pub enable_user_typing_messages: ::core::option::Option<bool>,
28    #[prost(bool, optional, tag = "14")]
29    pub enable_user_statuses: ::core::option::Option<bool>,
30    #[prost(bool, optional, tag = "15")]
31    pub enable_email_invitations: ::core::option::Option<bool>,
32    #[prost(bool, optional, tag = "16")]
33    pub enable_svgs: ::core::option::Option<bool>,
34    #[prost(bool, optional, tag = "17")]
35    pub allow_persistent_notifications: ::core::option::Option<bool>,
36    #[prost(int32, optional, tag = "18")]
37    pub persistent_notification_interval_minutes: ::core::option::Option<i32>,
38    #[prost(int32, optional, tag = "19")]
39    pub persistent_notification_max_count: ::core::option::Option<i32>,
40    #[prost(int32, optional, tag = "20")]
41    pub persistent_notification_max_recipients: ::core::option::Option<i32>,
42    #[prost(int32, optional, tag = "21")]
43    pub feature_flag_sync_interval_seconds: ::core::option::Option<i32>,
44    #[prost(bool, optional, tag = "22")]
45    pub allow_synced_drafts: ::core::option::Option<bool>,
46}
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct ConfigServices {
49    #[prost(string, optional, tag = "1")]
50    pub common_service_grpc_url: ::core::option::Option<::prost::alloc::string::String>,
51    #[prost(string, optional, tag = "2")]
52    pub user_service_grpc_url: ::core::option::Option<::prost::alloc::string::String>,
53    #[prost(string, optional, tag = "3")]
54    pub products_service_grpc_url: ::core::option::Option<
55        ::prost::alloc::string::String,
56    >,
57    #[prost(string, optional, tag = "4")]
58    pub jaeger_collector_url: ::core::option::Option<::prost::alloc::string::String>,
59    #[prost(string, optional, tag = "5")]
60    pub common_service_prometheus_url: ::core::option::Option<
61        ::prost::alloc::string::String,
62    >,
63    #[prost(string, optional, tag = "6")]
64    pub user_service_prometheus_url: ::core::option::Option<
65        ::prost::alloc::string::String,
66    >,
67    #[prost(string, optional, tag = "7")]
68    pub products_service_prometheus_url: ::core::option::Option<
69        ::prost::alloc::string::String,
70    >,
71}
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct ConfigSecurity {
74    #[prost(map = "string, string", tag = "1")]
75    pub restricted_usernames: ::std::collections::HashMap<
76        ::prost::alloc::string::String,
77        ::prost::alloc::string::String,
78    >,
79    #[prost(int32, optional, tag = "2")]
80    pub maximum_login_attempts: ::core::option::Option<i32>,
81    #[prost(bool, optional, tag = "3")]
82    pub enable_insecure_outgoing_connections: ::core::option::Option<bool>,
83    #[prost(bool, optional, tag = "4")]
84    pub enable_multifactor_authentication: ::core::option::Option<bool>,
85    #[prost(bool, optional, tag = "5")]
86    pub enforce_multifactor_authentication: ::core::option::Option<bool>,
87    #[prost(bool, optional, tag = "6")]
88    pub enable_oauth_service_provider: ::core::option::Option<bool>,
89    #[prost(bool, optional, tag = "7")]
90    pub enable_outgoing_oauth_connections: ::core::option::Option<bool>,
91    #[prost(bool, optional, tag = "8")]
92    pub terminate_sessions_on_password_change: ::core::option::Option<bool>,
93    #[prost(int32, optional, tag = "9")]
94    pub session_length_web_in_hours: ::core::option::Option<i32>,
95    #[prost(int32, optional, tag = "10")]
96    pub session_length_mobile_in_hours: ::core::option::Option<i32>,
97    #[prost(int32, optional, tag = "11")]
98    pub session_length_sso_in_hours: ::core::option::Option<i32>,
99    #[prost(string, optional, tag = "12")]
100    pub allow_cors_from: ::core::option::Option<::prost::alloc::string::String>,
101    #[prost(string, optional, tag = "13")]
102    pub cors_exposed_headers: ::core::option::Option<::prost::alloc::string::String>,
103    #[prost(bool, optional, tag = "14")]
104    pub cors_allow_credentials: ::core::option::Option<bool>,
105    #[prost(bool, optional, tag = "15")]
106    pub cors_debug: ::core::option::Option<bool>,
107    #[prost(bool, optional, tag = "16")]
108    pub allow_cookies_for_subdomains: ::core::option::Option<bool>,
109    #[prost(int32, optional, tag = "17")]
110    pub session_cache_in_minutes: ::core::option::Option<i32>,
111    #[prost(string, optional, tag = "18")]
112    pub email_confirmation_url: ::core::option::Option<::prost::alloc::string::String>,
113}
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct CacheConfig {
116    #[prost(string, optional, tag = "1")]
117    pub cache_type: ::core::option::Option<::prost::alloc::string::String>,
118    #[prost(string, optional, tag = "2")]
119    pub redis_address: ::core::option::Option<::prost::alloc::string::String>,
120    #[prost(string, optional, tag = "3")]
121    pub redis_password: ::core::option::Option<::prost::alloc::string::String>,
122    #[prost(int32, optional, tag = "4")]
123    pub redis_db: ::core::option::Option<i32>,
124    #[prost(string, optional, tag = "5")]
125    pub redis_cache_prefix: ::core::option::Option<::prost::alloc::string::String>,
126    #[prost(bool, optional, tag = "6")]
127    pub disable_client_cache: ::core::option::Option<bool>,
128}
129#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct ConfigMetrics {
131    #[prost(bool, optional, tag = "1")]
132    pub enable: ::core::option::Option<bool>,
133    #[prost(int32, optional, tag = "2")]
134    pub block_profile_rate: ::core::option::Option<i32>,
135    #[prost(string, optional, tag = "3")]
136    pub listen_address: ::core::option::Option<::prost::alloc::string::String>,
137    #[prost(bool, optional, tag = "4")]
138    pub enable_client_metrics: ::core::option::Option<bool>,
139    #[prost(bool, optional, tag = "5")]
140    pub enable_notification_metrics: ::core::option::Option<bool>,
141    #[prost(string, repeated, tag = "6")]
142    pub client_side_user_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
143}
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct ConfigSso {
146    #[prost(bool, optional, tag = "1")]
147    pub enable: ::core::option::Option<bool>,
148    #[prost(string, optional, tag = "2")]
149    pub secret: ::core::option::Option<::prost::alloc::string::String>,
150    #[prost(string, optional, tag = "3")]
151    pub id: ::core::option::Option<::prost::alloc::string::String>,
152    #[prost(string, optional, tag = "4")]
153    pub scope: ::core::option::Option<::prost::alloc::string::String>,
154    #[prost(string, optional, tag = "5")]
155    pub auth_endpoint: ::core::option::Option<::prost::alloc::string::String>,
156    #[prost(string, optional, tag = "6")]
157    pub token_endpoint: ::core::option::Option<::prost::alloc::string::String>,
158    #[prost(string, optional, tag = "7")]
159    pub user_api_endpoint: ::core::option::Option<::prost::alloc::string::String>,
160    #[prost(string, optional, tag = "8")]
161    pub discovery_endpoint: ::core::option::Option<::prost::alloc::string::String>,
162    #[prost(string, optional, tag = "9")]
163    pub button_text: ::core::option::Option<::prost::alloc::string::String>,
164    #[prost(string, optional, tag = "10")]
165    pub button_color: ::core::option::Option<::prost::alloc::string::String>,
166}
167#[derive(Clone, PartialEq, ::prost::Message)]
168pub struct ConfigSql {
169    #[prost(string, optional, tag = "1")]
170    pub driver_name: ::core::option::Option<::prost::alloc::string::String>,
171    #[prost(string, optional, tag = "2")]
172    pub data_source: ::core::option::Option<::prost::alloc::string::String>,
173    #[prost(int32, optional, tag = "3")]
174    pub max_idle_conns: ::core::option::Option<i32>,
175    #[prost(int32, optional, tag = "4")]
176    pub conn_max_lifetime_milliseconds: ::core::option::Option<i32>,
177    #[prost(int32, optional, tag = "5")]
178    pub conn_max_idle_time_milliseconds: ::core::option::Option<i32>,
179    #[prost(int32, optional, tag = "6")]
180    pub max_open_conns: ::core::option::Option<i32>,
181    #[prost(bool, optional, tag = "7")]
182    pub trace: ::core::option::Option<bool>,
183    #[prost(string, optional, tag = "8")]
184    pub at_rest_encrypt_key: ::core::option::Option<::prost::alloc::string::String>,
185    #[prost(int32, optional, tag = "9")]
186    pub query_timeout: ::core::option::Option<i32>,
187    #[prost(bool, optional, tag = "10")]
188    pub disable_database_search: ::core::option::Option<bool>,
189}
190#[derive(Clone, Copy, PartialEq, ::prost::Message)]
191pub struct ConfigPassword {
192    #[prost(int32, optional, tag = "1")]
193    pub minimum_length: ::core::option::Option<i32>,
194    #[prost(int32, optional, tag = "2")]
195    pub maximum_length: ::core::option::Option<i32>,
196    #[prost(bool, optional, tag = "3")]
197    pub lowercase: ::core::option::Option<bool>,
198    #[prost(bool, optional, tag = "4")]
199    pub number: ::core::option::Option<bool>,
200    #[prost(bool, optional, tag = "5")]
201    pub uppercase: ::core::option::Option<bool>,
202    #[prost(bool, optional, tag = "6")]
203    pub symbol: ::core::option::Option<bool>,
204    #[prost(bool, optional, tag = "7")]
205    pub enable_forgot_link: ::core::option::Option<bool>,
206}
207#[derive(Clone, PartialEq, ::prost::Message)]
208pub struct ConfigFile {
209    #[prost(bool, optional, tag = "1")]
210    pub enable_file_attachments: ::core::option::Option<bool>,
211    #[prost(bool, optional, tag = "2")]
212    pub enable_mobile_upload: ::core::option::Option<bool>,
213    #[prost(bool, optional, tag = "3")]
214    pub enable_mobile_download: ::core::option::Option<bool>,
215    #[prost(int64, optional, tag = "4")]
216    pub max_file_size: ::core::option::Option<i64>,
217    #[prost(int64, optional, tag = "5")]
218    pub max_image_resolution: ::core::option::Option<i64>,
219    #[prost(int64, optional, tag = "6")]
220    pub max_image_decoder_concurrency: ::core::option::Option<i64>,
221    #[prost(string, optional, tag = "7")]
222    pub driver_name: ::core::option::Option<::prost::alloc::string::String>,
223    #[prost(string, optional, tag = "8")]
224    pub directory: ::core::option::Option<::prost::alloc::string::String>,
225    #[prost(bool, optional, tag = "9")]
226    pub enable_public_link: ::core::option::Option<bool>,
227    #[prost(bool, optional, tag = "10")]
228    pub extract_content: ::core::option::Option<bool>,
229    #[prost(bool, optional, tag = "11")]
230    pub archive_recursion: ::core::option::Option<bool>,
231    #[prost(string, optional, tag = "12")]
232    pub public_link_salt: ::core::option::Option<::prost::alloc::string::String>,
233    #[prost(string, optional, tag = "13")]
234    pub initial_font: ::core::option::Option<::prost::alloc::string::String>,
235    #[prost(string, optional, tag = "14")]
236    pub amazon_s3_access_key_id: ::core::option::Option<::prost::alloc::string::String>,
237    #[prost(string, optional, tag = "15")]
238    pub amazon_s3_secret_access_key: ::core::option::Option<
239        ::prost::alloc::string::String,
240    >,
241    #[prost(string, optional, tag = "16")]
242    pub amazon_s3_bucket: ::core::option::Option<::prost::alloc::string::String>,
243    #[prost(string, optional, tag = "17")]
244    pub amazon_s3_path_prefix: ::core::option::Option<::prost::alloc::string::String>,
245    #[prost(string, optional, tag = "18")]
246    pub amazon_s3_region: ::core::option::Option<::prost::alloc::string::String>,
247    #[prost(string, optional, tag = "19")]
248    pub amazon_s3_endpoint: ::core::option::Option<::prost::alloc::string::String>,
249    #[prost(bool, optional, tag = "20")]
250    pub amazon_s3_ssl: ::core::option::Option<bool>,
251    #[prost(bool, optional, tag = "21")]
252    pub amazon_s3_sign_v2: ::core::option::Option<bool>,
253    #[prost(bool, optional, tag = "22")]
254    pub amazon_s3_sse: ::core::option::Option<bool>,
255    #[prost(bool, optional, tag = "23")]
256    pub amazon_s3_trace: ::core::option::Option<bool>,
257    #[prost(int64, optional, tag = "24")]
258    pub amazon_s3_request_timeout_milliseconds: ::core::option::Option<i64>,
259    #[prost(int64, optional, tag = "25")]
260    pub amazon_s3_upload_part_size_bytes: ::core::option::Option<i64>,
261    #[prost(string, optional, tag = "26")]
262    pub amazon_s3_storage_class: ::core::option::Option<::prost::alloc::string::String>,
263}
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct ConfigEmail {
266    #[prost(bool, optional, tag = "1")]
267    pub send_email_notifications: ::core::option::Option<bool>,
268    #[prost(bool, optional, tag = "2")]
269    pub require_email_verification: ::core::option::Option<bool>,
270    #[prost(string, optional, tag = "3")]
271    pub feedback_email: ::core::option::Option<::prost::alloc::string::String>,
272    #[prost(string, optional, tag = "4")]
273    pub reply_to_address: ::core::option::Option<::prost::alloc::string::String>,
274    #[prost(bool, optional, tag = "5")]
275    pub enable_smtp_auth: ::core::option::Option<bool>,
276    #[prost(string, optional, tag = "6")]
277    pub smtp_username: ::core::option::Option<::prost::alloc::string::String>,
278    #[prost(string, optional, tag = "7")]
279    pub smtp_password: ::core::option::Option<::prost::alloc::string::String>,
280    #[prost(string, optional, tag = "8")]
281    pub smtp_server: ::core::option::Option<::prost::alloc::string::String>,
282    #[prost(string, optional, tag = "9")]
283    pub smtp_port: ::core::option::Option<::prost::alloc::string::String>,
284    #[prost(int32, optional, tag = "10")]
285    pub smtp_server_timeout: ::core::option::Option<i32>,
286    #[prost(string, optional, tag = "11")]
287    pub connection_security: ::core::option::Option<::prost::alloc::string::String>,
288    #[prost(bool, optional, tag = "12")]
289    pub send_push_notifications: ::core::option::Option<bool>,
290    #[prost(string, optional, tag = "13")]
291    pub push_notification_server: ::core::option::Option<::prost::alloc::string::String>,
292    #[prost(string, optional, tag = "14")]
293    pub push_notification_contents: ::core::option::Option<
294        ::prost::alloc::string::String,
295    >,
296    #[prost(int32, optional, tag = "15")]
297    pub push_notification_buffer: ::core::option::Option<i32>,
298    #[prost(bool, optional, tag = "16")]
299    pub enable_email_batching: ::core::option::Option<bool>,
300    #[prost(int32, optional, tag = "17")]
301    pub email_batching_buffer_size: ::core::option::Option<i32>,
302    #[prost(int32, optional, tag = "18")]
303    pub email_batching_interval: ::core::option::Option<i32>,
304    #[prost(bool, optional, tag = "19")]
305    pub skip_server_certificate_verification: ::core::option::Option<bool>,
306    #[prost(string, optional, tag = "20")]
307    pub email_notification_contents_type: ::core::option::Option<
308        ::prost::alloc::string::String,
309    >,
310    #[prost(string, optional, tag = "21")]
311    pub login_button_color: ::core::option::Option<::prost::alloc::string::String>,
312    #[prost(string, optional, tag = "22")]
313    pub login_button_border_color: ::core::option::Option<
314        ::prost::alloc::string::String,
315    >,
316    #[prost(string, optional, tag = "23")]
317    pub login_button_text_color: ::core::option::Option<::prost::alloc::string::String>,
318    #[prost(int32, optional, tag = "24")]
319    pub rate_limiting_memory_size: ::core::option::Option<i32>,
320    #[prost(int32, optional, tag = "25")]
321    pub rate_limiting_per_hour: ::core::option::Option<i32>,
322    #[prost(int32, optional, tag = "26")]
323    pub rate_limiting_max_burst: ::core::option::Option<i32>,
324}
325#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct ConfigRateLimit {
327    #[prost(bool, optional, tag = "1")]
328    pub enable: ::core::option::Option<bool>,
329    #[prost(int32, optional, tag = "2")]
330    pub per_sec: ::core::option::Option<i32>,
331    #[prost(int32, optional, tag = "3")]
332    pub max_burst: ::core::option::Option<i32>,
333    #[prost(int32, optional, tag = "4")]
334    pub memory_store_size: ::core::option::Option<i32>,
335    #[prost(bool, optional, tag = "5")]
336    pub vary_by_remote_addr: ::core::option::Option<bool>,
337    #[prost(bool, optional, tag = "6")]
338    pub vary_by_user: ::core::option::Option<bool>,
339    #[prost(string, tag = "7")]
340    pub vary_by_header: ::prost::alloc::string::String,
341}
342#[derive(Clone, Copy, PartialEq, ::prost::Message)]
343pub struct ConfigPrivacy {
344    #[prost(bool, optional, tag = "1")]
345    pub show_email_address: ::core::option::Option<bool>,
346    #[prost(bool, optional, tag = "2")]
347    pub show_full_name: ::core::option::Option<bool>,
348}
349#[derive(Clone, PartialEq, ::prost::Message)]
350pub struct ConfigSupport {
351    #[prost(string, optional, tag = "1")]
352    pub terms_of_service_link: ::core::option::Option<::prost::alloc::string::String>,
353    #[prost(string, optional, tag = "2")]
354    pub privacy_policy_link: ::core::option::Option<::prost::alloc::string::String>,
355    #[prost(string, optional, tag = "3")]
356    pub about_link: ::core::option::Option<::prost::alloc::string::String>,
357    #[prost(string, optional, tag = "4")]
358    pub help_link: ::core::option::Option<::prost::alloc::string::String>,
359    #[prost(string, optional, tag = "5")]
360    pub report_a_problem_link: ::core::option::Option<::prost::alloc::string::String>,
361    #[prost(string, optional, tag = "6")]
362    pub forgot_password_link: ::core::option::Option<::prost::alloc::string::String>,
363    #[prost(string, optional, tag = "7")]
364    pub support_email: ::core::option::Option<::prost::alloc::string::String>,
365}
366#[derive(Clone, PartialEq, ::prost::Message)]
367pub struct ConfigLocalization {
368    #[prost(string, optional, tag = "1")]
369    pub default_server_locale: ::core::option::Option<::prost::alloc::string::String>,
370    #[prost(string, optional, tag = "2")]
371    pub default_client_locale: ::core::option::Option<::prost::alloc::string::String>,
372    #[prost(string, optional, tag = "3")]
373    pub available_locales: ::core::option::Option<::prost::alloc::string::String>,
374}
375#[derive(Clone, PartialEq, ::prost::Message)]
376pub struct ConfigLdap {
377    /// Basic
378    #[prost(bool, optional, tag = "1")]
379    pub enable: ::core::option::Option<bool>,
380    #[prost(bool, optional, tag = "2")]
381    pub enable_sync: ::core::option::Option<bool>,
382    #[prost(string, optional, tag = "3")]
383    pub ldap_server: ::core::option::Option<::prost::alloc::string::String>,
384    #[prost(int32, optional, tag = "4")]
385    pub ldap_port: ::core::option::Option<i32>,
386    #[prost(string, optional, tag = "5")]
387    pub connection_security: ::core::option::Option<::prost::alloc::string::String>,
388    #[prost(string, optional, tag = "6")]
389    pub base_dn: ::core::option::Option<::prost::alloc::string::String>,
390    #[prost(string, optional, tag = "7")]
391    pub bind_username: ::core::option::Option<::prost::alloc::string::String>,
392    #[prost(string, optional, tag = "8")]
393    pub bind_password: ::core::option::Option<::prost::alloc::string::String>,
394    #[prost(int32, optional, tag = "9")]
395    pub maximum_login_attempts: ::core::option::Option<i32>,
396    /// Filtering
397    #[prost(string, optional, tag = "10")]
398    pub user_filter: ::core::option::Option<::prost::alloc::string::String>,
399    #[prost(string, optional, tag = "11")]
400    pub group_filter: ::core::option::Option<::prost::alloc::string::String>,
401    #[prost(bool, optional, tag = "12")]
402    pub enable_admin_filter: ::core::option::Option<bool>,
403    #[prost(string, optional, tag = "13")]
404    pub admin_filter: ::core::option::Option<::prost::alloc::string::String>,
405    /// Group Mapping
406    #[prost(string, optional, tag = "14")]
407    pub group_display_name_attribute: ::core::option::Option<
408        ::prost::alloc::string::String,
409    >,
410    #[prost(string, optional, tag = "15")]
411    pub group_id_attribute: ::core::option::Option<::prost::alloc::string::String>,
412    /// User Mapping
413    #[prost(string, optional, tag = "16")]
414    pub first_name_attribute: ::core::option::Option<::prost::alloc::string::String>,
415    #[prost(string, optional, tag = "17")]
416    pub last_name_attribute: ::core::option::Option<::prost::alloc::string::String>,
417    #[prost(string, optional, tag = "18")]
418    pub email_attribute: ::core::option::Option<::prost::alloc::string::String>,
419    #[prost(string, optional, tag = "19")]
420    pub username_attribute: ::core::option::Option<::prost::alloc::string::String>,
421    #[prost(string, optional, tag = "20")]
422    pub nickname_attribute: ::core::option::Option<::prost::alloc::string::String>,
423    #[prost(string, optional, tag = "21")]
424    pub id_attribute: ::core::option::Option<::prost::alloc::string::String>,
425    #[prost(string, optional, tag = "22")]
426    pub position_attribute: ::core::option::Option<::prost::alloc::string::String>,
427    #[prost(string, optional, tag = "23")]
428    pub login_id_attribute: ::core::option::Option<::prost::alloc::string::String>,
429    #[prost(string, optional, tag = "24")]
430    pub picture_attribute: ::core::option::Option<::prost::alloc::string::String>,
431    /// Synchronization
432    #[prost(int32, optional, tag = "25")]
433    pub sync_interval_minutes: ::core::option::Option<i32>,
434    /// Advanced
435    #[prost(int32, optional, tag = "26")]
436    pub query_timeout: ::core::option::Option<i32>,
437    #[prost(int32, optional, tag = "27")]
438    pub max_page_size: ::core::option::Option<i32>,
439    /// Customization
440    #[prost(string, optional, tag = "28")]
441    pub login_field_name: ::core::option::Option<::prost::alloc::string::String>,
442    #[prost(string, optional, tag = "29")]
443    pub login_button_color: ::core::option::Option<::prost::alloc::string::String>,
444    #[prost(string, optional, tag = "30")]
445    pub login_button_border_color: ::core::option::Option<
446        ::prost::alloc::string::String,
447    >,
448    #[prost(string, optional, tag = "31")]
449    pub login_button_text_color: ::core::option::Option<::prost::alloc::string::String>,
450}
451#[derive(Clone, PartialEq, ::prost::Message)]
452pub struct ConfigSaml {
453    /// Basic
454    #[prost(bool, optional, tag = "1")]
455    pub enable: ::core::option::Option<bool>,
456    #[prost(bool, optional, tag = "2")]
457    pub enable_sync_with_ldap: ::core::option::Option<bool>,
458    #[prost(bool, optional, tag = "3")]
459    pub enable_sync_with_ldap_include_auth: ::core::option::Option<bool>,
460    #[prost(bool, optional, tag = "4")]
461    pub ignore_guests_ldap_sync: ::core::option::Option<bool>,
462    #[prost(bool, optional, tag = "5")]
463    pub verify: ::core::option::Option<bool>,
464    #[prost(bool, optional, tag = "6")]
465    pub encrypt: ::core::option::Option<bool>,
466    #[prost(bool, optional, tag = "7")]
467    pub sign_request: ::core::option::Option<bool>,
468    #[prost(string, optional, tag = "8")]
469    pub idp_url: ::core::option::Option<::prost::alloc::string::String>,
470    #[prost(string, optional, tag = "9")]
471    pub idp_descriptor_url: ::core::option::Option<::prost::alloc::string::String>,
472    #[prost(string, optional, tag = "10")]
473    pub idp_metadata_url: ::core::option::Option<::prost::alloc::string::String>,
474    #[prost(string, optional, tag = "11")]
475    pub service_provider_identifier: ::core::option::Option<
476        ::prost::alloc::string::String,
477    >,
478    #[prost(string, optional, tag = "12")]
479    pub assertion_consumer_service_url: ::core::option::Option<
480        ::prost::alloc::string::String,
481    >,
482    #[prost(string, optional, tag = "13")]
483    pub signature_algorithm: ::core::option::Option<::prost::alloc::string::String>,
484    #[prost(string, optional, tag = "14")]
485    pub canonical_algorithm: ::core::option::Option<::prost::alloc::string::String>,
486    #[prost(string, optional, tag = "15")]
487    pub scoping_idp_provider_id: ::core::option::Option<::prost::alloc::string::String>,
488    #[prost(string, optional, tag = "16")]
489    pub scoping_idp_name: ::core::option::Option<::prost::alloc::string::String>,
490    #[prost(string, optional, tag = "17")]
491    pub idp_certificate_file: ::core::option::Option<::prost::alloc::string::String>,
492    #[prost(string, optional, tag = "18")]
493    pub public_certificate_file: ::core::option::Option<::prost::alloc::string::String>,
494    #[prost(string, optional, tag = "19")]
495    pub private_key_file: ::core::option::Option<::prost::alloc::string::String>,
496    /// User Mapping
497    #[prost(string, optional, tag = "20")]
498    pub id_attribute: ::core::option::Option<::prost::alloc::string::String>,
499    #[prost(bool, optional, tag = "21")]
500    pub enable_admin_attribute: ::core::option::Option<bool>,
501    #[prost(string, optional, tag = "22")]
502    pub admin_attribute: ::core::option::Option<::prost::alloc::string::String>,
503    #[prost(string, optional, tag = "23")]
504    pub first_name_attribute: ::core::option::Option<::prost::alloc::string::String>,
505    #[prost(string, optional, tag = "24")]
506    pub last_name_attribute: ::core::option::Option<::prost::alloc::string::String>,
507    #[prost(string, optional, tag = "25")]
508    pub email_attribute: ::core::option::Option<::prost::alloc::string::String>,
509    #[prost(string, optional, tag = "26")]
510    pub username_attribute: ::core::option::Option<::prost::alloc::string::String>,
511    #[prost(string, optional, tag = "27")]
512    pub nickname_attribute: ::core::option::Option<::prost::alloc::string::String>,
513    #[prost(string, optional, tag = "28")]
514    pub locale_attribute: ::core::option::Option<::prost::alloc::string::String>,
515    #[prost(string, optional, tag = "29")]
516    pub position_attribute: ::core::option::Option<::prost::alloc::string::String>,
517    #[prost(string, optional, tag = "30")]
518    pub login_button_text: ::core::option::Option<::prost::alloc::string::String>,
519    #[prost(string, optional, tag = "31")]
520    pub login_button_color: ::core::option::Option<::prost::alloc::string::String>,
521    #[prost(string, optional, tag = "32")]
522    pub login_button_border_color: ::core::option::Option<
523        ::prost::alloc::string::String,
524    >,
525    #[prost(string, optional, tag = "33")]
526    pub login_button_text_color: ::core::option::Option<::prost::alloc::string::String>,
527}
528#[derive(Clone, PartialEq, ::prost::Message)]
529pub struct ConfigNativeApp {
530    #[prost(string, repeated, tag = "1")]
531    pub app_custom_url_schemes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
532    #[prost(string, optional, tag = "2")]
533    pub app_download_link: ::core::option::Option<::prost::alloc::string::String>,
534    #[prost(string, optional, tag = "3")]
535    pub android_app_download_link: ::core::option::Option<
536        ::prost::alloc::string::String,
537    >,
538    #[prost(string, optional, tag = "4")]
539    pub ios_app_download_link: ::core::option::Option<::prost::alloc::string::String>,
540    #[prost(bool, optional, tag = "5")]
541    pub mobile_external_browser: ::core::option::Option<bool>,
542    #[prost(bool, optional, tag = "6")]
543    pub mobile_enable_biometrics: ::core::option::Option<bool>,
544    #[prost(bool, optional, tag = "7")]
545    pub mobile_prevent_screen_capture: ::core::option::Option<bool>,
546    #[prost(bool, optional, tag = "8")]
547    pub mobile_jailbreak_protection: ::core::option::Option<bool>,
548}
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct ConfigMeilisearch {
551    #[prost(string, optional, tag = "1")]
552    pub server_url: ::core::option::Option<::prost::alloc::string::String>,
553    /// Meilisearch-specific authentication
554    #[prost(string, optional, tag = "2")]
555    pub master_key: ::core::option::Option<::prost::alloc::string::String>,
556    #[prost(bool, optional, tag = "3")]
557    pub enable_indexing: ::core::option::Option<bool>,
558    #[prost(bool, optional, tag = "4")]
559    pub enable_searching: ::core::option::Option<bool>,
560    #[prost(bool, optional, tag = "5")]
561    pub enable_autocomplete: ::core::option::Option<bool>,
562    #[prost(int32, optional, tag = "6")]
563    pub batch_size: ::core::option::Option<i32>,
564    #[prost(int32, optional, tag = "7")]
565    pub request_timeout_seconds: ::core::option::Option<i32>,
566    /// Meilisearch-specific options
567    #[prost(string, optional, tag = "8")]
568    pub index_prefix: ::core::option::Option<::prost::alloc::string::String>,
569    /// performance tuning
570    #[prost(int32, optional, tag = "9")]
571    pub search_cutoff_ms: ::core::option::Option<i32>,
572    #[prost(bool, optional, tag = "10")]
573    pub enable_typo_tolerance: ::core::option::Option<bool>,
574}
575#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct ConfigBleve {
577    #[prost(string, optional, tag = "1")]
578    pub index_dir: ::core::option::Option<::prost::alloc::string::String>,
579    #[prost(bool, optional, tag = "2")]
580    pub enable_indexing: ::core::option::Option<bool>,
581    #[prost(bool, optional, tag = "3")]
582    pub enable_searching: ::core::option::Option<bool>,
583    #[prost(bool, optional, tag = "4")]
584    pub enable_autocomplete: ::core::option::Option<bool>,
585    #[prost(int32, optional, tag = "5")]
586    pub bulk_indexing_time_window_seconds: ::core::option::Option<i32>,
587    #[prost(int32, optional, tag = "6")]
588    pub batch_size: ::core::option::Option<i32>,
589}
590#[derive(Clone, PartialEq, ::prost::Message)]
591pub struct ConfigDataRetention {
592    #[prost(bool, optional, tag = "1")]
593    pub enable_message_deletion: ::core::option::Option<bool>,
594    #[prost(bool, optional, tag = "2")]
595    pub enable_file_deletion: ::core::option::Option<bool>,
596    #[prost(bool, optional, tag = "3")]
597    pub enable_boards_deletion: ::core::option::Option<bool>,
598    #[prost(int32, optional, tag = "4")]
599    pub message_retention_hours: ::core::option::Option<i32>,
600    #[prost(int32, optional, tag = "5")]
601    pub file_retention_hours: ::core::option::Option<i32>,
602    #[prost(int32, optional, tag = "6")]
603    pub boards_retention_days: ::core::option::Option<i32>,
604    #[prost(string, optional, tag = "7")]
605    pub deletion_job_start_time: ::core::option::Option<::prost::alloc::string::String>,
606    #[prost(int32, optional, tag = "8")]
607    pub batch_size: ::core::option::Option<i32>,
608    #[prost(int32, optional, tag = "9")]
609    pub time_between_batches_milliseconds: ::core::option::Option<i32>,
610    #[prost(int32, optional, tag = "10")]
611    pub retention_ids_batch_size: ::core::option::Option<i32>,
612}
613#[derive(Clone, PartialEq, ::prost::Message)]
614pub struct ConfigImageProxy {
615    #[prost(bool, optional, tag = "1")]
616    pub enable: ::core::option::Option<bool>,
617    #[prost(string, optional, tag = "2")]
618    pub image_proxy_type: ::core::option::Option<::prost::alloc::string::String>,
619    #[prost(string, optional, tag = "3")]
620    pub remote_image_proxy_url: ::core::option::Option<::prost::alloc::string::String>,
621    #[prost(string, optional, tag = "4")]
622    pub remote_image_proxy_options: ::core::option::Option<
623        ::prost::alloc::string::String,
624    >,
625}
626#[derive(Clone, PartialEq, ::prost::Message)]
627pub struct Config {
628    #[prost(message, optional, tag = "1")]
629    pub main: ::core::option::Option<ConfigMain>,
630    #[prost(message, optional, tag = "2")]
631    pub services: ::core::option::Option<ConfigServices>,
632    #[prost(message, optional, tag = "3")]
633    pub security: ::core::option::Option<ConfigSecurity>,
634    #[prost(message, optional, tag = "4")]
635    pub cache: ::core::option::Option<CacheConfig>,
636    #[prost(message, optional, tag = "5")]
637    pub metrics: ::core::option::Option<ConfigMetrics>,
638    #[prost(message, optional, tag = "6")]
639    pub sso: ::core::option::Option<ConfigSso>,
640    #[prost(message, optional, tag = "7")]
641    pub sql: ::core::option::Option<ConfigSql>,
642    #[prost(message, optional, tag = "8")]
643    pub password: ::core::option::Option<ConfigPassword>,
644    #[prost(message, optional, tag = "9")]
645    pub file: ::core::option::Option<ConfigFile>,
646    #[prost(message, optional, tag = "10")]
647    pub email: ::core::option::Option<ConfigEmail>,
648    #[prost(message, optional, tag = "11")]
649    pub rate_limit: ::core::option::Option<ConfigRateLimit>,
650    #[prost(message, optional, tag = "12")]
651    pub privacy: ::core::option::Option<ConfigPrivacy>,
652    #[prost(message, optional, tag = "13")]
653    pub support: ::core::option::Option<ConfigSupport>,
654    #[prost(message, optional, tag = "14")]
655    pub localization: ::core::option::Option<ConfigLocalization>,
656    #[prost(message, optional, tag = "15")]
657    pub ldap: ::core::option::Option<ConfigLdap>,
658    #[prost(message, optional, tag = "16")]
659    pub saml: ::core::option::Option<ConfigSaml>,
660    #[prost(message, optional, tag = "17")]
661    pub native_app: ::core::option::Option<ConfigNativeApp>,
662    #[prost(message, optional, tag = "18")]
663    pub meilisearch: ::core::option::Option<ConfigMeilisearch>,
664    #[prost(message, optional, tag = "19")]
665    pub bleve: ::core::option::Option<ConfigBleve>,
666    #[prost(message, optional, tag = "20")]
667    pub data_retention: ::core::option::Option<ConfigDataRetention>,
668    #[prost(message, optional, tag = "21")]
669    pub image_proxy: ::core::option::Option<ConfigImageProxy>,
670}
671#[derive(Clone, Copy, PartialEq, ::prost::Message)]
672pub struct ConfigGetRequest {}
673#[derive(Clone, PartialEq, ::prost::Message)]
674pub struct ConfigGetResponse {
675    #[prost(oneof = "config_get_response::Response", tags = "1, 2")]
676    pub response: ::core::option::Option<config_get_response::Response>,
677}
678/// Nested message and enum types in `ConfigGetResponse`.
679pub mod config_get_response {
680    #[derive(Clone, PartialEq, ::prost::Oneof)]
681    pub enum Response {
682        #[prost(message, tag = "1")]
683        Data(super::Config),
684        #[prost(message, tag = "2")]
685        Error(super::super::super::shared::v1::AppError),
686    }
687}
688#[derive(Clone, PartialEq, ::prost::Message)]
689pub struct ConfigUpdateRequest {
690    #[prost(message, optional, tag = "1")]
691    pub config: ::core::option::Option<Config>,
692}
693#[derive(Clone, PartialEq, ::prost::Message)]
694pub struct ConfigUpdateResponse {
695    #[prost(oneof = "config_update_response::Response", tags = "1, 2")]
696    pub response: ::core::option::Option<config_update_response::Response>,
697}
698/// Nested message and enum types in `ConfigUpdateResponse`.
699pub mod config_update_response {
700    #[derive(Clone, PartialEq, ::prost::Oneof)]
701    pub enum Response {
702        #[prost(message, tag = "1")]
703        Data(super::Config),
704        #[prost(message, tag = "2")]
705        Error(super::super::super::shared::v1::AppError),
706    }
707}
708#[derive(Clone, PartialEq, ::prost::Message)]
709pub struct ConfigListenerResponse {
710    #[prost(oneof = "config_listener_response::Response", tags = "1, 2")]
711    pub response: ::core::option::Option<config_listener_response::Response>,
712}
713/// Nested message and enum types in `ConfigListenerResponse`.
714pub mod config_listener_response {
715    #[derive(Clone, PartialEq, ::prost::Oneof)]
716    pub enum Response {
717        #[prost(message, tag = "1")]
718        Data(super::Config),
719        #[prost(message, tag = "2")]
720        Error(super::super::super::shared::v1::AppError),
721    }
722}
723#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct ConfigListenerRequest {
725    #[prost(string, tag = "1")]
726    pub client_id: ::prost::alloc::string::String,
727}
728#[derive(Clone, Copy, PartialEq, ::prost::Message)]
729pub struct TranslationsGetRequest {}
730#[derive(Clone, PartialEq, ::prost::Message)]
731pub struct TranslationsGetResponse {
732    #[prost(map = "string, message", tag = "1")]
733    pub data: ::std::collections::HashMap<
734        ::prost::alloc::string::String,
735        TranslationElements,
736    >,
737    #[prost(message, optional, tag = "2")]
738    pub error: ::core::option::Option<super::super::shared::v1::AppError>,
739}
740#[derive(Clone, PartialEq, ::prost::Message)]
741pub struct TranslationsForLangGetRequest {
742    #[prost(string, tag = "1")]
743    pub lang: ::prost::alloc::string::String,
744}
745#[derive(Clone, PartialEq, ::prost::Message)]
746pub struct TranslationsForLangGetResponse {
747    #[prost(oneof = "translations_for_lang_get_response::Response", tags = "1, 2")]
748    pub response: ::core::option::Option<translations_for_lang_get_response::Response>,
749}
750/// Nested message and enum types in `TranslationsForLangGetResponse`.
751pub mod translations_for_lang_get_response {
752    #[derive(Clone, PartialEq, ::prost::Oneof)]
753    pub enum Response {
754        #[prost(message, tag = "1")]
755        Data(super::TranslationElements),
756        #[prost(message, tag = "2")]
757        Error(super::super::super::shared::v1::AppError),
758    }
759}
760#[derive(Clone, PartialEq, ::prost::Message)]
761pub struct TranslationElement {
762    #[prost(string, tag = "1")]
763    pub id: ::prost::alloc::string::String,
764    #[prost(string, tag = "2")]
765    pub tr: ::prost::alloc::string::String,
766}
767#[derive(Clone, PartialEq, ::prost::Message)]
768pub struct TranslationElements {
769    #[prost(message, repeated, tag = "1")]
770    pub trans: ::prost::alloc::vec::Vec<TranslationElement>,
771}
772#[derive(Clone, Copy, PartialEq, ::prost::Message)]
773pub struct PingRequest {}
774#[derive(Clone, Copy, PartialEq, ::prost::Message)]
775pub struct PingResponse {}
776/// Generated client implementations.
777pub mod common_service_client {
778    #![allow(
779        unused_variables,
780        dead_code,
781        missing_docs,
782        clippy::wildcard_imports,
783        clippy::let_unit_value,
784    )]
785    use tonic::codegen::*;
786    use tonic::codegen::http::Uri;
787    #[derive(Debug, Clone)]
788    pub struct CommonServiceClient<T> {
789        inner: tonic::client::Grpc<T>,
790    }
791    impl CommonServiceClient<tonic::transport::Channel> {
792        /// Attempt to create a new client by connecting to a given endpoint.
793        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
794        where
795            D: TryInto<tonic::transport::Endpoint>,
796            D::Error: Into<StdError>,
797        {
798            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
799            Ok(Self::new(conn))
800        }
801    }
802    impl<T> CommonServiceClient<T>
803    where
804        T: tonic::client::GrpcService<tonic::body::Body>,
805        T::Error: Into<StdError>,
806        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
807        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
808    {
809        pub fn new(inner: T) -> Self {
810            let inner = tonic::client::Grpc::new(inner);
811            Self { inner }
812        }
813        pub fn with_origin(inner: T, origin: Uri) -> Self {
814            let inner = tonic::client::Grpc::with_origin(inner, origin);
815            Self { inner }
816        }
817        pub fn with_interceptor<F>(
818            inner: T,
819            interceptor: F,
820        ) -> CommonServiceClient<InterceptedService<T, F>>
821        where
822            F: tonic::service::Interceptor,
823            T::ResponseBody: Default,
824            T: tonic::codegen::Service<
825                http::Request<tonic::body::Body>,
826                Response = http::Response<
827                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
828                >,
829            >,
830            <T as tonic::codegen::Service<
831                http::Request<tonic::body::Body>,
832            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
833        {
834            CommonServiceClient::new(InterceptedService::new(inner, interceptor))
835        }
836        /// Compress requests with the given encoding.
837        ///
838        /// This requires the server to support it otherwise it might respond with an
839        /// error.
840        #[must_use]
841        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
842            self.inner = self.inner.send_compressed(encoding);
843            self
844        }
845        /// Enable decompressing responses.
846        #[must_use]
847        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
848            self.inner = self.inner.accept_compressed(encoding);
849            self
850        }
851        /// Limits the maximum size of a decoded message.
852        ///
853        /// Default: `4MB`
854        #[must_use]
855        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
856            self.inner = self.inner.max_decoding_message_size(limit);
857            self
858        }
859        /// Limits the maximum size of an encoded message.
860        ///
861        /// Default: `usize::MAX`
862        #[must_use]
863        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
864            self.inner = self.inner.max_encoding_message_size(limit);
865            self
866        }
867        pub async fn ping(
868            &mut self,
869            request: impl tonic::IntoRequest<super::PingRequest>,
870        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
871            self.inner
872                .ready()
873                .await
874                .map_err(|e| {
875                    tonic::Status::unknown(
876                        format!("Service was not ready: {}", e.into()),
877                    )
878                })?;
879            let codec = tonic::codec::ProstCodec::default();
880            let path = http::uri::PathAndQuery::from_static(
881                "/common.v1.CommonService/Ping",
882            );
883            let mut req = request.into_request();
884            req.extensions_mut()
885                .insert(GrpcMethod::new("common.v1.CommonService", "Ping"));
886            self.inner.unary(req, path, codec).await
887        }
888        pub async fn config_get(
889            &mut self,
890            request: impl tonic::IntoRequest<super::ConfigGetRequest>,
891        ) -> std::result::Result<
892            tonic::Response<super::ConfigGetResponse>,
893            tonic::Status,
894        > {
895            self.inner
896                .ready()
897                .await
898                .map_err(|e| {
899                    tonic::Status::unknown(
900                        format!("Service was not ready: {}", e.into()),
901                    )
902                })?;
903            let codec = tonic::codec::ProstCodec::default();
904            let path = http::uri::PathAndQuery::from_static(
905                "/common.v1.CommonService/ConfigGet",
906            );
907            let mut req = request.into_request();
908            req.extensions_mut()
909                .insert(GrpcMethod::new("common.v1.CommonService", "ConfigGet"));
910            self.inner.unary(req, path, codec).await
911        }
912        pub async fn config_update(
913            &mut self,
914            request: impl tonic::IntoRequest<super::ConfigUpdateRequest>,
915        ) -> std::result::Result<
916            tonic::Response<super::ConfigUpdateResponse>,
917            tonic::Status,
918        > {
919            self.inner
920                .ready()
921                .await
922                .map_err(|e| {
923                    tonic::Status::unknown(
924                        format!("Service was not ready: {}", e.into()),
925                    )
926                })?;
927            let codec = tonic::codec::ProstCodec::default();
928            let path = http::uri::PathAndQuery::from_static(
929                "/common.v1.CommonService/ConfigUpdate",
930            );
931            let mut req = request.into_request();
932            req.extensions_mut()
933                .insert(GrpcMethod::new("common.v1.CommonService", "ConfigUpdate"));
934            self.inner.unary(req, path, codec).await
935        }
936        pub async fn config_listener(
937            &mut self,
938            request: impl tonic::IntoRequest<super::ConfigListenerRequest>,
939        ) -> std::result::Result<
940            tonic::Response<tonic::codec::Streaming<super::ConfigListenerResponse>>,
941            tonic::Status,
942        > {
943            self.inner
944                .ready()
945                .await
946                .map_err(|e| {
947                    tonic::Status::unknown(
948                        format!("Service was not ready: {}", e.into()),
949                    )
950                })?;
951            let codec = tonic::codec::ProstCodec::default();
952            let path = http::uri::PathAndQuery::from_static(
953                "/common.v1.CommonService/ConfigListener",
954            );
955            let mut req = request.into_request();
956            req.extensions_mut()
957                .insert(GrpcMethod::new("common.v1.CommonService", "ConfigListener"));
958            self.inner.server_streaming(req, path, codec).await
959        }
960        pub async fn translations_get(
961            &mut self,
962            request: impl tonic::IntoRequest<super::TranslationsGetRequest>,
963        ) -> std::result::Result<
964            tonic::Response<super::TranslationsGetResponse>,
965            tonic::Status,
966        > {
967            self.inner
968                .ready()
969                .await
970                .map_err(|e| {
971                    tonic::Status::unknown(
972                        format!("Service was not ready: {}", e.into()),
973                    )
974                })?;
975            let codec = tonic::codec::ProstCodec::default();
976            let path = http::uri::PathAndQuery::from_static(
977                "/common.v1.CommonService/TranslationsGet",
978            );
979            let mut req = request.into_request();
980            req.extensions_mut()
981                .insert(GrpcMethod::new("common.v1.CommonService", "TranslationsGet"));
982            self.inner.unary(req, path, codec).await
983        }
984        pub async fn translations_for_lang_get(
985            &mut self,
986            request: impl tonic::IntoRequest<super::TranslationsForLangGetRequest>,
987        ) -> std::result::Result<
988            tonic::Response<super::TranslationsForLangGetResponse>,
989            tonic::Status,
990        > {
991            self.inner
992                .ready()
993                .await
994                .map_err(|e| {
995                    tonic::Status::unknown(
996                        format!("Service was not ready: {}", e.into()),
997                    )
998                })?;
999            let codec = tonic::codec::ProstCodec::default();
1000            let path = http::uri::PathAndQuery::from_static(
1001                "/common.v1.CommonService/TranslationsForLangGet",
1002            );
1003            let mut req = request.into_request();
1004            req.extensions_mut()
1005                .insert(
1006                    GrpcMethod::new("common.v1.CommonService", "TranslationsForLangGet"),
1007                );
1008            self.inner.unary(req, path, codec).await
1009        }
1010    }
1011}
1012/// Generated server implementations.
1013pub mod common_service_server {
1014    #![allow(
1015        unused_variables,
1016        dead_code,
1017        missing_docs,
1018        clippy::wildcard_imports,
1019        clippy::let_unit_value,
1020    )]
1021    use tonic::codegen::*;
1022    /// Generated trait containing gRPC methods that should be implemented for use with CommonServiceServer.
1023    #[async_trait]
1024    pub trait CommonService: std::marker::Send + std::marker::Sync + 'static {
1025        async fn ping(
1026            &self,
1027            request: tonic::Request<super::PingRequest>,
1028        ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status>;
1029        async fn config_get(
1030            &self,
1031            request: tonic::Request<super::ConfigGetRequest>,
1032        ) -> std::result::Result<
1033            tonic::Response<super::ConfigGetResponse>,
1034            tonic::Status,
1035        >;
1036        async fn config_update(
1037            &self,
1038            request: tonic::Request<super::ConfigUpdateRequest>,
1039        ) -> std::result::Result<
1040            tonic::Response<super::ConfigUpdateResponse>,
1041            tonic::Status,
1042        >;
1043        /// Server streaming response type for the ConfigListener method.
1044        type ConfigListenerStream: tonic::codegen::tokio_stream::Stream<
1045                Item = std::result::Result<super::ConfigListenerResponse, tonic::Status>,
1046            >
1047            + std::marker::Send
1048            + 'static;
1049        async fn config_listener(
1050            &self,
1051            request: tonic::Request<super::ConfigListenerRequest>,
1052        ) -> std::result::Result<
1053            tonic::Response<Self::ConfigListenerStream>,
1054            tonic::Status,
1055        >;
1056        async fn translations_get(
1057            &self,
1058            request: tonic::Request<super::TranslationsGetRequest>,
1059        ) -> std::result::Result<
1060            tonic::Response<super::TranslationsGetResponse>,
1061            tonic::Status,
1062        >;
1063        async fn translations_for_lang_get(
1064            &self,
1065            request: tonic::Request<super::TranslationsForLangGetRequest>,
1066        ) -> std::result::Result<
1067            tonic::Response<super::TranslationsForLangGetResponse>,
1068            tonic::Status,
1069        >;
1070    }
1071    #[derive(Debug)]
1072    pub struct CommonServiceServer<T> {
1073        inner: Arc<T>,
1074        accept_compression_encodings: EnabledCompressionEncodings,
1075        send_compression_encodings: EnabledCompressionEncodings,
1076        max_decoding_message_size: Option<usize>,
1077        max_encoding_message_size: Option<usize>,
1078    }
1079    impl<T> CommonServiceServer<T> {
1080        pub fn new(inner: T) -> Self {
1081            Self::from_arc(Arc::new(inner))
1082        }
1083        pub fn from_arc(inner: Arc<T>) -> Self {
1084            Self {
1085                inner,
1086                accept_compression_encodings: Default::default(),
1087                send_compression_encodings: Default::default(),
1088                max_decoding_message_size: None,
1089                max_encoding_message_size: None,
1090            }
1091        }
1092        pub fn with_interceptor<F>(
1093            inner: T,
1094            interceptor: F,
1095        ) -> InterceptedService<Self, F>
1096        where
1097            F: tonic::service::Interceptor,
1098        {
1099            InterceptedService::new(Self::new(inner), interceptor)
1100        }
1101        /// Enable decompressing requests with the given encoding.
1102        #[must_use]
1103        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1104            self.accept_compression_encodings.enable(encoding);
1105            self
1106        }
1107        /// Compress responses with the given encoding, if the client supports it.
1108        #[must_use]
1109        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1110            self.send_compression_encodings.enable(encoding);
1111            self
1112        }
1113        /// Limits the maximum size of a decoded message.
1114        ///
1115        /// Default: `4MB`
1116        #[must_use]
1117        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1118            self.max_decoding_message_size = Some(limit);
1119            self
1120        }
1121        /// Limits the maximum size of an encoded message.
1122        ///
1123        /// Default: `usize::MAX`
1124        #[must_use]
1125        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1126            self.max_encoding_message_size = Some(limit);
1127            self
1128        }
1129    }
1130    impl<T, B> tonic::codegen::Service<http::Request<B>> for CommonServiceServer<T>
1131    where
1132        T: CommonService,
1133        B: Body + std::marker::Send + 'static,
1134        B::Error: Into<StdError> + std::marker::Send + 'static,
1135    {
1136        type Response = http::Response<tonic::body::Body>;
1137        type Error = std::convert::Infallible;
1138        type Future = BoxFuture<Self::Response, Self::Error>;
1139        fn poll_ready(
1140            &mut self,
1141            _cx: &mut Context<'_>,
1142        ) -> Poll<std::result::Result<(), Self::Error>> {
1143            Poll::Ready(Ok(()))
1144        }
1145        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1146            match req.uri().path() {
1147                "/common.v1.CommonService/Ping" => {
1148                    #[allow(non_camel_case_types)]
1149                    struct PingSvc<T: CommonService>(pub Arc<T>);
1150                    impl<
1151                        T: CommonService,
1152                    > tonic::server::UnaryService<super::PingRequest> for PingSvc<T> {
1153                        type Response = super::PingResponse;
1154                        type Future = BoxFuture<
1155                            tonic::Response<Self::Response>,
1156                            tonic::Status,
1157                        >;
1158                        fn call(
1159                            &mut self,
1160                            request: tonic::Request<super::PingRequest>,
1161                        ) -> Self::Future {
1162                            let inner = Arc::clone(&self.0);
1163                            let fut = async move {
1164                                <T as CommonService>::ping(&inner, request).await
1165                            };
1166                            Box::pin(fut)
1167                        }
1168                    }
1169                    let accept_compression_encodings = self.accept_compression_encodings;
1170                    let send_compression_encodings = self.send_compression_encodings;
1171                    let max_decoding_message_size = self.max_decoding_message_size;
1172                    let max_encoding_message_size = self.max_encoding_message_size;
1173                    let inner = self.inner.clone();
1174                    let fut = async move {
1175                        let method = PingSvc(inner);
1176                        let codec = tonic::codec::ProstCodec::default();
1177                        let mut grpc = tonic::server::Grpc::new(codec)
1178                            .apply_compression_config(
1179                                accept_compression_encodings,
1180                                send_compression_encodings,
1181                            )
1182                            .apply_max_message_size_config(
1183                                max_decoding_message_size,
1184                                max_encoding_message_size,
1185                            );
1186                        let res = grpc.unary(method, req).await;
1187                        Ok(res)
1188                    };
1189                    Box::pin(fut)
1190                }
1191                "/common.v1.CommonService/ConfigGet" => {
1192                    #[allow(non_camel_case_types)]
1193                    struct ConfigGetSvc<T: CommonService>(pub Arc<T>);
1194                    impl<
1195                        T: CommonService,
1196                    > tonic::server::UnaryService<super::ConfigGetRequest>
1197                    for ConfigGetSvc<T> {
1198                        type Response = super::ConfigGetResponse;
1199                        type Future = BoxFuture<
1200                            tonic::Response<Self::Response>,
1201                            tonic::Status,
1202                        >;
1203                        fn call(
1204                            &mut self,
1205                            request: tonic::Request<super::ConfigGetRequest>,
1206                        ) -> Self::Future {
1207                            let inner = Arc::clone(&self.0);
1208                            let fut = async move {
1209                                <T as CommonService>::config_get(&inner, request).await
1210                            };
1211                            Box::pin(fut)
1212                        }
1213                    }
1214                    let accept_compression_encodings = self.accept_compression_encodings;
1215                    let send_compression_encodings = self.send_compression_encodings;
1216                    let max_decoding_message_size = self.max_decoding_message_size;
1217                    let max_encoding_message_size = self.max_encoding_message_size;
1218                    let inner = self.inner.clone();
1219                    let fut = async move {
1220                        let method = ConfigGetSvc(inner);
1221                        let codec = tonic::codec::ProstCodec::default();
1222                        let mut grpc = tonic::server::Grpc::new(codec)
1223                            .apply_compression_config(
1224                                accept_compression_encodings,
1225                                send_compression_encodings,
1226                            )
1227                            .apply_max_message_size_config(
1228                                max_decoding_message_size,
1229                                max_encoding_message_size,
1230                            );
1231                        let res = grpc.unary(method, req).await;
1232                        Ok(res)
1233                    };
1234                    Box::pin(fut)
1235                }
1236                "/common.v1.CommonService/ConfigUpdate" => {
1237                    #[allow(non_camel_case_types)]
1238                    struct ConfigUpdateSvc<T: CommonService>(pub Arc<T>);
1239                    impl<
1240                        T: CommonService,
1241                    > tonic::server::UnaryService<super::ConfigUpdateRequest>
1242                    for ConfigUpdateSvc<T> {
1243                        type Response = super::ConfigUpdateResponse;
1244                        type Future = BoxFuture<
1245                            tonic::Response<Self::Response>,
1246                            tonic::Status,
1247                        >;
1248                        fn call(
1249                            &mut self,
1250                            request: tonic::Request<super::ConfigUpdateRequest>,
1251                        ) -> Self::Future {
1252                            let inner = Arc::clone(&self.0);
1253                            let fut = async move {
1254                                <T as CommonService>::config_update(&inner, request).await
1255                            };
1256                            Box::pin(fut)
1257                        }
1258                    }
1259                    let accept_compression_encodings = self.accept_compression_encodings;
1260                    let send_compression_encodings = self.send_compression_encodings;
1261                    let max_decoding_message_size = self.max_decoding_message_size;
1262                    let max_encoding_message_size = self.max_encoding_message_size;
1263                    let inner = self.inner.clone();
1264                    let fut = async move {
1265                        let method = ConfigUpdateSvc(inner);
1266                        let codec = tonic::codec::ProstCodec::default();
1267                        let mut grpc = tonic::server::Grpc::new(codec)
1268                            .apply_compression_config(
1269                                accept_compression_encodings,
1270                                send_compression_encodings,
1271                            )
1272                            .apply_max_message_size_config(
1273                                max_decoding_message_size,
1274                                max_encoding_message_size,
1275                            );
1276                        let res = grpc.unary(method, req).await;
1277                        Ok(res)
1278                    };
1279                    Box::pin(fut)
1280                }
1281                "/common.v1.CommonService/ConfigListener" => {
1282                    #[allow(non_camel_case_types)]
1283                    struct ConfigListenerSvc<T: CommonService>(pub Arc<T>);
1284                    impl<
1285                        T: CommonService,
1286                    > tonic::server::ServerStreamingService<super::ConfigListenerRequest>
1287                    for ConfigListenerSvc<T> {
1288                        type Response = super::ConfigListenerResponse;
1289                        type ResponseStream = T::ConfigListenerStream;
1290                        type Future = BoxFuture<
1291                            tonic::Response<Self::ResponseStream>,
1292                            tonic::Status,
1293                        >;
1294                        fn call(
1295                            &mut self,
1296                            request: tonic::Request<super::ConfigListenerRequest>,
1297                        ) -> Self::Future {
1298                            let inner = Arc::clone(&self.0);
1299                            let fut = async move {
1300                                <T as CommonService>::config_listener(&inner, request).await
1301                            };
1302                            Box::pin(fut)
1303                        }
1304                    }
1305                    let accept_compression_encodings = self.accept_compression_encodings;
1306                    let send_compression_encodings = self.send_compression_encodings;
1307                    let max_decoding_message_size = self.max_decoding_message_size;
1308                    let max_encoding_message_size = self.max_encoding_message_size;
1309                    let inner = self.inner.clone();
1310                    let fut = async move {
1311                        let method = ConfigListenerSvc(inner);
1312                        let codec = tonic::codec::ProstCodec::default();
1313                        let mut grpc = tonic::server::Grpc::new(codec)
1314                            .apply_compression_config(
1315                                accept_compression_encodings,
1316                                send_compression_encodings,
1317                            )
1318                            .apply_max_message_size_config(
1319                                max_decoding_message_size,
1320                                max_encoding_message_size,
1321                            );
1322                        let res = grpc.server_streaming(method, req).await;
1323                        Ok(res)
1324                    };
1325                    Box::pin(fut)
1326                }
1327                "/common.v1.CommonService/TranslationsGet" => {
1328                    #[allow(non_camel_case_types)]
1329                    struct TranslationsGetSvc<T: CommonService>(pub Arc<T>);
1330                    impl<
1331                        T: CommonService,
1332                    > tonic::server::UnaryService<super::TranslationsGetRequest>
1333                    for TranslationsGetSvc<T> {
1334                        type Response = super::TranslationsGetResponse;
1335                        type Future = BoxFuture<
1336                            tonic::Response<Self::Response>,
1337                            tonic::Status,
1338                        >;
1339                        fn call(
1340                            &mut self,
1341                            request: tonic::Request<super::TranslationsGetRequest>,
1342                        ) -> Self::Future {
1343                            let inner = Arc::clone(&self.0);
1344                            let fut = async move {
1345                                <T as CommonService>::translations_get(&inner, request)
1346                                    .await
1347                            };
1348                            Box::pin(fut)
1349                        }
1350                    }
1351                    let accept_compression_encodings = self.accept_compression_encodings;
1352                    let send_compression_encodings = self.send_compression_encodings;
1353                    let max_decoding_message_size = self.max_decoding_message_size;
1354                    let max_encoding_message_size = self.max_encoding_message_size;
1355                    let inner = self.inner.clone();
1356                    let fut = async move {
1357                        let method = TranslationsGetSvc(inner);
1358                        let codec = tonic::codec::ProstCodec::default();
1359                        let mut grpc = tonic::server::Grpc::new(codec)
1360                            .apply_compression_config(
1361                                accept_compression_encodings,
1362                                send_compression_encodings,
1363                            )
1364                            .apply_max_message_size_config(
1365                                max_decoding_message_size,
1366                                max_encoding_message_size,
1367                            );
1368                        let res = grpc.unary(method, req).await;
1369                        Ok(res)
1370                    };
1371                    Box::pin(fut)
1372                }
1373                "/common.v1.CommonService/TranslationsForLangGet" => {
1374                    #[allow(non_camel_case_types)]
1375                    struct TranslationsForLangGetSvc<T: CommonService>(pub Arc<T>);
1376                    impl<
1377                        T: CommonService,
1378                    > tonic::server::UnaryService<super::TranslationsForLangGetRequest>
1379                    for TranslationsForLangGetSvc<T> {
1380                        type Response = super::TranslationsForLangGetResponse;
1381                        type Future = BoxFuture<
1382                            tonic::Response<Self::Response>,
1383                            tonic::Status,
1384                        >;
1385                        fn call(
1386                            &mut self,
1387                            request: tonic::Request<super::TranslationsForLangGetRequest>,
1388                        ) -> Self::Future {
1389                            let inner = Arc::clone(&self.0);
1390                            let fut = async move {
1391                                <T as CommonService>::translations_for_lang_get(
1392                                        &inner,
1393                                        request,
1394                                    )
1395                                    .await
1396                            };
1397                            Box::pin(fut)
1398                        }
1399                    }
1400                    let accept_compression_encodings = self.accept_compression_encodings;
1401                    let send_compression_encodings = self.send_compression_encodings;
1402                    let max_decoding_message_size = self.max_decoding_message_size;
1403                    let max_encoding_message_size = self.max_encoding_message_size;
1404                    let inner = self.inner.clone();
1405                    let fut = async move {
1406                        let method = TranslationsForLangGetSvc(inner);
1407                        let codec = tonic::codec::ProstCodec::default();
1408                        let mut grpc = tonic::server::Grpc::new(codec)
1409                            .apply_compression_config(
1410                                accept_compression_encodings,
1411                                send_compression_encodings,
1412                            )
1413                            .apply_max_message_size_config(
1414                                max_decoding_message_size,
1415                                max_encoding_message_size,
1416                            );
1417                        let res = grpc.unary(method, req).await;
1418                        Ok(res)
1419                    };
1420                    Box::pin(fut)
1421                }
1422                _ => {
1423                    Box::pin(async move {
1424                        let mut response = http::Response::new(
1425                            tonic::body::Body::default(),
1426                        );
1427                        let headers = response.headers_mut();
1428                        headers
1429                            .insert(
1430                                tonic::Status::GRPC_STATUS,
1431                                (tonic::Code::Unimplemented as i32).into(),
1432                            );
1433                        headers
1434                            .insert(
1435                                http::header::CONTENT_TYPE,
1436                                tonic::metadata::GRPC_CONTENT_TYPE,
1437                            );
1438                        Ok(response)
1439                    })
1440                }
1441            }
1442        }
1443    }
1444    impl<T> Clone for CommonServiceServer<T> {
1445        fn clone(&self) -> Self {
1446            let inner = self.inner.clone();
1447            Self {
1448                inner,
1449                accept_compression_encodings: self.accept_compression_encodings,
1450                send_compression_encodings: self.send_compression_encodings,
1451                max_decoding_message_size: self.max_decoding_message_size,
1452                max_encoding_message_size: self.max_encoding_message_size,
1453            }
1454        }
1455    }
1456    /// Generated gRPC service name
1457    pub const SERVICE_NAME: &str = "common.v1.CommonService";
1458    impl<T> tonic::server::NamedService for CommonServiceServer<T> {
1459        const NAME: &'static str = SERVICE_NAME;
1460    }
1461}