#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub is_hidden: ::core::option::Option<bool>,
#[prost(message, optional, tag = "5")]
pub is_private: ::core::option::Option<bool>,
#[prost(enumeration = "SourceType", tag = "6")]
pub source_type: i32,
#[prost(message, repeated, tag = "7")]
pub application_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "8")]
pub subsystem_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "9")]
pub created_by: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateActionRequest {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub is_private: ::core::option::Option<bool>,
#[prost(enumeration = "SourceType", tag = "4")]
pub source_type: i32,
#[prost(message, repeated, tag = "5")]
pub application_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub subsystem_names: ::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 CreateActionResponse {
#[prost(message, optional, tag = "1")]
pub action: ::core::option::Option<Action>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceActionRequest {
#[prost(message, optional, tag = "1")]
pub action: ::core::option::Option<Action>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceActionResponse {
#[prost(message, optional, tag = "1")]
pub action: ::core::option::Option<Action>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteActionRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteActionResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetActionRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetActionResponse {
#[prost(message, optional, tag = "1")]
pub action: ::core::option::Option<Action>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListActionsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListActionsResponse {
#[prost(message, repeated, tag = "1")]
pub actions: ::prost::alloc::vec::Vec<Action>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderActionsRequest {
#[prost(map = "string, message", tag = "1")]
pub private_actions_order: ::std::collections::HashMap<
::prost::alloc::string::String,
u32,
>,
#[prost(map = "string, message", tag = "2")]
pub shared_actions_order: ::std::collections::HashMap<
::prost::alloc::string::String,
u32,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OrderActionsResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionExecutionRequest {
#[prost(oneof = "action_execution_request::Request", tags = "1, 2, 3")]
pub request: ::core::option::Option<action_execution_request::Request>,
}
pub mod action_execution_request {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "1")]
Create(super::CreateActionRequest),
#[prost(message, tag = "2")]
Replace(super::ReplaceActionRequest),
#[prost(message, tag = "3")]
Delete(super::DeleteActionRequest),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionExecutionResponse {
#[prost(oneof = "action_execution_response::Response", tags = "1, 2, 3")]
pub response: ::core::option::Option<action_execution_response::Response>,
}
pub mod action_execution_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Create(super::CreateActionResponse),
#[prost(message, tag = "2")]
Replace(super::ReplaceActionResponse),
#[prost(message, tag = "3")]
Delete(super::DeleteActionResponse),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AtomicBatchExecuteActionsRequest {
#[prost(message, repeated, tag = "1")]
pub requests: ::prost::alloc::vec::Vec<ActionExecutionRequest>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AtomicBatchExecuteActionsResponse {
#[prost(message, repeated, tag = "1")]
pub matching_responses: ::prost::alloc::vec::Vec<ActionExecutionResponse>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SourceType {
Unspecified = 0,
Log = 1,
DataMap = 2,
}
impl SourceType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOURCE_TYPE_UNSPECIFIED",
Self::Log => "SOURCE_TYPE_LOG",
Self::DataMap => "SOURCE_TYPE_DATA_MAP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SOURCE_TYPE_LOG" => Some(Self::Log),
"SOURCE_TYPE_DATA_MAP" => Some(Self::DataMap),
_ => None,
}
}
}
pub mod actions_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 ActionsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ActionsServiceClient<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> ActionsServiceClient<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,
) -> ActionsServiceClient<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,
{
ActionsServiceClient::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_action(
&mut self,
request: impl tonic::IntoRequest<super::CreateActionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateActionResponse>,
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.actions.v2.ActionsService/CreateAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.actions.v2.ActionsService",
"CreateAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn replace_action(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceActionRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceActionResponse>,
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.actions.v2.ActionsService/ReplaceAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.actions.v2.ActionsService",
"ReplaceAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_action(
&mut self,
request: impl tonic::IntoRequest<super::DeleteActionRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteActionResponse>,
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.actions.v2.ActionsService/DeleteAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.actions.v2.ActionsService",
"DeleteAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_action(
&mut self,
request: impl tonic::IntoRequest<super::GetActionRequest>,
) -> std::result::Result<
tonic::Response<super::GetActionResponse>,
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.actions.v2.ActionsService/GetAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.actions.v2.ActionsService",
"GetAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_actions(
&mut self,
request: impl tonic::IntoRequest<super::ListActionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListActionsResponse>,
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.actions.v2.ActionsService/ListActions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.actions.v2.ActionsService",
"ListActions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn order_actions(
&mut self,
request: impl tonic::IntoRequest<super::OrderActionsRequest>,
) -> std::result::Result<
tonic::Response<super::OrderActionsResponse>,
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.actions.v2.ActionsService/OrderActions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.actions.v2.ActionsService",
"OrderActions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn atomic_batch_execute_actions(
&mut self,
request: impl tonic::IntoRequest<super::AtomicBatchExecuteActionsRequest>,
) -> std::result::Result<
tonic::Response<super::AtomicBatchExecuteActionsResponse>,
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.actions.v2.ActionsService/AtomicBatchExecuteActions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.actions.v2.ActionsService",
"AtomicBatchExecuteActions",
),
);
self.inner.unary(req, path, codec).await
}
}
}