1#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Connector {
6 #[prost(string, optional, tag = "1")]
8 pub id: ::core::option::Option<::prost::alloc::string::String>,
9 #[prost(enumeration = "super::super::ConnectorType", tag = "3")]
10 pub r#type: i32,
11 #[prost(uint32, optional, tag = "4")]
12 pub team_id: ::core::option::Option<u32>,
13 #[prost(string, tag = "5")]
14 pub name: ::prost::alloc::string::String,
15 #[prost(string, tag = "6")]
16 pub description: ::prost::alloc::string::String,
17 #[prost(message, optional, tag = "7")]
19 pub create_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
20 #[prost(message, optional, tag = "8")]
22 pub update_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
23 #[prost(message, repeated, tag = "11")]
25 pub config_overrides: ::prost::alloc::vec::Vec<EntityTypeConfigOverrides>,
26 #[prost(message, optional, tag = "12")]
27 pub connector_config: ::core::option::Option<ConnectorConfig>,
28}
29#[derive(serde::Serialize, serde::Deserialize)]
30#[serde(rename_all = "snake_case")]
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct ConnectorInternal {
33 #[prost(string, tag = "1")]
35 pub id: ::prost::alloc::string::String,
36 #[prost(string, tag = "2")]
38 pub internal_id: ::prost::alloc::string::String,
39 #[prost(enumeration = "super::super::ConnectorType", tag = "3")]
40 pub r#type: i32,
41 #[prost(uint32, tag = "4")]
42 pub team_id: u32,
43 #[prost(string, tag = "5")]
44 pub name: ::prost::alloc::string::String,
45 #[prost(string, tag = "6")]
46 pub description: ::prost::alloc::string::String,
47 #[prost(message, optional, tag = "7")]
49 pub create_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
50 #[prost(message, optional, tag = "8")]
52 pub update_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
53 #[prost(message, repeated, tag = "9")]
55 pub config_overrides: ::prost::alloc::vec::Vec<EntityTypeConfigOverrides>,
56 #[prost(message, optional, tag = "10")]
57 pub connector_config: ::core::option::Option<ConnectorConfig>,
58}
59#[derive(serde::Serialize, serde::Deserialize)]
60#[serde(rename_all = "snake_case")]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct EntityTypeConfigOverrides {
63 #[prost(enumeration = "super::super::EntityType", tag = "3")]
64 pub entity_type: i32,
65 #[prost(message, repeated, tag = "4")]
66 pub fields: ::prost::alloc::vec::Vec<super::super::TemplatedConnectorConfigField>,
67}
68#[derive(serde::Serialize, serde::Deserialize)]
69#[serde(rename_all = "snake_case")]
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct ConnectorSummary {
72 #[prost(string, optional, tag = "1")]
73 pub id: ::core::option::Option<::prost::alloc::string::String>,
74 #[prost(enumeration = "super::super::ConnectorType", tag = "3")]
75 pub r#type: i32,
76 #[prost(uint32, optional, tag = "4")]
77 pub team_id: ::core::option::Option<u32>,
78 #[prost(string, tag = "5")]
79 pub name: ::prost::alloc::string::String,
80 #[prost(string, tag = "6")]
81 pub description: ::prost::alloc::string::String,
82 #[prost(message, optional, tag = "7")]
83 pub create_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
84 #[prost(message, optional, tag = "8")]
85 pub update_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
86}
87#[derive(serde::Serialize, serde::Deserialize)]
88#[serde(rename_all = "snake_case")]
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct ConnectorConfig {
91 #[prost(message, repeated, tag = "2")]
92 pub fields: ::prost::alloc::vec::Vec<super::super::ConnectorConfigField>,
93}
94#[derive(serde::Serialize, serde::Deserialize)]
95#[serde(rename_all = "snake_case")]
96#[derive(Clone, Copy, PartialEq, ::prost::Message)]
97pub struct ConnectorTypeSummary {
98 #[prost(enumeration = "super::super::ConnectorType", tag = "1")]
99 pub r#type: i32,
100 #[prost(uint32, tag = "2")]
101 pub count: u32,
102}
103#[derive(serde::Serialize, serde::Deserialize)]
104#[serde(rename_all = "snake_case")]
105#[derive(Clone, PartialEq, ::prost::Message)]
106pub struct CreateConnectorRequest {
107 #[prost(message, optional, tag = "1")]
108 pub connector: ::core::option::Option<Connector>,
109}
110#[derive(serde::Serialize, serde::Deserialize)]
111#[serde(rename_all = "snake_case")]
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct CreateConnectorResponse {
114 #[prost(message, optional, tag = "1")]
115 pub connector: ::core::option::Option<Connector>,
116}
117#[derive(serde::Serialize, serde::Deserialize)]
118#[serde(rename_all = "snake_case")]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct ReplaceConnectorRequest {
121 #[prost(message, optional, tag = "1")]
122 pub connector: ::core::option::Option<Connector>,
123}
124#[derive(serde::Serialize, serde::Deserialize)]
125#[serde(rename_all = "snake_case")]
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct ReplaceConnectorResponse {
128 #[prost(message, optional, tag = "1")]
129 pub connector: ::core::option::Option<Connector>,
130}
131#[derive(serde::Serialize, serde::Deserialize)]
132#[serde(rename_all = "snake_case")]
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct DeleteConnectorRequest {
135 #[prost(string, tag = "3")]
136 pub id: ::prost::alloc::string::String,
137}
138#[derive(serde::Serialize, serde::Deserialize)]
139#[serde(rename_all = "snake_case")]
140#[derive(Clone, Copy, PartialEq, ::prost::Message)]
141pub struct DeleteConnectorResponse {}
142#[derive(serde::Serialize, serde::Deserialize)]
143#[serde(rename_all = "snake_case")]
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct GetConnectorRequest {
146 #[prost(string, tag = "3")]
147 pub id: ::prost::alloc::string::String,
148}
149#[derive(serde::Serialize, serde::Deserialize)]
150#[serde(rename_all = "snake_case")]
151#[derive(Clone, PartialEq, ::prost::Message)]
152pub struct GetConnectorResponse {
153 #[prost(message, optional, tag = "1")]
154 pub connector: ::core::option::Option<Connector>,
155}
156#[derive(serde::Serialize, serde::Deserialize)]
157#[serde(rename_all = "snake_case")]
158#[derive(Clone, Copy, PartialEq, ::prost::Message)]
159pub struct ListConnectorsRequest {
160 #[prost(enumeration = "super::super::ConnectorType", tag = "1")]
161 pub connector_type: i32,
162}
163#[derive(serde::Serialize, serde::Deserialize)]
164#[serde(rename_all = "snake_case")]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct ListConnectorsResponse {
167 #[prost(message, repeated, tag = "1")]
168 pub connectors: ::prost::alloc::vec::Vec<Connector>,
169}
170#[derive(serde::Serialize, serde::Deserialize)]
171#[serde(rename_all = "snake_case")]
172#[derive(Clone, PartialEq, ::prost::Message)]
173pub struct BatchGetConnectorsRequest {
174 #[prost(string, repeated, tag = "3")]
175 pub connector_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
176}
177#[derive(serde::Serialize, serde::Deserialize)]
178#[serde(rename_all = "snake_case")]
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct BatchGetConnectorsResponse {
181 #[prost(map = "string, message", tag = "1")]
182 pub connectors: ::std::collections::HashMap<
183 ::prost::alloc::string::String,
184 Connector,
185 >,
186 #[prost(string, repeated, tag = "2")]
187 pub not_found_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
188}
189#[derive(serde::Serialize, serde::Deserialize)]
190#[serde(rename_all = "snake_case")]
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct BatchGetConnectorSummariesRequest {
193 #[prost(string, repeated, tag = "3")]
194 pub connector_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
195}
196#[derive(serde::Serialize, serde::Deserialize)]
197#[serde(rename_all = "snake_case")]
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct BatchGetConnectorSummariesResponse {
200 #[prost(map = "string, message", tag = "1")]
201 pub connector_summaries: ::std::collections::HashMap<
202 ::prost::alloc::string::String,
203 ConnectorSummary,
204 >,
205 #[prost(string, repeated, tag = "2")]
206 pub not_found_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
207}
208#[derive(serde::Serialize, serde::Deserialize)]
209#[serde(rename_all = "snake_case")]
210#[derive(Clone, Copy, PartialEq, ::prost::Message)]
211pub struct GetConnectorTypeSummariesRequest {}
212#[derive(serde::Serialize, serde::Deserialize)]
213#[serde(rename_all = "snake_case")]
214#[derive(Clone, Copy, PartialEq, ::prost::Message)]
215pub struct ListConnectorSummariesRequest {
216 #[prost(enumeration = "super::super::ConnectorType", tag = "1")]
217 pub connector_type: i32,
218}
219#[derive(serde::Serialize, serde::Deserialize)]
220#[serde(rename_all = "snake_case")]
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct ListConnectorSummariesResponse {
223 #[prost(message, repeated, tag = "1")]
224 pub connectors: ::prost::alloc::vec::Vec<ConnectorSummary>,
225}
226#[derive(serde::Serialize, serde::Deserialize)]
227#[serde(rename_all = "snake_case")]
228#[derive(Clone, PartialEq, ::prost::Message)]
229pub struct GetConnectorTypeSummariesResponse {
230 #[prost(message, repeated, tag = "1")]
231 pub connector_type_summaries: ::prost::alloc::vec::Vec<ConnectorTypeSummary>,
232}
233pub mod connectors_service_client {
235 #![allow(
236 unused_variables,
237 dead_code,
238 missing_docs,
239 clippy::wildcard_imports,
240 clippy::let_unit_value,
241 )]
242 use tonic::codegen::*;
243 use tonic::codegen::http::Uri;
244 #[derive(Debug, Clone)]
246 pub struct ConnectorsServiceClient<T> {
247 inner: tonic::client::Grpc<T>,
248 }
249 impl ConnectorsServiceClient<tonic::transport::Channel> {
250 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
252 where
253 D: TryInto<tonic::transport::Endpoint>,
254 D::Error: Into<StdError>,
255 {
256 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
257 Ok(Self::new(conn))
258 }
259 }
260 impl<T> ConnectorsServiceClient<T>
261 where
262 T: tonic::client::GrpcService<tonic::body::BoxBody>,
263 T::Error: Into<StdError>,
264 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
265 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
266 {
267 pub fn new(inner: T) -> Self {
268 let inner = tonic::client::Grpc::new(inner);
269 Self { inner }
270 }
271 pub fn with_origin(inner: T, origin: Uri) -> Self {
272 let inner = tonic::client::Grpc::with_origin(inner, origin);
273 Self { inner }
274 }
275 pub fn with_interceptor<F>(
276 inner: T,
277 interceptor: F,
278 ) -> ConnectorsServiceClient<InterceptedService<T, F>>
279 where
280 F: tonic::service::Interceptor,
281 T::ResponseBody: Default,
282 T: tonic::codegen::Service<
283 http::Request<tonic::body::BoxBody>,
284 Response = http::Response<
285 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
286 >,
287 >,
288 <T as tonic::codegen::Service<
289 http::Request<tonic::body::BoxBody>,
290 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
291 {
292 ConnectorsServiceClient::new(InterceptedService::new(inner, interceptor))
293 }
294 #[must_use]
299 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
300 self.inner = self.inner.send_compressed(encoding);
301 self
302 }
303 #[must_use]
305 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
306 self.inner = self.inner.accept_compressed(encoding);
307 self
308 }
309 #[must_use]
313 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
314 self.inner = self.inner.max_decoding_message_size(limit);
315 self
316 }
317 #[must_use]
321 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
322 self.inner = self.inner.max_encoding_message_size(limit);
323 self
324 }
325 pub async fn create_connector(
326 &mut self,
327 request: impl tonic::IntoRequest<super::CreateConnectorRequest>,
328 ) -> std::result::Result<
329 tonic::Response<super::CreateConnectorResponse>,
330 tonic::Status,
331 > {
332 self.inner
333 .ready()
334 .await
335 .map_err(|e| {
336 tonic::Status::unknown(
337 format!("Service was not ready: {}", e.into()),
338 )
339 })?;
340 let codec = tonic::codec::ProstCodec::default();
341 let path = http::uri::PathAndQuery::from_static(
342 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/CreateConnector",
343 );
344 let mut req = request.into_request();
345 req.extensions_mut()
346 .insert(
347 GrpcMethod::new(
348 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
349 "CreateConnector",
350 ),
351 );
352 self.inner.unary(req, path, codec).await
353 }
354 pub async fn replace_connector(
355 &mut self,
356 request: impl tonic::IntoRequest<super::ReplaceConnectorRequest>,
357 ) -> std::result::Result<
358 tonic::Response<super::ReplaceConnectorResponse>,
359 tonic::Status,
360 > {
361 self.inner
362 .ready()
363 .await
364 .map_err(|e| {
365 tonic::Status::unknown(
366 format!("Service was not ready: {}", e.into()),
367 )
368 })?;
369 let codec = tonic::codec::ProstCodec::default();
370 let path = http::uri::PathAndQuery::from_static(
371 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/ReplaceConnector",
372 );
373 let mut req = request.into_request();
374 req.extensions_mut()
375 .insert(
376 GrpcMethod::new(
377 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
378 "ReplaceConnector",
379 ),
380 );
381 self.inner.unary(req, path, codec).await
382 }
383 pub async fn delete_connector(
384 &mut self,
385 request: impl tonic::IntoRequest<super::DeleteConnectorRequest>,
386 ) -> std::result::Result<
387 tonic::Response<super::DeleteConnectorResponse>,
388 tonic::Status,
389 > {
390 self.inner
391 .ready()
392 .await
393 .map_err(|e| {
394 tonic::Status::unknown(
395 format!("Service was not ready: {}", e.into()),
396 )
397 })?;
398 let codec = tonic::codec::ProstCodec::default();
399 let path = http::uri::PathAndQuery::from_static(
400 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/DeleteConnector",
401 );
402 let mut req = request.into_request();
403 req.extensions_mut()
404 .insert(
405 GrpcMethod::new(
406 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
407 "DeleteConnector",
408 ),
409 );
410 self.inner.unary(req, path, codec).await
411 }
412 pub async fn get_connector(
413 &mut self,
414 request: impl tonic::IntoRequest<super::GetConnectorRequest>,
415 ) -> std::result::Result<
416 tonic::Response<super::GetConnectorResponse>,
417 tonic::Status,
418 > {
419 self.inner
420 .ready()
421 .await
422 .map_err(|e| {
423 tonic::Status::unknown(
424 format!("Service was not ready: {}", e.into()),
425 )
426 })?;
427 let codec = tonic::codec::ProstCodec::default();
428 let path = http::uri::PathAndQuery::from_static(
429 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/GetConnector",
430 );
431 let mut req = request.into_request();
432 req.extensions_mut()
433 .insert(
434 GrpcMethod::new(
435 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
436 "GetConnector",
437 ),
438 );
439 self.inner.unary(req, path, codec).await
440 }
441 pub async fn list_connectors(
442 &mut self,
443 request: impl tonic::IntoRequest<super::ListConnectorsRequest>,
444 ) -> std::result::Result<
445 tonic::Response<super::ListConnectorsResponse>,
446 tonic::Status,
447 > {
448 self.inner
449 .ready()
450 .await
451 .map_err(|e| {
452 tonic::Status::unknown(
453 format!("Service was not ready: {}", e.into()),
454 )
455 })?;
456 let codec = tonic::codec::ProstCodec::default();
457 let path = http::uri::PathAndQuery::from_static(
458 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/ListConnectors",
459 );
460 let mut req = request.into_request();
461 req.extensions_mut()
462 .insert(
463 GrpcMethod::new(
464 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
465 "ListConnectors",
466 ),
467 );
468 self.inner.unary(req, path, codec).await
469 }
470 pub async fn batch_get_connectors(
471 &mut self,
472 request: impl tonic::IntoRequest<super::BatchGetConnectorsRequest>,
473 ) -> std::result::Result<
474 tonic::Response<super::BatchGetConnectorsResponse>,
475 tonic::Status,
476 > {
477 self.inner
478 .ready()
479 .await
480 .map_err(|e| {
481 tonic::Status::unknown(
482 format!("Service was not ready: {}", e.into()),
483 )
484 })?;
485 let codec = tonic::codec::ProstCodec::default();
486 let path = http::uri::PathAndQuery::from_static(
487 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/BatchGetConnectors",
488 );
489 let mut req = request.into_request();
490 req.extensions_mut()
491 .insert(
492 GrpcMethod::new(
493 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
494 "BatchGetConnectors",
495 ),
496 );
497 self.inner.unary(req, path, codec).await
498 }
499 pub async fn batch_get_connector_summaries(
500 &mut self,
501 request: impl tonic::IntoRequest<super::BatchGetConnectorSummariesRequest>,
502 ) -> std::result::Result<
503 tonic::Response<super::BatchGetConnectorSummariesResponse>,
504 tonic::Status,
505 > {
506 self.inner
507 .ready()
508 .await
509 .map_err(|e| {
510 tonic::Status::unknown(
511 format!("Service was not ready: {}", e.into()),
512 )
513 })?;
514 let codec = tonic::codec::ProstCodec::default();
515 let path = http::uri::PathAndQuery::from_static(
516 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/BatchGetConnectorSummaries",
517 );
518 let mut req = request.into_request();
519 req.extensions_mut()
520 .insert(
521 GrpcMethod::new(
522 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
523 "BatchGetConnectorSummaries",
524 ),
525 );
526 self.inner.unary(req, path, codec).await
527 }
528 pub async fn list_connector_summaries(
529 &mut self,
530 request: impl tonic::IntoRequest<super::ListConnectorSummariesRequest>,
531 ) -> std::result::Result<
532 tonic::Response<super::ListConnectorSummariesResponse>,
533 tonic::Status,
534 > {
535 self.inner
536 .ready()
537 .await
538 .map_err(|e| {
539 tonic::Status::unknown(
540 format!("Service was not ready: {}", e.into()),
541 )
542 })?;
543 let codec = tonic::codec::ProstCodec::default();
544 let path = http::uri::PathAndQuery::from_static(
545 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/ListConnectorSummaries",
546 );
547 let mut req = request.into_request();
548 req.extensions_mut()
549 .insert(
550 GrpcMethod::new(
551 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
552 "ListConnectorSummaries",
553 ),
554 );
555 self.inner.unary(req, path, codec).await
556 }
557 pub async fn get_connector_type_summaries(
558 &mut self,
559 request: impl tonic::IntoRequest<super::GetConnectorTypeSummariesRequest>,
560 ) -> std::result::Result<
561 tonic::Response<super::GetConnectorTypeSummariesResponse>,
562 tonic::Status,
563 > {
564 self.inner
565 .ready()
566 .await
567 .map_err(|e| {
568 tonic::Status::unknown(
569 format!("Service was not ready: {}", e.into()),
570 )
571 })?;
572 let codec = tonic::codec::ProstCodec::default();
573 let path = http::uri::PathAndQuery::from_static(
574 "/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/GetConnectorTypeSummaries",
575 );
576 let mut req = request.into_request();
577 req.extensions_mut()
578 .insert(
579 GrpcMethod::new(
580 "com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
581 "GetConnectorTypeSummaries",
582 ),
583 );
584 self.inner.unary(req, path, codec).await
585 }
586 }
587}