#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Connector {
#[prost(string, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub user_facing_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "super::super::ConnectorType", tag = "3")]
pub r#type: i32,
#[prost(uint32, optional, tag = "4")]
pub team_id: ::core::option::Option<u32>,
#[prost(string, tag = "5")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, repeated, tag = "9")]
pub connector_configs: ::prost::alloc::vec::Vec<ConnectorConfig>,
#[prost(string, tag = "10")]
pub entity_type: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectorConfig {
#[prost(string, tag = "1")]
pub output_schema_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub fields: ::prost::alloc::vec::Vec<super::super::ConnectorConfigField>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConnectorTypeSummary {
#[prost(enumeration = "super::super::ConnectorType", tag = "1")]
pub r#type: i32,
#[prost(uint32, tag = "2")]
pub count: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConnectorRequest {
#[prost(message, optional, tag = "1")]
pub connector: ::core::option::Option<Connector>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConnectorResponse {
#[prost(message, optional, tag = "1")]
pub connector: ::core::option::Option<Connector>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceConnectorRequest {
#[prost(message, optional, tag = "1")]
pub connector: ::core::option::Option<Connector>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceConnectorResponse {
#[prost(message, optional, tag = "1")]
pub connector: ::core::option::Option<Connector>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteConnectorRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteConnectorResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConnectorRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConnectorResponse {
#[prost(message, optional, tag = "1")]
pub connector: ::core::option::Option<Connector>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConnectorsRequest {
#[prost(enumeration = "super::super::ConnectorType", tag = "1")]
pub connector_type: i32,
#[prost(message, repeated, tag = "2")]
pub order_bys: ::prost::alloc::vec::Vec<super::super::OrderBy>,
#[prost(string, optional, tag = "3")]
pub entity_type: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConnectorsResponse {
#[prost(message, repeated, tag = "1")]
pub connectors: ::prost::alloc::vec::Vec<Connector>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetConnectorsRequest {
#[prost(string, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetConnectorsResponse {
#[prost(map = "string, message", tag = "1")]
pub connectors: ::std::collections::HashMap<
::prost::alloc::string::String,
Connector,
>,
#[prost(string, repeated, tag = "2")]
pub not_found_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetConnectorTypeSummariesRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConnectorTypeSummariesResponse {
#[prost(message, repeated, tag = "1")]
pub connector_type_summaries: ::prost::alloc::vec::Vec<ConnectorTypeSummary>,
}
pub mod connectors_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ConnectorsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ConnectorsServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ConnectorsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ConnectorsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ConnectorsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_connector(
&mut self,
request: impl tonic::IntoRequest<super::CreateConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::CreateConnectorResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/CreateConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
"CreateConnector",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn replace_connector(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceConnectorResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/ReplaceConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
"ReplaceConnector",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_connector(
&mut self,
request: impl tonic::IntoRequest<super::DeleteConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteConnectorResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/DeleteConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
"DeleteConnector",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_connector(
&mut self,
request: impl tonic::IntoRequest<super::GetConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::GetConnectorResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/GetConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
"GetConnector",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_connectors(
&mut self,
request: impl tonic::IntoRequest<super::ListConnectorsRequest>,
) -> std::result::Result<
tonic::Response<super::ListConnectorsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/ListConnectors",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
"ListConnectors",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_get_connectors(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetConnectorsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetConnectorsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/BatchGetConnectors",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
"BatchGetConnectors",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_connector_type_summaries(
&mut self,
request: impl tonic::IntoRequest<super::GetConnectorTypeSummariesRequest>,
) -> std::result::Result<
tonic::Response<super::GetConnectorTypeSummariesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.notification_center.connectors.v1.ConnectorsService/GetConnectorTypeSummaries",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.notification_center.connectors.v1.ConnectorsService",
"GetConnectorTypeSummaries",
),
);
self.inner.unary(req, path, codec).await
}
}
}