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