cx_api/generated/
com.coralogix.enrichment.v1.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct EnrichmentType {
6    #[prost(oneof = "enrichment_type::Type", tags = "1, 2, 3, 4")]
7    pub r#type: ::core::option::Option<enrichment_type::Type>,
8}
9/// Nested message and enum types in `EnrichmentType`.
10pub mod enrichment_type {
11    #[derive(serde::Serialize, serde::Deserialize)]
12    #[serde(rename_all = "snake_case")]
13    #[derive(Clone, PartialEq, ::prost::Oneof)]
14    pub enum Type {
15        #[prost(message, tag = "1")]
16        GeoIp(super::GeoIpType),
17        #[prost(message, tag = "2")]
18        SuspiciousIp(super::SuspiciousIpType),
19        #[prost(message, tag = "3")]
20        Aws(super::AwsType),
21        #[prost(message, tag = "4")]
22        CustomEnrichment(super::CustomEnrichmentType),
23    }
24}
25#[derive(serde::Serialize, serde::Deserialize)]
26#[serde(rename_all = "snake_case")]
27#[derive(Clone, Copy, PartialEq, ::prost::Message)]
28pub struct GeoIpType {
29    #[prost(bool, optional, tag = "4")]
30    pub with_asn: ::core::option::Option<bool>,
31}
32#[derive(serde::Serialize, serde::Deserialize)]
33#[serde(rename_all = "snake_case")]
34#[derive(Clone, Copy, PartialEq, ::prost::Message)]
35pub struct SuspiciousIpType {}
36#[derive(serde::Serialize, serde::Deserialize)]
37#[serde(rename_all = "snake_case")]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct AwsType {
40    #[prost(message, optional, tag = "1")]
41    pub resource_type: ::core::option::Option<::prost::alloc::string::String>,
42}
43#[derive(serde::Serialize, serde::Deserialize)]
44#[serde(rename_all = "snake_case")]
45#[derive(Clone, Copy, PartialEq, ::prost::Message)]
46pub struct CustomEnrichmentType {
47    #[prost(message, optional, tag = "1")]
48    pub id: ::core::option::Option<u32>,
49}
50#[derive(serde::Serialize, serde::Deserialize)]
51#[serde(rename_all = "snake_case")]
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct Enrichment {
54    #[prost(uint32, tag = "1")]
55    pub id: u32,
56    #[prost(string, tag = "2")]
57    pub field_name: ::prost::alloc::string::String,
58    #[prost(message, optional, tag = "3")]
59    pub enrichment_type: ::core::option::Option<EnrichmentType>,
60    #[prost(message, optional, tag = "4")]
61    pub enriched_field_name: ::core::option::Option<::prost::alloc::string::String>,
62    #[prost(string, repeated, tag = "5")]
63    pub selected_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
64}
65#[derive(serde::Serialize, serde::Deserialize)]
66#[serde(rename_all = "snake_case")]
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct EnrichmentRequestModel {
69    #[prost(message, optional, tag = "1")]
70    pub field_name: ::core::option::Option<::prost::alloc::string::String>,
71    #[prost(message, optional, tag = "2")]
72    pub enrichment_type: ::core::option::Option<EnrichmentType>,
73    #[prost(message, optional, tag = "3")]
74    pub enriched_field_name: ::core::option::Option<::prost::alloc::string::String>,
75    #[prost(string, repeated, tag = "4")]
76    pub selected_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
77}
78#[derive(serde::Serialize, serde::Deserialize)]
79#[serde(rename_all = "snake_case")]
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct EnrichmentFieldDefinition {
82    /// the field name of the key targeted for enrichment
83    #[prost(message, optional, tag = "1")]
84    pub field_name: ::core::option::Option<::prost::alloc::string::String>,
85    /// the field of the enriched key after enrichment
86    #[prost(message, optional, tag = "3")]
87    pub enriched_field_name: ::core::option::Option<::prost::alloc::string::String>,
88    /// the columns to be selected from the enrichment
89    #[prost(string, repeated, tag = "4")]
90    pub selected_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
91}
92#[derive(serde::Serialize, serde::Deserialize)]
93#[serde(rename_all = "snake_case")]
94#[derive(Clone, Copy, PartialEq, ::prost::Message)]
95pub struct CompanyEnrichmentSettings {
96    #[prost(uint32, tag = "1")]
97    pub enrichment_amount_limit: u32,
98    #[prost(uint32, tag = "2")]
99    pub enrichments_in_use: u32,
100    #[prost(uint64, tag = "3")]
101    pub size_limit_bytes: u64,
102    #[prost(uint32, tag = "4")]
103    pub row_limit: u32,
104    #[prost(uint64, tag = "5")]
105    pub query_only_size_limit_bytes: u64,
106    #[prost(uint32, tag = "6")]
107    pub query_only_row_limit: u32,
108}
109#[derive(serde::Serialize, serde::Deserialize)]
110#[serde(rename_all = "snake_case")]
111#[derive(Clone, Copy, PartialEq, ::prost::Message)]
112pub struct GetEnrichmentLimitRequest {}
113#[derive(serde::Serialize, serde::Deserialize)]
114#[serde(rename_all = "snake_case")]
115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
116pub struct GetEnrichmentLimitResponse {
117    #[prost(uint32, tag = "1")]
118    pub limit: u32,
119    #[prost(uint32, tag = "2")]
120    pub used: u32,
121}
122#[derive(serde::Serialize, serde::Deserialize)]
123#[serde(rename_all = "snake_case")]
124#[derive(Clone, Copy, PartialEq, ::prost::Message)]
125pub struct GetEnrichmentsRequest {}
126#[derive(serde::Serialize, serde::Deserialize)]
127#[serde(rename_all = "snake_case")]
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct GetEnrichmentsResponse {
130    #[prost(message, repeated, tag = "1")]
131    pub enrichments: ::prost::alloc::vec::Vec<Enrichment>,
132}
133#[derive(serde::Serialize, serde::Deserialize)]
134#[serde(rename_all = "snake_case")]
135#[derive(Clone, PartialEq, ::prost::Message)]
136pub struct AddEnrichmentsRequest {
137    #[prost(message, repeated, tag = "1")]
138    pub request_enrichments: ::prost::alloc::vec::Vec<EnrichmentRequestModel>,
139}
140#[derive(serde::Serialize, serde::Deserialize)]
141#[serde(rename_all = "snake_case")]
142#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct AddEnrichmentsResponse {
144    #[prost(message, repeated, tag = "1")]
145    pub enrichments: ::prost::alloc::vec::Vec<Enrichment>,
146}
147#[derive(serde::Serialize, serde::Deserialize)]
148#[serde(rename_all = "snake_case")]
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct RemoveEnrichmentsRequest {
151    #[prost(message, repeated, tag = "1")]
152    pub enrichment_ids: ::prost::alloc::vec::Vec<u32>,
153}
154#[derive(serde::Serialize, serde::Deserialize)]
155#[serde(rename_all = "snake_case")]
156#[derive(Clone, PartialEq, ::prost::Message)]
157pub struct RemoveEnrichmentsResponse {
158    #[prost(message, repeated, tag = "1")]
159    pub remaining_enrichments: ::prost::alloc::vec::Vec<Enrichment>,
160}
161/// Deletes all enrichments of the given type and replaces them with the new ones
162#[derive(serde::Serialize, serde::Deserialize)]
163#[serde(rename_all = "snake_case")]
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct AtomicOverwriteEnrichmentsRequest {
166    #[prost(message, optional, tag = "1")]
167    pub enrichment_type: ::core::option::Option<EnrichmentType>,
168    #[prost(message, repeated, tag = "2")]
169    pub enrichment_fields: ::prost::alloc::vec::Vec<EnrichmentFieldDefinition>,
170}
171#[derive(serde::Serialize, serde::Deserialize)]
172#[serde(rename_all = "snake_case")]
173#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct AtomicOverwriteEnrichmentsResponse {
175    #[prost(message, repeated, tag = "1")]
176    pub enrichments: ::prost::alloc::vec::Vec<Enrichment>,
177}
178#[derive(serde::Serialize, serde::Deserialize)]
179#[serde(rename_all = "snake_case")]
180#[derive(Clone, Copy, PartialEq, ::prost::Message)]
181pub struct GetCompanyEnrichmentSettingsRequest {}
182#[derive(serde::Serialize, serde::Deserialize)]
183#[serde(rename_all = "snake_case")]
184#[derive(Clone, Copy, PartialEq, ::prost::Message)]
185pub struct GetCompanyEnrichmentSettingsResponse {
186    #[prost(message, optional, tag = "1")]
187    pub enrichment_settings: ::core::option::Option<CompanyEnrichmentSettings>,
188}
189/// Generated client implementations.
190pub mod enrichment_service_client {
191    #![allow(
192        unused_variables,
193        dead_code,
194        missing_docs,
195        clippy::wildcard_imports,
196        clippy::let_unit_value,
197    )]
198    use tonic::codegen::*;
199    use tonic::codegen::http::Uri;
200    #[derive(Debug, Clone)]
201    pub struct EnrichmentServiceClient<T> {
202        inner: tonic::client::Grpc<T>,
203    }
204    impl EnrichmentServiceClient<tonic::transport::Channel> {
205        /// Attempt to create a new client by connecting to a given endpoint.
206        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
207        where
208            D: TryInto<tonic::transport::Endpoint>,
209            D::Error: Into<StdError>,
210        {
211            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
212            Ok(Self::new(conn))
213        }
214    }
215    impl<T> EnrichmentServiceClient<T>
216    where
217        T: tonic::client::GrpcService<tonic::body::BoxBody>,
218        T::Error: Into<StdError>,
219        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
220        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
221    {
222        pub fn new(inner: T) -> Self {
223            let inner = tonic::client::Grpc::new(inner);
224            Self { inner }
225        }
226        pub fn with_origin(inner: T, origin: Uri) -> Self {
227            let inner = tonic::client::Grpc::with_origin(inner, origin);
228            Self { inner }
229        }
230        pub fn with_interceptor<F>(
231            inner: T,
232            interceptor: F,
233        ) -> EnrichmentServiceClient<InterceptedService<T, F>>
234        where
235            F: tonic::service::Interceptor,
236            T::ResponseBody: Default,
237            T: tonic::codegen::Service<
238                http::Request<tonic::body::BoxBody>,
239                Response = http::Response<
240                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
241                >,
242            >,
243            <T as tonic::codegen::Service<
244                http::Request<tonic::body::BoxBody>,
245            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
246        {
247            EnrichmentServiceClient::new(InterceptedService::new(inner, interceptor))
248        }
249        /// Compress requests with the given encoding.
250        ///
251        /// This requires the server to support it otherwise it might respond with an
252        /// error.
253        #[must_use]
254        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
255            self.inner = self.inner.send_compressed(encoding);
256            self
257        }
258        /// Enable decompressing responses.
259        #[must_use]
260        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
261            self.inner = self.inner.accept_compressed(encoding);
262            self
263        }
264        /// Limits the maximum size of a decoded message.
265        ///
266        /// Default: `4MB`
267        #[must_use]
268        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
269            self.inner = self.inner.max_decoding_message_size(limit);
270            self
271        }
272        /// Limits the maximum size of an encoded message.
273        ///
274        /// Default: `usize::MAX`
275        #[must_use]
276        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
277            self.inner = self.inner.max_encoding_message_size(limit);
278            self
279        }
280        pub async fn get_enrichments(
281            &mut self,
282            request: impl tonic::IntoRequest<super::GetEnrichmentsRequest>,
283        ) -> std::result::Result<
284            tonic::Response<super::GetEnrichmentsResponse>,
285            tonic::Status,
286        > {
287            self.inner
288                .ready()
289                .await
290                .map_err(|e| {
291                    tonic::Status::unknown(
292                        format!("Service was not ready: {}", e.into()),
293                    )
294                })?;
295            let codec = tonic::codec::ProstCodec::default();
296            let path = http::uri::PathAndQuery::from_static(
297                "/com.coralogix.enrichment.v1.EnrichmentService/GetEnrichments",
298            );
299            let mut req = request.into_request();
300            req.extensions_mut()
301                .insert(
302                    GrpcMethod::new(
303                        "com.coralogix.enrichment.v1.EnrichmentService",
304                        "GetEnrichments",
305                    ),
306                );
307            self.inner.unary(req, path, codec).await
308        }
309        pub async fn add_enrichments(
310            &mut self,
311            request: impl tonic::IntoRequest<super::AddEnrichmentsRequest>,
312        ) -> std::result::Result<
313            tonic::Response<super::AddEnrichmentsResponse>,
314            tonic::Status,
315        > {
316            self.inner
317                .ready()
318                .await
319                .map_err(|e| {
320                    tonic::Status::unknown(
321                        format!("Service was not ready: {}", e.into()),
322                    )
323                })?;
324            let codec = tonic::codec::ProstCodec::default();
325            let path = http::uri::PathAndQuery::from_static(
326                "/com.coralogix.enrichment.v1.EnrichmentService/AddEnrichments",
327            );
328            let mut req = request.into_request();
329            req.extensions_mut()
330                .insert(
331                    GrpcMethod::new(
332                        "com.coralogix.enrichment.v1.EnrichmentService",
333                        "AddEnrichments",
334                    ),
335                );
336            self.inner.unary(req, path, codec).await
337        }
338        pub async fn remove_enrichments(
339            &mut self,
340            request: impl tonic::IntoRequest<super::RemoveEnrichmentsRequest>,
341        ) -> std::result::Result<
342            tonic::Response<super::RemoveEnrichmentsResponse>,
343            tonic::Status,
344        > {
345            self.inner
346                .ready()
347                .await
348                .map_err(|e| {
349                    tonic::Status::unknown(
350                        format!("Service was not ready: {}", e.into()),
351                    )
352                })?;
353            let codec = tonic::codec::ProstCodec::default();
354            let path = http::uri::PathAndQuery::from_static(
355                "/com.coralogix.enrichment.v1.EnrichmentService/RemoveEnrichments",
356            );
357            let mut req = request.into_request();
358            req.extensions_mut()
359                .insert(
360                    GrpcMethod::new(
361                        "com.coralogix.enrichment.v1.EnrichmentService",
362                        "RemoveEnrichments",
363                    ),
364                );
365            self.inner.unary(req, path, codec).await
366        }
367        pub async fn get_enrichment_limit(
368            &mut self,
369            request: impl tonic::IntoRequest<super::GetEnrichmentLimitRequest>,
370        ) -> std::result::Result<
371            tonic::Response<super::GetEnrichmentLimitResponse>,
372            tonic::Status,
373        > {
374            self.inner
375                .ready()
376                .await
377                .map_err(|e| {
378                    tonic::Status::unknown(
379                        format!("Service was not ready: {}", e.into()),
380                    )
381                })?;
382            let codec = tonic::codec::ProstCodec::default();
383            let path = http::uri::PathAndQuery::from_static(
384                "/com.coralogix.enrichment.v1.EnrichmentService/GetEnrichmentLimit",
385            );
386            let mut req = request.into_request();
387            req.extensions_mut()
388                .insert(
389                    GrpcMethod::new(
390                        "com.coralogix.enrichment.v1.EnrichmentService",
391                        "GetEnrichmentLimit",
392                    ),
393                );
394            self.inner.unary(req, path, codec).await
395        }
396        pub async fn atomic_overwrite_enrichments(
397            &mut self,
398            request: impl tonic::IntoRequest<super::AtomicOverwriteEnrichmentsRequest>,
399        ) -> std::result::Result<
400            tonic::Response<super::AtomicOverwriteEnrichmentsResponse>,
401            tonic::Status,
402        > {
403            self.inner
404                .ready()
405                .await
406                .map_err(|e| {
407                    tonic::Status::unknown(
408                        format!("Service was not ready: {}", e.into()),
409                    )
410                })?;
411            let codec = tonic::codec::ProstCodec::default();
412            let path = http::uri::PathAndQuery::from_static(
413                "/com.coralogix.enrichment.v1.EnrichmentService/AtomicOverwriteEnrichments",
414            );
415            let mut req = request.into_request();
416            req.extensions_mut()
417                .insert(
418                    GrpcMethod::new(
419                        "com.coralogix.enrichment.v1.EnrichmentService",
420                        "AtomicOverwriteEnrichments",
421                    ),
422                );
423            self.inner.unary(req, path, codec).await
424        }
425        pub async fn get_company_enrichment_settings(
426            &mut self,
427            request: impl tonic::IntoRequest<super::GetCompanyEnrichmentSettingsRequest>,
428        ) -> std::result::Result<
429            tonic::Response<super::GetCompanyEnrichmentSettingsResponse>,
430            tonic::Status,
431        > {
432            self.inner
433                .ready()
434                .await
435                .map_err(|e| {
436                    tonic::Status::unknown(
437                        format!("Service was not ready: {}", e.into()),
438                    )
439                })?;
440            let codec = tonic::codec::ProstCodec::default();
441            let path = http::uri::PathAndQuery::from_static(
442                "/com.coralogix.enrichment.v1.EnrichmentService/GetCompanyEnrichmentSettings",
443            );
444            let mut req = request.into_request();
445            req.extensions_mut()
446                .insert(
447                    GrpcMethod::new(
448                        "com.coralogix.enrichment.v1.EnrichmentService",
449                        "GetCompanyEnrichmentSettings",
450                    ),
451                );
452            self.inner.unary(req, path, codec).await
453        }
454    }
455}
456#[derive(serde::Serialize, serde::Deserialize)]
457#[serde(rename_all = "snake_case")]
458#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct CustomEnrichment {
460    #[prost(uint32, tag = "1")]
461    pub id: u32,
462    #[prost(string, tag = "3")]
463    pub name: ::prost::alloc::string::String,
464    #[prost(string, tag = "4")]
465    pub description: ::prost::alloc::string::String,
466    #[prost(uint32, tag = "5")]
467    pub version: u32,
468    #[prost(bool, tag = "6")]
469    pub is_query_only: bool,
470    #[prost(string, tag = "7")]
471    pub file_name: ::prost::alloc::string::String,
472}
473#[derive(serde::Serialize, serde::Deserialize)]
474#[serde(rename_all = "snake_case")]
475#[derive(Clone, PartialEq, ::prost::Message)]
476pub struct CustomEnrichmentData {
477    #[prost(message, optional, tag = "1")]
478    pub definition: ::core::option::Option<CustomEnrichment>,
479    #[prost(oneof = "custom_enrichment_data::Content", tags = "3, 4")]
480    pub content: ::core::option::Option<custom_enrichment_data::Content>,
481}
482/// Nested message and enum types in `CustomEnrichmentData`.
483pub mod custom_enrichment_data {
484    #[derive(serde::Serialize, serde::Deserialize)]
485    #[serde(rename_all = "snake_case")]
486    #[derive(Clone, PartialEq, ::prost::Oneof)]
487    pub enum Content {
488        #[prost(message, tag = "3")]
489        Textual(::prost::alloc::string::String),
490        #[prost(message, tag = "4")]
491        Binary(::prost::alloc::vec::Vec<u8>),
492    }
493}
494#[derive(serde::Serialize, serde::Deserialize)]
495#[serde(rename_all = "snake_case")]
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct File {
498    #[prost(message, optional, tag = "1")]
499    pub name: ::core::option::Option<::prost::alloc::string::String>,
500    #[prost(message, optional, tag = "2")]
501    pub extension: ::core::option::Option<::prost::alloc::string::String>,
502    #[prost(oneof = "file::Content", tags = "3, 4")]
503    pub content: ::core::option::Option<file::Content>,
504}
505/// Nested message and enum types in `File`.
506pub mod file {
507    #[derive(serde::Serialize, serde::Deserialize)]
508    #[serde(rename_all = "snake_case")]
509    #[derive(Clone, PartialEq, ::prost::Oneof)]
510    pub enum Content {
511        #[prost(message, tag = "3")]
512        Textual(::prost::alloc::string::String),
513        #[prost(message, tag = "4")]
514        Binary(::prost::alloc::vec::Vec<u8>),
515    }
516}
517#[derive(serde::Serialize, serde::Deserialize)]
518#[serde(rename_all = "snake_case")]
519#[derive(Clone, Copy, PartialEq, ::prost::Message)]
520pub struct GetCustomEnrichmentRequest {
521    #[prost(message, optional, tag = "1")]
522    pub id: ::core::option::Option<u32>,
523}
524#[derive(serde::Serialize, serde::Deserialize)]
525#[serde(rename_all = "snake_case")]
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct GetCustomEnrichmentResponse {
528    #[prost(message, optional, tag = "1")]
529    pub custom_enrichment: ::core::option::Option<CustomEnrichment>,
530}
531#[derive(serde::Serialize, serde::Deserialize)]
532#[serde(rename_all = "snake_case")]
533#[derive(Clone, Copy, PartialEq, ::prost::Message)]
534pub struct GetCustomEnrichmentsRequest {}
535#[derive(serde::Serialize, serde::Deserialize)]
536#[serde(rename_all = "snake_case")]
537#[derive(Clone, PartialEq, ::prost::Message)]
538pub struct GetCustomEnrichmentsResponse {
539    #[prost(message, repeated, tag = "1")]
540    pub custom_enrichments: ::prost::alloc::vec::Vec<CustomEnrichment>,
541}
542#[derive(serde::Serialize, serde::Deserialize)]
543#[serde(rename_all = "snake_case")]
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct CreateCustomEnrichmentRequest {
546    #[prost(message, optional, tag = "1")]
547    pub name: ::core::option::Option<::prost::alloc::string::String>,
548    #[prost(message, optional, tag = "2")]
549    pub description: ::core::option::Option<::prost::alloc::string::String>,
550    #[prost(message, optional, tag = "4")]
551    pub file: ::core::option::Option<File>,
552}
553#[derive(serde::Serialize, serde::Deserialize)]
554#[serde(rename_all = "snake_case")]
555#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct CreateCustomEnrichmentResponse {
557    #[prost(string, tag = "1")]
558    pub message: ::prost::alloc::string::String,
559    #[prost(message, optional, tag = "2")]
560    pub custom_enrichment: ::core::option::Option<CustomEnrichment>,
561}
562#[derive(serde::Serialize, serde::Deserialize)]
563#[serde(rename_all = "snake_case")]
564#[derive(Clone, PartialEq, ::prost::Message)]
565pub struct UpdateCustomEnrichmentRequest {
566    #[prost(message, optional, tag = "1")]
567    pub custom_enrichment_id: ::core::option::Option<u32>,
568    #[prost(message, optional, tag = "2")]
569    pub name: ::core::option::Option<::prost::alloc::string::String>,
570    #[prost(message, optional, tag = "3")]
571    pub description: ::core::option::Option<::prost::alloc::string::String>,
572    #[prost(message, optional, tag = "4")]
573    pub file: ::core::option::Option<File>,
574}
575#[derive(serde::Serialize, serde::Deserialize)]
576#[serde(rename_all = "snake_case")]
577#[derive(Clone, PartialEq, ::prost::Message)]
578pub struct UpdateCustomEnrichmentResponse {
579    #[prost(string, tag = "1")]
580    pub message: ::prost::alloc::string::String,
581    #[prost(message, optional, tag = "2")]
582    pub custom_enrichment: ::core::option::Option<CustomEnrichment>,
583}
584#[derive(serde::Serialize, serde::Deserialize)]
585#[serde(rename_all = "snake_case")]
586#[derive(Clone, Copy, PartialEq, ::prost::Message)]
587pub struct DeleteCustomEnrichmentRequest {
588    #[prost(message, optional, tag = "2")]
589    pub custom_enrichment_id: ::core::option::Option<u32>,
590}
591#[derive(serde::Serialize, serde::Deserialize)]
592#[serde(rename_all = "snake_case")]
593#[derive(Clone, PartialEq, ::prost::Message)]
594pub struct DeleteCustomEnrichmentResponse {
595    #[prost(string, tag = "1")]
596    pub message: ::prost::alloc::string::String,
597    #[prost(uint32, tag = "2")]
598    pub custom_enrichment_id: u32,
599}
600#[derive(serde::Serialize, serde::Deserialize)]
601#[serde(rename_all = "snake_case")]
602#[derive(Clone, PartialEq, ::prost::Message)]
603pub struct SearchCustomEnrichmentDataRequest {
604    #[prost(message, repeated, tag = "1")]
605    pub search_clauses: ::prost::alloc::vec::Vec<
606        search_custom_enrichment_data_request::SearchClause,
607    >,
608}
609/// Nested message and enum types in `SearchCustomEnrichmentDataRequest`.
610pub mod search_custom_enrichment_data_request {
611    #[derive(serde::Serialize, serde::Deserialize)]
612    #[serde(rename_all = "snake_case")]
613    #[derive(Clone, PartialEq, ::prost::Message)]
614    pub struct SearchClause {
615        #[prost(oneof = "search_clause::SearchBy", tags = "1, 2")]
616        pub search_by: ::core::option::Option<search_clause::SearchBy>,
617    }
618    /// Nested message and enum types in `SearchClause`.
619    pub mod search_clause {
620        #[derive(serde::Serialize, serde::Deserialize)]
621        #[serde(rename_all = "snake_case")]
622        #[derive(Clone, PartialEq, ::prost::Oneof)]
623        pub enum SearchBy {
624            #[prost(message, tag = "1")]
625            Id(u32),
626            #[prost(message, tag = "2")]
627            Name(::prost::alloc::string::String),
628        }
629    }
630}
631#[derive(serde::Serialize, serde::Deserialize)]
632#[serde(rename_all = "snake_case")]
633#[derive(Clone, PartialEq, ::prost::Message)]
634pub struct SearchCustomEnrichmentDataResponse {
635    #[prost(message, repeated, tag = "1")]
636    pub custom_enrichments_data: ::prost::alloc::vec::Vec<CustomEnrichmentData>,
637}
638/// Generated client implementations.
639pub mod custom_enrichment_service_client {
640    #![allow(
641        unused_variables,
642        dead_code,
643        missing_docs,
644        clippy::wildcard_imports,
645        clippy::let_unit_value,
646    )]
647    use tonic::codegen::*;
648    use tonic::codegen::http::Uri;
649    #[derive(Debug, Clone)]
650    pub struct CustomEnrichmentServiceClient<T> {
651        inner: tonic::client::Grpc<T>,
652    }
653    impl CustomEnrichmentServiceClient<tonic::transport::Channel> {
654        /// Attempt to create a new client by connecting to a given endpoint.
655        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
656        where
657            D: TryInto<tonic::transport::Endpoint>,
658            D::Error: Into<StdError>,
659        {
660            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
661            Ok(Self::new(conn))
662        }
663    }
664    impl<T> CustomEnrichmentServiceClient<T>
665    where
666        T: tonic::client::GrpcService<tonic::body::BoxBody>,
667        T::Error: Into<StdError>,
668        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
669        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
670    {
671        pub fn new(inner: T) -> Self {
672            let inner = tonic::client::Grpc::new(inner);
673            Self { inner }
674        }
675        pub fn with_origin(inner: T, origin: Uri) -> Self {
676            let inner = tonic::client::Grpc::with_origin(inner, origin);
677            Self { inner }
678        }
679        pub fn with_interceptor<F>(
680            inner: T,
681            interceptor: F,
682        ) -> CustomEnrichmentServiceClient<InterceptedService<T, F>>
683        where
684            F: tonic::service::Interceptor,
685            T::ResponseBody: Default,
686            T: tonic::codegen::Service<
687                http::Request<tonic::body::BoxBody>,
688                Response = http::Response<
689                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
690                >,
691            >,
692            <T as tonic::codegen::Service<
693                http::Request<tonic::body::BoxBody>,
694            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
695        {
696            CustomEnrichmentServiceClient::new(
697                InterceptedService::new(inner, interceptor),
698            )
699        }
700        /// Compress requests with the given encoding.
701        ///
702        /// This requires the server to support it otherwise it might respond with an
703        /// error.
704        #[must_use]
705        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
706            self.inner = self.inner.send_compressed(encoding);
707            self
708        }
709        /// Enable decompressing responses.
710        #[must_use]
711        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
712            self.inner = self.inner.accept_compressed(encoding);
713            self
714        }
715        /// Limits the maximum size of a decoded message.
716        ///
717        /// Default: `4MB`
718        #[must_use]
719        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
720            self.inner = self.inner.max_decoding_message_size(limit);
721            self
722        }
723        /// Limits the maximum size of an encoded message.
724        ///
725        /// Default: `usize::MAX`
726        #[must_use]
727        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
728            self.inner = self.inner.max_encoding_message_size(limit);
729            self
730        }
731        pub async fn get_custom_enrichment(
732            &mut self,
733            request: impl tonic::IntoRequest<super::GetCustomEnrichmentRequest>,
734        ) -> std::result::Result<
735            tonic::Response<super::GetCustomEnrichmentResponse>,
736            tonic::Status,
737        > {
738            self.inner
739                .ready()
740                .await
741                .map_err(|e| {
742                    tonic::Status::unknown(
743                        format!("Service was not ready: {}", e.into()),
744                    )
745                })?;
746            let codec = tonic::codec::ProstCodec::default();
747            let path = http::uri::PathAndQuery::from_static(
748                "/com.coralogix.enrichment.v1.CustomEnrichmentService/GetCustomEnrichment",
749            );
750            let mut req = request.into_request();
751            req.extensions_mut()
752                .insert(
753                    GrpcMethod::new(
754                        "com.coralogix.enrichment.v1.CustomEnrichmentService",
755                        "GetCustomEnrichment",
756                    ),
757                );
758            self.inner.unary(req, path, codec).await
759        }
760        pub async fn get_custom_enrichments(
761            &mut self,
762            request: impl tonic::IntoRequest<super::GetCustomEnrichmentsRequest>,
763        ) -> std::result::Result<
764            tonic::Response<super::GetCustomEnrichmentsResponse>,
765            tonic::Status,
766        > {
767            self.inner
768                .ready()
769                .await
770                .map_err(|e| {
771                    tonic::Status::unknown(
772                        format!("Service was not ready: {}", e.into()),
773                    )
774                })?;
775            let codec = tonic::codec::ProstCodec::default();
776            let path = http::uri::PathAndQuery::from_static(
777                "/com.coralogix.enrichment.v1.CustomEnrichmentService/GetCustomEnrichments",
778            );
779            let mut req = request.into_request();
780            req.extensions_mut()
781                .insert(
782                    GrpcMethod::new(
783                        "com.coralogix.enrichment.v1.CustomEnrichmentService",
784                        "GetCustomEnrichments",
785                    ),
786                );
787            self.inner.unary(req, path, codec).await
788        }
789        pub async fn create_custom_enrichment(
790            &mut self,
791            request: impl tonic::IntoRequest<super::CreateCustomEnrichmentRequest>,
792        ) -> std::result::Result<
793            tonic::Response<super::CreateCustomEnrichmentResponse>,
794            tonic::Status,
795        > {
796            self.inner
797                .ready()
798                .await
799                .map_err(|e| {
800                    tonic::Status::unknown(
801                        format!("Service was not ready: {}", e.into()),
802                    )
803                })?;
804            let codec = tonic::codec::ProstCodec::default();
805            let path = http::uri::PathAndQuery::from_static(
806                "/com.coralogix.enrichment.v1.CustomEnrichmentService/CreateCustomEnrichment",
807            );
808            let mut req = request.into_request();
809            req.extensions_mut()
810                .insert(
811                    GrpcMethod::new(
812                        "com.coralogix.enrichment.v1.CustomEnrichmentService",
813                        "CreateCustomEnrichment",
814                    ),
815                );
816            self.inner.unary(req, path, codec).await
817        }
818        pub async fn update_custom_enrichment(
819            &mut self,
820            request: impl tonic::IntoRequest<super::UpdateCustomEnrichmentRequest>,
821        ) -> std::result::Result<
822            tonic::Response<super::UpdateCustomEnrichmentResponse>,
823            tonic::Status,
824        > {
825            self.inner
826                .ready()
827                .await
828                .map_err(|e| {
829                    tonic::Status::unknown(
830                        format!("Service was not ready: {}", e.into()),
831                    )
832                })?;
833            let codec = tonic::codec::ProstCodec::default();
834            let path = http::uri::PathAndQuery::from_static(
835                "/com.coralogix.enrichment.v1.CustomEnrichmentService/UpdateCustomEnrichment",
836            );
837            let mut req = request.into_request();
838            req.extensions_mut()
839                .insert(
840                    GrpcMethod::new(
841                        "com.coralogix.enrichment.v1.CustomEnrichmentService",
842                        "UpdateCustomEnrichment",
843                    ),
844                );
845            self.inner.unary(req, path, codec).await
846        }
847        pub async fn delete_custom_enrichment(
848            &mut self,
849            request: impl tonic::IntoRequest<super::DeleteCustomEnrichmentRequest>,
850        ) -> std::result::Result<
851            tonic::Response<super::DeleteCustomEnrichmentResponse>,
852            tonic::Status,
853        > {
854            self.inner
855                .ready()
856                .await
857                .map_err(|e| {
858                    tonic::Status::unknown(
859                        format!("Service was not ready: {}", e.into()),
860                    )
861                })?;
862            let codec = tonic::codec::ProstCodec::default();
863            let path = http::uri::PathAndQuery::from_static(
864                "/com.coralogix.enrichment.v1.CustomEnrichmentService/DeleteCustomEnrichment",
865            );
866            let mut req = request.into_request();
867            req.extensions_mut()
868                .insert(
869                    GrpcMethod::new(
870                        "com.coralogix.enrichment.v1.CustomEnrichmentService",
871                        "DeleteCustomEnrichment",
872                    ),
873                );
874            self.inner.unary(req, path, codec).await
875        }
876        pub async fn search_custom_enrichment_data(
877            &mut self,
878            request: impl tonic::IntoRequest<super::SearchCustomEnrichmentDataRequest>,
879        ) -> std::result::Result<
880            tonic::Response<super::SearchCustomEnrichmentDataResponse>,
881            tonic::Status,
882        > {
883            self.inner
884                .ready()
885                .await
886                .map_err(|e| {
887                    tonic::Status::unknown(
888                        format!("Service was not ready: {}", e.into()),
889                    )
890                })?;
891            let codec = tonic::codec::ProstCodec::default();
892            let path = http::uri::PathAndQuery::from_static(
893                "/com.coralogix.enrichment.v1.CustomEnrichmentService/SearchCustomEnrichmentData",
894            );
895            let mut req = request.into_request();
896            req.extensions_mut()
897                .insert(
898                    GrpcMethod::new(
899                        "com.coralogix.enrichment.v1.CustomEnrichmentService",
900                        "SearchCustomEnrichmentData",
901                    ),
902                );
903            self.inner.unary(req, path, codec).await
904        }
905    }
906}