1#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Action {
6 #[prost(message, optional, tag = "1")]
7 pub id: ::core::option::Option<::prost::alloc::string::String>,
8 #[prost(message, optional, tag = "2")]
9 pub name: ::core::option::Option<::prost::alloc::string::String>,
10 #[prost(message, optional, tag = "3")]
11 pub url: ::core::option::Option<::prost::alloc::string::String>,
12 #[prost(message, optional, tag = "4")]
13 pub is_hidden: ::core::option::Option<bool>,
14 #[prost(message, optional, tag = "5")]
15 pub is_private: ::core::option::Option<bool>,
16 #[prost(enumeration = "SourceType", tag = "6")]
17 pub source_type: i32,
18 #[prost(message, repeated, tag = "7")]
19 pub application_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
20 #[prost(message, repeated, tag = "8")]
21 pub subsystem_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
22 #[prost(message, optional, tag = "9")]
23 pub created_by: ::core::option::Option<::prost::alloc::string::String>,
24}
25#[derive(serde::Serialize, serde::Deserialize)]
26#[serde(rename_all = "snake_case")]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct CreateActionRequest {
29 #[prost(message, optional, tag = "1")]
30 pub name: ::core::option::Option<::prost::alloc::string::String>,
31 #[prost(message, optional, tag = "2")]
32 pub url: ::core::option::Option<::prost::alloc::string::String>,
33 #[prost(message, optional, tag = "3")]
34 pub is_private: ::core::option::Option<bool>,
35 #[prost(enumeration = "SourceType", tag = "4")]
36 pub source_type: i32,
37 #[prost(message, repeated, tag = "5")]
38 pub application_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
39 #[prost(message, repeated, tag = "6")]
40 pub subsystem_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
41}
42#[derive(serde::Serialize, serde::Deserialize)]
43#[serde(rename_all = "snake_case")]
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct CreateActionResponse {
46 #[prost(message, optional, tag = "1")]
47 pub action: ::core::option::Option<Action>,
48}
49#[derive(serde::Serialize, serde::Deserialize)]
50#[serde(rename_all = "snake_case")]
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct ReplaceActionRequest {
53 #[prost(message, optional, tag = "1")]
54 pub action: ::core::option::Option<Action>,
55}
56#[derive(serde::Serialize, serde::Deserialize)]
57#[serde(rename_all = "snake_case")]
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct ReplaceActionResponse {
60 #[prost(message, optional, tag = "1")]
61 pub action: ::core::option::Option<Action>,
62}
63#[derive(serde::Serialize, serde::Deserialize)]
64#[serde(rename_all = "snake_case")]
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct DeleteActionRequest {
67 #[prost(message, optional, tag = "1")]
68 pub id: ::core::option::Option<::prost::alloc::string::String>,
69}
70#[derive(serde::Serialize, serde::Deserialize)]
71#[serde(rename_all = "snake_case")]
72#[derive(Clone, Copy, PartialEq, ::prost::Message)]
73pub struct DeleteActionResponse {}
74#[derive(serde::Serialize, serde::Deserialize)]
75#[serde(rename_all = "snake_case")]
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct GetActionRequest {
78 #[prost(message, optional, tag = "1")]
79 pub id: ::core::option::Option<::prost::alloc::string::String>,
80}
81#[derive(serde::Serialize, serde::Deserialize)]
82#[serde(rename_all = "snake_case")]
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct GetActionResponse {
85 #[prost(message, optional, tag = "1")]
86 pub action: ::core::option::Option<Action>,
87}
88#[derive(serde::Serialize, serde::Deserialize)]
89#[serde(rename_all = "snake_case")]
90#[derive(Clone, Copy, PartialEq, ::prost::Message)]
91pub struct ListActionsRequest {}
92#[derive(serde::Serialize, serde::Deserialize)]
93#[serde(rename_all = "snake_case")]
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct ListActionsResponse {
96 #[prost(message, repeated, tag = "1")]
97 pub actions: ::prost::alloc::vec::Vec<Action>,
98}
99#[derive(serde::Serialize, serde::Deserialize)]
100#[serde(rename_all = "snake_case")]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct OrderActionsRequest {
103 #[prost(map = "string, message", tag = "1")]
104 pub private_actions_order: ::std::collections::HashMap<
105 ::prost::alloc::string::String,
106 u32,
107 >,
108 #[prost(map = "string, message", tag = "2")]
109 pub shared_actions_order: ::std::collections::HashMap<
110 ::prost::alloc::string::String,
111 u32,
112 >,
113}
114#[derive(serde::Serialize, serde::Deserialize)]
115#[serde(rename_all = "snake_case")]
116#[derive(Clone, Copy, PartialEq, ::prost::Message)]
117pub struct OrderActionsResponse {}
118#[derive(serde::Serialize, serde::Deserialize)]
119#[serde(rename_all = "snake_case")]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct ActionExecutionRequest {
122 #[prost(oneof = "action_execution_request::Request", tags = "1, 2, 3")]
123 pub request: ::core::option::Option<action_execution_request::Request>,
124}
125pub mod action_execution_request {
127 #[derive(serde::Serialize, serde::Deserialize)]
128 #[serde(rename_all = "snake_case")]
129 #[derive(Clone, PartialEq, ::prost::Oneof)]
130 pub enum Request {
131 #[prost(message, tag = "1")]
132 Create(super::CreateActionRequest),
133 #[prost(message, tag = "2")]
134 Replace(super::ReplaceActionRequest),
135 #[prost(message, tag = "3")]
136 Delete(super::DeleteActionRequest),
137 }
138}
139#[derive(serde::Serialize, serde::Deserialize)]
140#[serde(rename_all = "snake_case")]
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct ActionExecutionResponse {
143 #[prost(oneof = "action_execution_response::Response", tags = "1, 2, 3")]
144 pub response: ::core::option::Option<action_execution_response::Response>,
145}
146pub mod action_execution_response {
148 #[derive(serde::Serialize, serde::Deserialize)]
149 #[serde(rename_all = "snake_case")]
150 #[derive(Clone, PartialEq, ::prost::Oneof)]
151 pub enum Response {
152 #[prost(message, tag = "1")]
153 Create(super::CreateActionResponse),
154 #[prost(message, tag = "2")]
155 Replace(super::ReplaceActionResponse),
156 #[prost(message, tag = "3")]
157 Delete(super::DeleteActionResponse),
158 }
159}
160#[derive(serde::Serialize, serde::Deserialize)]
161#[serde(rename_all = "snake_case")]
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct AtomicBatchExecuteActionsRequest {
164 #[prost(message, repeated, tag = "1")]
165 pub requests: ::prost::alloc::vec::Vec<ActionExecutionRequest>,
166}
167#[derive(serde::Serialize, serde::Deserialize)]
168#[serde(rename_all = "snake_case")]
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct AtomicBatchExecuteActionsResponse {
171 #[prost(message, repeated, tag = "1")]
172 pub matching_responses: ::prost::alloc::vec::Vec<ActionExecutionResponse>,
173}
174#[derive(serde::Serialize, serde::Deserialize)]
175#[serde(rename_all = "snake_case")]
176#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
177#[repr(i32)]
178pub enum SourceType {
179 Unspecified = 0,
180 Log = 1,
181 DataMap = 2,
182}
183impl SourceType {
184 pub fn as_str_name(&self) -> &'static str {
189 match self {
190 Self::Unspecified => "SOURCE_TYPE_UNSPECIFIED",
191 Self::Log => "SOURCE_TYPE_LOG",
192 Self::DataMap => "SOURCE_TYPE_DATA_MAP",
193 }
194 }
195 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
197 match value {
198 "SOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
199 "SOURCE_TYPE_LOG" => Some(Self::Log),
200 "SOURCE_TYPE_DATA_MAP" => Some(Self::DataMap),
201 _ => None,
202 }
203 }
204}
205pub mod actions_service_client {
207 #![allow(
208 unused_variables,
209 dead_code,
210 missing_docs,
211 clippy::wildcard_imports,
212 clippy::let_unit_value,
213 )]
214 use tonic::codegen::*;
215 use tonic::codegen::http::Uri;
216 #[derive(Debug, Clone)]
217 pub struct ActionsServiceClient<T> {
218 inner: tonic::client::Grpc<T>,
219 }
220 impl ActionsServiceClient<tonic::transport::Channel> {
221 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
223 where
224 D: TryInto<tonic::transport::Endpoint>,
225 D::Error: Into<StdError>,
226 {
227 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
228 Ok(Self::new(conn))
229 }
230 }
231 impl<T> ActionsServiceClient<T>
232 where
233 T: tonic::client::GrpcService<tonic::body::BoxBody>,
234 T::Error: Into<StdError>,
235 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
236 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
237 {
238 pub fn new(inner: T) -> Self {
239 let inner = tonic::client::Grpc::new(inner);
240 Self { inner }
241 }
242 pub fn with_origin(inner: T, origin: Uri) -> Self {
243 let inner = tonic::client::Grpc::with_origin(inner, origin);
244 Self { inner }
245 }
246 pub fn with_interceptor<F>(
247 inner: T,
248 interceptor: F,
249 ) -> ActionsServiceClient<InterceptedService<T, F>>
250 where
251 F: tonic::service::Interceptor,
252 T::ResponseBody: Default,
253 T: tonic::codegen::Service<
254 http::Request<tonic::body::BoxBody>,
255 Response = http::Response<
256 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
257 >,
258 >,
259 <T as tonic::codegen::Service<
260 http::Request<tonic::body::BoxBody>,
261 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
262 {
263 ActionsServiceClient::new(InterceptedService::new(inner, interceptor))
264 }
265 #[must_use]
270 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
271 self.inner = self.inner.send_compressed(encoding);
272 self
273 }
274 #[must_use]
276 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
277 self.inner = self.inner.accept_compressed(encoding);
278 self
279 }
280 #[must_use]
284 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
285 self.inner = self.inner.max_decoding_message_size(limit);
286 self
287 }
288 #[must_use]
292 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
293 self.inner = self.inner.max_encoding_message_size(limit);
294 self
295 }
296 pub async fn create_action(
297 &mut self,
298 request: impl tonic::IntoRequest<super::CreateActionRequest>,
299 ) -> std::result::Result<
300 tonic::Response<super::CreateActionResponse>,
301 tonic::Status,
302 > {
303 self.inner
304 .ready()
305 .await
306 .map_err(|e| {
307 tonic::Status::unknown(
308 format!("Service was not ready: {}", e.into()),
309 )
310 })?;
311 let codec = tonic::codec::ProstCodec::default();
312 let path = http::uri::PathAndQuery::from_static(
313 "/com.coralogixapis.actions.v2.ActionsService/CreateAction",
314 );
315 let mut req = request.into_request();
316 req.extensions_mut()
317 .insert(
318 GrpcMethod::new(
319 "com.coralogixapis.actions.v2.ActionsService",
320 "CreateAction",
321 ),
322 );
323 self.inner.unary(req, path, codec).await
324 }
325 pub async fn replace_action(
326 &mut self,
327 request: impl tonic::IntoRequest<super::ReplaceActionRequest>,
328 ) -> std::result::Result<
329 tonic::Response<super::ReplaceActionResponse>,
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.actions.v2.ActionsService/ReplaceAction",
343 );
344 let mut req = request.into_request();
345 req.extensions_mut()
346 .insert(
347 GrpcMethod::new(
348 "com.coralogixapis.actions.v2.ActionsService",
349 "ReplaceAction",
350 ),
351 );
352 self.inner.unary(req, path, codec).await
353 }
354 pub async fn delete_action(
355 &mut self,
356 request: impl tonic::IntoRequest<super::DeleteActionRequest>,
357 ) -> std::result::Result<
358 tonic::Response<super::DeleteActionResponse>,
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.actions.v2.ActionsService/DeleteAction",
372 );
373 let mut req = request.into_request();
374 req.extensions_mut()
375 .insert(
376 GrpcMethod::new(
377 "com.coralogixapis.actions.v2.ActionsService",
378 "DeleteAction",
379 ),
380 );
381 self.inner.unary(req, path, codec).await
382 }
383 pub async fn get_action(
384 &mut self,
385 request: impl tonic::IntoRequest<super::GetActionRequest>,
386 ) -> std::result::Result<
387 tonic::Response<super::GetActionResponse>,
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.actions.v2.ActionsService/GetAction",
401 );
402 let mut req = request.into_request();
403 req.extensions_mut()
404 .insert(
405 GrpcMethod::new(
406 "com.coralogixapis.actions.v2.ActionsService",
407 "GetAction",
408 ),
409 );
410 self.inner.unary(req, path, codec).await
411 }
412 pub async fn list_actions(
413 &mut self,
414 request: impl tonic::IntoRequest<super::ListActionsRequest>,
415 ) -> std::result::Result<
416 tonic::Response<super::ListActionsResponse>,
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.actions.v2.ActionsService/ListActions",
430 );
431 let mut req = request.into_request();
432 req.extensions_mut()
433 .insert(
434 GrpcMethod::new(
435 "com.coralogixapis.actions.v2.ActionsService",
436 "ListActions",
437 ),
438 );
439 self.inner.unary(req, path, codec).await
440 }
441 pub async fn order_actions(
442 &mut self,
443 request: impl tonic::IntoRequest<super::OrderActionsRequest>,
444 ) -> std::result::Result<
445 tonic::Response<super::OrderActionsResponse>,
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.actions.v2.ActionsService/OrderActions",
459 );
460 let mut req = request.into_request();
461 req.extensions_mut()
462 .insert(
463 GrpcMethod::new(
464 "com.coralogixapis.actions.v2.ActionsService",
465 "OrderActions",
466 ),
467 );
468 self.inner.unary(req, path, codec).await
469 }
470 pub async fn atomic_batch_execute_actions(
471 &mut self,
472 request: impl tonic::IntoRequest<super::AtomicBatchExecuteActionsRequest>,
473 ) -> std::result::Result<
474 tonic::Response<super::AtomicBatchExecuteActionsResponse>,
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.actions.v2.ActionsService/AtomicBatchExecuteActions",
488 );
489 let mut req = request.into_request();
490 req.extensions_mut()
491 .insert(
492 GrpcMethod::new(
493 "com.coralogixapis.actions.v2.ActionsService",
494 "AtomicBatchExecuteActions",
495 ),
496 );
497 self.inner.unary(req, path, codec).await
498 }
499 }
500}