1#[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}
9pub 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 #[prost(message, optional, tag = "1")]
84 pub field_name: ::core::option::Option<::prost::alloc::string::String>,
85 #[prost(message, optional, tag = "3")]
87 pub enriched_field_name: ::core::option::Option<::prost::alloc::string::String>,
88 #[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#[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}
189pub 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 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 #[must_use]
254 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
255 self.inner = self.inner.send_compressed(encoding);
256 self
257 }
258 #[must_use]
260 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
261 self.inner = self.inner.accept_compressed(encoding);
262 self
263 }
264 #[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 #[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 #[prost(uint32, tag = "8")]
473 pub file_size: u32,
474}
475#[derive(serde::Serialize, serde::Deserialize)]
476#[serde(rename_all = "snake_case")]
477#[derive(Clone, PartialEq, ::prost::Message)]
478pub struct CustomEnrichmentData {
479 #[prost(message, optional, tag = "1")]
480 pub definition: ::core::option::Option<CustomEnrichment>,
481 #[prost(oneof = "custom_enrichment_data::Content", tags = "3, 4")]
482 pub content: ::core::option::Option<custom_enrichment_data::Content>,
483}
484pub mod custom_enrichment_data {
486 #[derive(serde::Serialize, serde::Deserialize)]
487 #[serde(rename_all = "snake_case")]
488 #[derive(Clone, PartialEq, ::prost::Oneof)]
489 pub enum Content {
490 #[prost(message, tag = "3")]
491 Textual(::prost::alloc::string::String),
492 #[prost(message, tag = "4")]
493 Binary(::prost::alloc::vec::Vec<u8>),
494 }
495}
496#[derive(serde::Serialize, serde::Deserialize)]
497#[serde(rename_all = "snake_case")]
498#[derive(Clone, PartialEq, ::prost::Message)]
499pub struct File {
500 #[prost(message, optional, tag = "1")]
501 pub name: ::core::option::Option<::prost::alloc::string::String>,
502 #[prost(message, optional, tag = "2")]
503 pub extension: ::core::option::Option<::prost::alloc::string::String>,
504 #[prost(message, optional, tag = "5")]
505 pub size: ::core::option::Option<u32>,
506 #[prost(oneof = "file::Content", tags = "3, 4")]
507 pub content: ::core::option::Option<file::Content>,
508}
509pub mod file {
511 #[derive(serde::Serialize, serde::Deserialize)]
512 #[serde(rename_all = "snake_case")]
513 #[derive(Clone, PartialEq, ::prost::Oneof)]
514 pub enum Content {
515 #[prost(message, tag = "3")]
516 Textual(::prost::alloc::string::String),
517 #[prost(message, tag = "4")]
518 Binary(::prost::alloc::vec::Vec<u8>),
519 }
520}
521#[derive(serde::Serialize, serde::Deserialize)]
522#[serde(rename_all = "snake_case")]
523#[derive(Clone, Copy, PartialEq, ::prost::Message)]
524pub struct GetCustomEnrichmentRequest {
525 #[prost(message, optional, tag = "1")]
526 pub id: ::core::option::Option<u32>,
527}
528#[derive(serde::Serialize, serde::Deserialize)]
529#[serde(rename_all = "snake_case")]
530#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct GetCustomEnrichmentResponse {
532 #[prost(message, optional, tag = "1")]
533 pub custom_enrichment: ::core::option::Option<CustomEnrichment>,
534}
535#[derive(serde::Serialize, serde::Deserialize)]
536#[serde(rename_all = "snake_case")]
537#[derive(Clone, Copy, PartialEq, ::prost::Message)]
538pub struct GetCustomEnrichmentsRequest {}
539#[derive(serde::Serialize, serde::Deserialize)]
540#[serde(rename_all = "snake_case")]
541#[derive(Clone, PartialEq, ::prost::Message)]
542pub struct GetCustomEnrichmentsResponse {
543 #[prost(message, repeated, tag = "1")]
544 pub custom_enrichments: ::prost::alloc::vec::Vec<CustomEnrichment>,
545}
546#[derive(serde::Serialize, serde::Deserialize)]
547#[serde(rename_all = "snake_case")]
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct CreateCustomEnrichmentRequest {
550 #[prost(message, optional, tag = "1")]
551 pub name: ::core::option::Option<::prost::alloc::string::String>,
552 #[prost(message, optional, tag = "2")]
553 pub description: ::core::option::Option<::prost::alloc::string::String>,
554 #[prost(message, optional, tag = "4")]
555 pub file: ::core::option::Option<File>,
556}
557#[derive(serde::Serialize, serde::Deserialize)]
558#[serde(rename_all = "snake_case")]
559#[derive(Clone, PartialEq, ::prost::Message)]
560pub struct CreateCustomEnrichmentResponse {
561 #[prost(string, tag = "1")]
562 pub message: ::prost::alloc::string::String,
563 #[prost(message, optional, tag = "2")]
564 pub custom_enrichment: ::core::option::Option<CustomEnrichment>,
565}
566#[derive(serde::Serialize, serde::Deserialize)]
567#[serde(rename_all = "snake_case")]
568#[derive(Clone, PartialEq, ::prost::Message)]
569pub struct UpdateCustomEnrichmentRequest {
570 #[prost(message, optional, tag = "1")]
571 pub custom_enrichment_id: ::core::option::Option<u32>,
572 #[prost(message, optional, tag = "2")]
573 pub name: ::core::option::Option<::prost::alloc::string::String>,
574 #[prost(message, optional, tag = "3")]
575 pub description: ::core::option::Option<::prost::alloc::string::String>,
576 #[prost(message, optional, tag = "4")]
577 pub file: ::core::option::Option<File>,
578}
579#[derive(serde::Serialize, serde::Deserialize)]
580#[serde(rename_all = "snake_case")]
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct UpdateCustomEnrichmentResponse {
583 #[prost(string, tag = "1")]
584 pub message: ::prost::alloc::string::String,
585 #[prost(message, optional, tag = "2")]
586 pub custom_enrichment: ::core::option::Option<CustomEnrichment>,
587}
588#[derive(serde::Serialize, serde::Deserialize)]
589#[serde(rename_all = "snake_case")]
590#[derive(Clone, Copy, PartialEq, ::prost::Message)]
591pub struct DeleteCustomEnrichmentRequest {
592 #[prost(message, optional, tag = "2")]
593 pub custom_enrichment_id: ::core::option::Option<u32>,
594}
595#[derive(serde::Serialize, serde::Deserialize)]
596#[serde(rename_all = "snake_case")]
597#[derive(Clone, PartialEq, ::prost::Message)]
598pub struct DeleteCustomEnrichmentResponse {
599 #[prost(string, tag = "1")]
600 pub message: ::prost::alloc::string::String,
601 #[prost(uint32, tag = "2")]
602 pub custom_enrichment_id: u32,
603}
604#[derive(serde::Serialize, serde::Deserialize)]
605#[serde(rename_all = "snake_case")]
606#[derive(Clone, PartialEq, ::prost::Message)]
607pub struct SearchCustomEnrichmentDataRequest {
608 #[prost(message, repeated, tag = "1")]
609 pub search_clauses: ::prost::alloc::vec::Vec<
610 search_custom_enrichment_data_request::SearchClause,
611 >,
612}
613pub mod search_custom_enrichment_data_request {
615 #[derive(serde::Serialize, serde::Deserialize)]
616 #[serde(rename_all = "snake_case")]
617 #[derive(Clone, PartialEq, ::prost::Message)]
618 pub struct SearchClause {
619 #[prost(oneof = "search_clause::SearchBy", tags = "1, 2")]
620 pub search_by: ::core::option::Option<search_clause::SearchBy>,
621 }
622 pub mod search_clause {
624 #[derive(serde::Serialize, serde::Deserialize)]
625 #[serde(rename_all = "snake_case")]
626 #[derive(Clone, PartialEq, ::prost::Oneof)]
627 pub enum SearchBy {
628 #[prost(message, tag = "1")]
629 Id(u32),
630 #[prost(message, tag = "2")]
631 Name(::prost::alloc::string::String),
632 }
633 }
634}
635#[derive(serde::Serialize, serde::Deserialize)]
636#[serde(rename_all = "snake_case")]
637#[derive(Clone, PartialEq, ::prost::Message)]
638pub struct SearchCustomEnrichmentDataResponse {
639 #[prost(message, repeated, tag = "1")]
640 pub custom_enrichments_data: ::prost::alloc::vec::Vec<CustomEnrichmentData>,
641}
642pub mod custom_enrichment_service_client {
644 #![allow(
645 unused_variables,
646 dead_code,
647 missing_docs,
648 clippy::wildcard_imports,
649 clippy::let_unit_value,
650 )]
651 use tonic::codegen::*;
652 use tonic::codegen::http::Uri;
653 #[derive(Debug, Clone)]
654 pub struct CustomEnrichmentServiceClient<T> {
655 inner: tonic::client::Grpc<T>,
656 }
657 impl CustomEnrichmentServiceClient<tonic::transport::Channel> {
658 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
660 where
661 D: TryInto<tonic::transport::Endpoint>,
662 D::Error: Into<StdError>,
663 {
664 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
665 Ok(Self::new(conn))
666 }
667 }
668 impl<T> CustomEnrichmentServiceClient<T>
669 where
670 T: tonic::client::GrpcService<tonic::body::BoxBody>,
671 T::Error: Into<StdError>,
672 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
673 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
674 {
675 pub fn new(inner: T) -> Self {
676 let inner = tonic::client::Grpc::new(inner);
677 Self { inner }
678 }
679 pub fn with_origin(inner: T, origin: Uri) -> Self {
680 let inner = tonic::client::Grpc::with_origin(inner, origin);
681 Self { inner }
682 }
683 pub fn with_interceptor<F>(
684 inner: T,
685 interceptor: F,
686 ) -> CustomEnrichmentServiceClient<InterceptedService<T, F>>
687 where
688 F: tonic::service::Interceptor,
689 T::ResponseBody: Default,
690 T: tonic::codegen::Service<
691 http::Request<tonic::body::BoxBody>,
692 Response = http::Response<
693 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
694 >,
695 >,
696 <T as tonic::codegen::Service<
697 http::Request<tonic::body::BoxBody>,
698 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
699 {
700 CustomEnrichmentServiceClient::new(
701 InterceptedService::new(inner, interceptor),
702 )
703 }
704 #[must_use]
709 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
710 self.inner = self.inner.send_compressed(encoding);
711 self
712 }
713 #[must_use]
715 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
716 self.inner = self.inner.accept_compressed(encoding);
717 self
718 }
719 #[must_use]
723 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
724 self.inner = self.inner.max_decoding_message_size(limit);
725 self
726 }
727 #[must_use]
731 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
732 self.inner = self.inner.max_encoding_message_size(limit);
733 self
734 }
735 pub async fn get_custom_enrichment(
736 &mut self,
737 request: impl tonic::IntoRequest<super::GetCustomEnrichmentRequest>,
738 ) -> std::result::Result<
739 tonic::Response<super::GetCustomEnrichmentResponse>,
740 tonic::Status,
741 > {
742 self.inner
743 .ready()
744 .await
745 .map_err(|e| {
746 tonic::Status::unknown(
747 format!("Service was not ready: {}", e.into()),
748 )
749 })?;
750 let codec = tonic::codec::ProstCodec::default();
751 let path = http::uri::PathAndQuery::from_static(
752 "/com.coralogix.enrichment.v1.CustomEnrichmentService/GetCustomEnrichment",
753 );
754 let mut req = request.into_request();
755 req.extensions_mut()
756 .insert(
757 GrpcMethod::new(
758 "com.coralogix.enrichment.v1.CustomEnrichmentService",
759 "GetCustomEnrichment",
760 ),
761 );
762 self.inner.unary(req, path, codec).await
763 }
764 pub async fn get_custom_enrichments(
765 &mut self,
766 request: impl tonic::IntoRequest<super::GetCustomEnrichmentsRequest>,
767 ) -> std::result::Result<
768 tonic::Response<super::GetCustomEnrichmentsResponse>,
769 tonic::Status,
770 > {
771 self.inner
772 .ready()
773 .await
774 .map_err(|e| {
775 tonic::Status::unknown(
776 format!("Service was not ready: {}", e.into()),
777 )
778 })?;
779 let codec = tonic::codec::ProstCodec::default();
780 let path = http::uri::PathAndQuery::from_static(
781 "/com.coralogix.enrichment.v1.CustomEnrichmentService/GetCustomEnrichments",
782 );
783 let mut req = request.into_request();
784 req.extensions_mut()
785 .insert(
786 GrpcMethod::new(
787 "com.coralogix.enrichment.v1.CustomEnrichmentService",
788 "GetCustomEnrichments",
789 ),
790 );
791 self.inner.unary(req, path, codec).await
792 }
793 pub async fn create_custom_enrichment(
794 &mut self,
795 request: impl tonic::IntoRequest<super::CreateCustomEnrichmentRequest>,
796 ) -> std::result::Result<
797 tonic::Response<super::CreateCustomEnrichmentResponse>,
798 tonic::Status,
799 > {
800 self.inner
801 .ready()
802 .await
803 .map_err(|e| {
804 tonic::Status::unknown(
805 format!("Service was not ready: {}", e.into()),
806 )
807 })?;
808 let codec = tonic::codec::ProstCodec::default();
809 let path = http::uri::PathAndQuery::from_static(
810 "/com.coralogix.enrichment.v1.CustomEnrichmentService/CreateCustomEnrichment",
811 );
812 let mut req = request.into_request();
813 req.extensions_mut()
814 .insert(
815 GrpcMethod::new(
816 "com.coralogix.enrichment.v1.CustomEnrichmentService",
817 "CreateCustomEnrichment",
818 ),
819 );
820 self.inner.unary(req, path, codec).await
821 }
822 pub async fn update_custom_enrichment(
823 &mut self,
824 request: impl tonic::IntoRequest<super::UpdateCustomEnrichmentRequest>,
825 ) -> std::result::Result<
826 tonic::Response<super::UpdateCustomEnrichmentResponse>,
827 tonic::Status,
828 > {
829 self.inner
830 .ready()
831 .await
832 .map_err(|e| {
833 tonic::Status::unknown(
834 format!("Service was not ready: {}", e.into()),
835 )
836 })?;
837 let codec = tonic::codec::ProstCodec::default();
838 let path = http::uri::PathAndQuery::from_static(
839 "/com.coralogix.enrichment.v1.CustomEnrichmentService/UpdateCustomEnrichment",
840 );
841 let mut req = request.into_request();
842 req.extensions_mut()
843 .insert(
844 GrpcMethod::new(
845 "com.coralogix.enrichment.v1.CustomEnrichmentService",
846 "UpdateCustomEnrichment",
847 ),
848 );
849 self.inner.unary(req, path, codec).await
850 }
851 pub async fn delete_custom_enrichment(
852 &mut self,
853 request: impl tonic::IntoRequest<super::DeleteCustomEnrichmentRequest>,
854 ) -> std::result::Result<
855 tonic::Response<super::DeleteCustomEnrichmentResponse>,
856 tonic::Status,
857 > {
858 self.inner
859 .ready()
860 .await
861 .map_err(|e| {
862 tonic::Status::unknown(
863 format!("Service was not ready: {}", e.into()),
864 )
865 })?;
866 let codec = tonic::codec::ProstCodec::default();
867 let path = http::uri::PathAndQuery::from_static(
868 "/com.coralogix.enrichment.v1.CustomEnrichmentService/DeleteCustomEnrichment",
869 );
870 let mut req = request.into_request();
871 req.extensions_mut()
872 .insert(
873 GrpcMethod::new(
874 "com.coralogix.enrichment.v1.CustomEnrichmentService",
875 "DeleteCustomEnrichment",
876 ),
877 );
878 self.inner.unary(req, path, codec).await
879 }
880 pub async fn search_custom_enrichment_data(
881 &mut self,
882 request: impl tonic::IntoRequest<super::SearchCustomEnrichmentDataRequest>,
883 ) -> std::result::Result<
884 tonic::Response<super::SearchCustomEnrichmentDataResponse>,
885 tonic::Status,
886 > {
887 self.inner
888 .ready()
889 .await
890 .map_err(|e| {
891 tonic::Status::unknown(
892 format!("Service was not ready: {}", e.into()),
893 )
894 })?;
895 let codec = tonic::codec::ProstCodec::default();
896 let path = http::uri::PathAndQuery::from_static(
897 "/com.coralogix.enrichment.v1.CustomEnrichmentService/SearchCustomEnrichmentData",
898 );
899 let mut req = request.into_request();
900 req.extensions_mut()
901 .insert(
902 GrpcMethod::new(
903 "com.coralogix.enrichment.v1.CustomEnrichmentService",
904 "SearchCustomEnrichmentData",
905 ),
906 );
907 self.inner.unary(req, path, codec).await
908 }
909 }
910}