cx_api/generated/
com.coralogixapis.notification_center.notifications.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 NotificationTarget {
6    #[prost(oneof = "notification_target::Target", tags = "1, 2")]
7    pub target: ::core::option::Option<notification_target::Target>,
8}
9/// Nested message and enum types in `NotificationTarget`.
10pub mod notification_target {
11    #[derive(serde::Serialize, serde::Deserialize)]
12    #[serde(rename_all = "snake_case")]
13    #[derive(Clone, PartialEq, ::prost::Message)]
14    pub struct GlobalRouterConfig {
15        #[deprecated]
16        #[prost(message, optional, tag = "1")]
17        pub deprecated_identifier: ::core::option::Option<
18            super::super::super::routing::GlobalRouterIdentifier,
19        >,
20        #[deprecated]
21        #[prost(message, optional, tag = "2")]
22        pub identifier: ::core::option::Option<
23            super::super::super::GlobalRouterIdentifier,
24        >,
25        #[prost(string, tag = "3")]
26        pub id: ::prost::alloc::string::String,
27    }
28    #[derive(serde::Serialize, serde::Deserialize)]
29    #[serde(rename_all = "snake_case")]
30    #[derive(Clone, PartialEq, ::prost::Message)]
31    pub struct PrivateRouterConfig {
32        #[prost(string, tag = "1")]
33        pub router_key: ::prost::alloc::string::String,
34    }
35    #[derive(serde::Serialize, serde::Deserialize)]
36    #[serde(rename_all = "snake_case")]
37    #[derive(Clone, PartialEq, ::prost::Oneof)]
38    pub enum Target {
39        #[prost(message, tag = "1")]
40        Private(PrivateRouterConfig),
41        #[prost(message, tag = "2")]
42        Global(GlobalRouterConfig),
43    }
44}
45#[derive(serde::Serialize, serde::Deserialize)]
46#[serde(rename_all = "snake_case")]
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct NotificationOperation {
49    #[prost(string, tag = "1")]
50    pub key: ::prost::alloc::string::String,
51    #[prost(string, tag = "2")]
52    pub display_name: ::prost::alloc::string::String,
53    #[prost(oneof = "notification_operation::OperationType", tags = "100")]
54    pub operation_type: ::core::option::Option<notification_operation::OperationType>,
55}
56/// Nested message and enum types in `NotificationOperation`.
57pub mod notification_operation {
58    #[derive(serde::Serialize, serde::Deserialize)]
59    #[serde(rename_all = "snake_case")]
60    #[derive(Clone, PartialEq, ::prost::Message)]
61    pub struct HttpOperation {
62        #[prost(string, tag = "1")]
63        pub url: ::prost::alloc::string::String,
64        #[prost(string, tag = "2")]
65        pub method: ::prost::alloc::string::String,
66        #[prost(map = "string, string", tag = "3")]
67        pub headers: ::std::collections::HashMap<
68            ::prost::alloc::string::String,
69            ::prost::alloc::string::String,
70        >,
71    }
72    #[derive(serde::Serialize, serde::Deserialize)]
73    #[serde(rename_all = "snake_case")]
74    #[derive(Clone, PartialEq, ::prost::Oneof)]
75    pub enum OperationType {
76        #[prost(message, tag = "100")]
77        Http(HttpOperation),
78    }
79}
80#[derive(serde::Serialize, serde::Deserialize)]
81#[serde(rename_all = "snake_case")]
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct NotificationAttachment {
84    #[prost(string, tag = "1")]
85    pub key: ::prost::alloc::string::String,
86    #[prost(string, tag = "2")]
87    pub display_name: ::prost::alloc::string::String,
88    #[prost(string, tag = "3")]
89    pub content_type: ::prost::alloc::string::String,
90    #[prost(oneof = "notification_attachment::Content", tags = "100, 101")]
91    pub content: ::core::option::Option<notification_attachment::Content>,
92}
93/// Nested message and enum types in `NotificationAttachment`.
94pub mod notification_attachment {
95    #[derive(serde::Serialize, serde::Deserialize)]
96    #[serde(rename_all = "snake_case")]
97    #[derive(Clone, PartialEq, ::prost::Message)]
98    pub struct Raw {
99        #[prost(bytes = "vec", tag = "1")]
100        pub bytes: ::prost::alloc::vec::Vec<u8>,
101    }
102    #[derive(serde::Serialize, serde::Deserialize)]
103    #[serde(rename_all = "snake_case")]
104    #[derive(Clone, PartialEq, ::prost::Message)]
105    pub struct Url {
106        #[prost(string, tag = "1")]
107        pub url: ::prost::alloc::string::String,
108        #[prost(uint32, tag = "2")]
109        pub content_length: u32,
110    }
111    #[derive(serde::Serialize, serde::Deserialize)]
112    #[serde(rename_all = "snake_case")]
113    #[derive(Clone, PartialEq, ::prost::Oneof)]
114    pub enum Content {
115        #[prost(message, tag = "100")]
116        Raw(Raw),
117        #[prost(message, tag = "101")]
118        Url(Url),
119    }
120}
121#[derive(serde::Serialize, serde::Deserialize)]
122#[serde(rename_all = "snake_case")]
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct Trigger {
125    /// client id is a user-defined string identifying the use case (e.g., "alert-notification-sender")
126    #[prost(string, tag = "1")]
127    pub client_id: ::prost::alloc::string::String,
128    #[prost(string, tag = "2")]
129    pub cx_service_name: ::prost::alloc::string::String,
130    #[prost(oneof = "trigger::TriggerDetail", tags = "100, 101")]
131    pub trigger_detail: ::core::option::Option<trigger::TriggerDetail>,
132}
133/// Nested message and enum types in `Trigger`.
134pub mod trigger {
135    #[derive(serde::Serialize, serde::Deserialize)]
136    #[serde(rename_all = "snake_case")]
137    #[derive(Clone, PartialEq, ::prost::Message)]
138    pub struct ManualTrigger {
139        #[prost(string, tag = "1")]
140        pub user_email: ::prost::alloc::string::String,
141    }
142    #[derive(serde::Serialize, serde::Deserialize)]
143    #[serde(rename_all = "snake_case")]
144    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
145    pub struct AutomaticTrigger {}
146    #[derive(serde::Serialize, serde::Deserialize)]
147    #[serde(rename_all = "snake_case")]
148    #[derive(Clone, PartialEq, ::prost::Oneof)]
149    pub enum TriggerDetail {
150        #[prost(message, tag = "100")]
151        ManualTrigger(ManualTrigger),
152        #[prost(message, tag = "101")]
153        AutomaticTrigger(AutomaticTrigger),
154    }
155}
156#[derive(serde::Serialize, serde::Deserialize)]
157#[serde(rename_all = "snake_case")]
158#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
159#[repr(i32)]
160pub enum TriggerType {
161    Unspecified = 0,
162    Manual = 1,
163    Automatic = 2,
164}
165impl TriggerType {
166    /// String value of the enum field names used in the ProtoBuf definition.
167    ///
168    /// The values are not transformed in any way and thus are considered stable
169    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
170    pub fn as_str_name(&self) -> &'static str {
171        match self {
172            Self::Unspecified => "TRIGGER_TYPE_UNSPECIFIED",
173            Self::Manual => "MANUAL",
174            Self::Automatic => "AUTOMATIC",
175        }
176    }
177    /// Creates an enum from field names used in the ProtoBuf definition.
178    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
179        match value {
180            "TRIGGER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
181            "MANUAL" => Some(Self::Manual),
182            "AUTOMATIC" => Some(Self::Automatic),
183            _ => None,
184        }
185    }
186}
187#[derive(serde::Serialize, serde::Deserialize)]
188#[serde(rename_all = "snake_case")]
189#[derive(Clone, PartialEq, ::prost::Message)]
190pub struct TestResult {
191    #[prost(oneof = "test_result::Result", tags = "1, 2")]
192    pub result: ::core::option::Option<test_result::Result>,
193}
194/// Nested message and enum types in `TestResult`.
195pub mod test_result {
196    #[derive(serde::Serialize, serde::Deserialize)]
197    #[serde(rename_all = "snake_case")]
198    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
199    pub struct Success {}
200    #[derive(serde::Serialize, serde::Deserialize)]
201    #[serde(rename_all = "snake_case")]
202    #[derive(Clone, PartialEq, ::prost::Message)]
203    pub struct Failure {
204        #[prost(string, tag = "1")]
205        pub message: ::prost::alloc::string::String,
206        #[prost(uint32, optional, tag = "2")]
207        pub status_code: ::core::option::Option<u32>,
208    }
209    #[derive(serde::Serialize, serde::Deserialize)]
210    #[serde(rename_all = "snake_case")]
211    #[derive(Clone, PartialEq, ::prost::Oneof)]
212    pub enum Result {
213        #[prost(message, tag = "1")]
214        Success(Success),
215        #[prost(message, tag = "2")]
216        Failure(Failure),
217    }
218}
219#[derive(serde::Serialize, serde::Deserialize)]
220#[serde(rename_all = "snake_case")]
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct TestNotification {
223    #[prost(string, tag = "1")]
224    pub id: ::prost::alloc::string::String,
225    #[prost(uint32, tag = "2")]
226    pub team_id: u32,
227    #[prost(string, tag = "3")]
228    pub connector_id: ::prost::alloc::string::String,
229    #[prost(string, tag = "4")]
230    pub output_schema_id: ::prost::alloc::string::String,
231    #[prost(message, repeated, tag = "6")]
232    pub connector_config: ::prost::alloc::vec::Vec<super::super::ConnectorConfigField>,
233    #[prost(message, repeated, tag = "7")]
234    pub message_config: ::prost::alloc::vec::Vec<super::super::MessageConfigField>,
235    #[prost(message, repeated, tag = "8")]
236    pub available_operations: ::prost::alloc::vec::Vec<NotificationOperation>,
237    #[prost(message, repeated, tag = "9")]
238    pub attachments: ::prost::alloc::vec::Vec<NotificationAttachment>,
239}
240#[derive(serde::Serialize, serde::Deserialize)]
241#[serde(rename_all = "snake_case")]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct TestConnectorConfigRequest {
244    #[prost(enumeration = "super::super::ConnectorType", tag = "1")]
245    pub r#type: i32,
246    #[prost(string, tag = "2")]
247    pub output_schema_id: ::prost::alloc::string::String,
248    #[prost(message, repeated, tag = "3")]
249    pub fields: ::prost::alloc::vec::Vec<super::super::ConnectorConfigField>,
250    #[deprecated]
251    #[prost(string, optional, tag = "4")]
252    pub deprecated_entity_type: ::core::option::Option<::prost::alloc::string::String>,
253    #[prost(enumeration = "super::super::EntityType", optional, tag = "5")]
254    pub entity_type: ::core::option::Option<i32>,
255}
256#[derive(serde::Serialize, serde::Deserialize)]
257#[serde(rename_all = "snake_case")]
258#[derive(Clone, PartialEq, ::prost::Message)]
259pub struct TestConnectorConfigResponse {
260    #[prost(message, optional, tag = "1")]
261    pub result: ::core::option::Option<TestResult>,
262}
263#[derive(serde::Serialize, serde::Deserialize)]
264#[serde(rename_all = "snake_case")]
265#[derive(Clone, PartialEq, ::prost::Message)]
266pub struct TestExistingConnectorRequest {
267    #[deprecated]
268    #[prost(string, tag = "1")]
269    pub deprecated_connector_id: ::prost::alloc::string::String,
270    #[prost(string, tag = "2")]
271    pub output_schema_id: ::prost::alloc::string::String,
272    #[deprecated]
273    #[prost(message, optional, tag = "3")]
274    pub connector_identifier: ::core::option::Option<super::super::ConnectorIdentifier>,
275    #[prost(string, tag = "4")]
276    pub connector_id: ::prost::alloc::string::String,
277}
278#[derive(serde::Serialize, serde::Deserialize)]
279#[serde(rename_all = "snake_case")]
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct TestExistingConnectorResponse {
282    #[prost(message, optional, tag = "1")]
283    pub result: ::core::option::Option<TestResult>,
284}
285#[derive(serde::Serialize, serde::Deserialize)]
286#[serde(rename_all = "snake_case")]
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct TestPresetConfigRequest {
289    #[deprecated]
290    #[prost(string, tag = "1")]
291    pub deprecated_entity_type: ::prost::alloc::string::String,
292    #[prost(string, optional, tag = "2")]
293    pub entity_sub_type: ::core::option::Option<::prost::alloc::string::String>,
294    #[deprecated]
295    #[prost(string, tag = "3")]
296    pub deprecated_connector_id: ::prost::alloc::string::String,
297    #[deprecated]
298    #[prost(string, tag = "6")]
299    pub deprecated_preset_id: ::prost::alloc::string::String,
300    #[prost(message, repeated, tag = "7")]
301    pub config_overrides: ::prost::alloc::vec::Vec<super::super::ConfigOverrides>,
302    #[deprecated]
303    #[prost(message, optional, tag = "8")]
304    pub connector_identifier: ::core::option::Option<super::super::ConnectorIdentifier>,
305    #[deprecated]
306    #[prost(message, optional, tag = "9")]
307    pub preset_identifier: ::core::option::Option<super::super::PresetIdentifier>,
308    #[prost(enumeration = "super::super::EntityType", tag = "10")]
309    pub entity_type: i32,
310    #[prost(string, tag = "11")]
311    pub connector_id: ::prost::alloc::string::String,
312    #[prost(string, tag = "12")]
313    pub parent_preset_id: ::prost::alloc::string::String,
314}
315#[derive(serde::Serialize, serde::Deserialize)]
316#[serde(rename_all = "snake_case")]
317#[derive(Clone, PartialEq, ::prost::Message)]
318pub struct TestPresetConfigResponse {
319    #[prost(message, optional, tag = "1")]
320    pub result: ::core::option::Option<TestResult>,
321}
322#[derive(serde::Serialize, serde::Deserialize)]
323#[serde(rename_all = "snake_case")]
324#[derive(Clone, PartialEq, ::prost::Message)]
325pub struct TestExistingPresetRequest {
326    #[deprecated]
327    #[prost(string, tag = "1")]
328    pub deprecated_entity_type: ::prost::alloc::string::String,
329    #[prost(string, optional, tag = "2")]
330    pub entity_sub_type: ::core::option::Option<::prost::alloc::string::String>,
331    #[deprecated]
332    #[prost(string, tag = "3")]
333    pub deprecated_preset_id: ::prost::alloc::string::String,
334    #[deprecated]
335    #[prost(string, tag = "4")]
336    pub deprecated_connector_id: ::prost::alloc::string::String,
337    #[deprecated]
338    #[prost(message, optional, tag = "5")]
339    pub connector_identifier: ::core::option::Option<super::super::ConnectorIdentifier>,
340    #[deprecated]
341    #[prost(message, optional, tag = "6")]
342    pub preset_identifier: ::core::option::Option<super::super::PresetIdentifier>,
343    #[prost(enumeration = "super::super::EntityType", tag = "7")]
344    pub entity_type: i32,
345    #[prost(string, tag = "8")]
346    pub connector_id: ::prost::alloc::string::String,
347    #[prost(string, tag = "9")]
348    pub preset_id: ::prost::alloc::string::String,
349}
350#[derive(serde::Serialize, serde::Deserialize)]
351#[serde(rename_all = "snake_case")]
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct TestExistingPresetResponse {
354    #[prost(message, optional, tag = "1")]
355    pub result: ::core::option::Option<TestResult>,
356}
357#[derive(serde::Serialize, serde::Deserialize)]
358#[serde(rename_all = "snake_case")]
359#[derive(Clone, PartialEq, ::prost::Message)]
360pub struct TestDestinationRequest {
361    #[deprecated]
362    #[prost(string, tag = "1")]
363    pub deprecated_entity_type: ::prost::alloc::string::String,
364    #[prost(string, optional, tag = "2")]
365    pub entity_sub_type: ::core::option::Option<::prost::alloc::string::String>,
366    #[deprecated]
367    #[prost(string, tag = "3")]
368    pub deprecated_connector_id: ::prost::alloc::string::String,
369    #[deprecated]
370    #[prost(string, tag = "4")]
371    pub deprecated_preset_id: ::prost::alloc::string::String,
372    #[prost(string, tag = "5")]
373    pub output_schema_id: ::prost::alloc::string::String,
374    #[prost(message, repeated, tag = "7")]
375    pub message_config_fields: ::prost::alloc::vec::Vec<
376        super::super::MessageConfigField,
377    >,
378    #[deprecated]
379    #[prost(message, optional, tag = "8")]
380    pub connector_identifier: ::core::option::Option<super::super::ConnectorIdentifier>,
381    #[deprecated]
382    #[prost(message, optional, tag = "9")]
383    pub preset_identifier: ::core::option::Option<super::super::PresetIdentifier>,
384    #[prost(enumeration = "super::super::EntityType", tag = "10")]
385    pub entity_type: i32,
386    #[prost(message, repeated, tag = "11")]
387    pub connector_config_fields: ::prost::alloc::vec::Vec<
388        super::super::TemplatedConnectorConfigField,
389    >,
390    #[prost(string, tag = "12")]
391    pub connector_id: ::prost::alloc::string::String,
392    #[prost(string, tag = "13")]
393    pub preset_id: ::prost::alloc::string::String,
394}
395#[derive(serde::Serialize, serde::Deserialize)]
396#[serde(rename_all = "snake_case")]
397#[derive(Clone, PartialEq, ::prost::Message)]
398pub struct TestDestinationResponse {
399    #[prost(message, optional, tag = "1")]
400    pub result: ::core::option::Option<TestResult>,
401}
402#[derive(serde::Serialize, serde::Deserialize)]
403#[serde(rename_all = "snake_case")]
404#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct TestTemplateRenderRequest {
406    #[deprecated]
407    #[prost(string, tag = "1")]
408    pub deprecated_entity_type: ::prost::alloc::string::String,
409    #[prost(string, optional, tag = "2")]
410    pub entity_sub_type: ::core::option::Option<::prost::alloc::string::String>,
411    #[prost(string, tag = "3")]
412    pub template: ::prost::alloc::string::String,
413    #[prost(enumeration = "super::super::EntityType", tag = "4")]
414    pub entity_type: i32,
415}
416#[derive(serde::Serialize, serde::Deserialize)]
417#[serde(rename_all = "snake_case")]
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct TestTemplateRenderResult {
420    #[prost(oneof = "test_template_render_result::Result", tags = "1, 2")]
421    pub result: ::core::option::Option<test_template_render_result::Result>,
422}
423/// Nested message and enum types in `TestTemplateRenderResult`.
424pub mod test_template_render_result {
425    #[derive(serde::Serialize, serde::Deserialize)]
426    #[serde(rename_all = "snake_case")]
427    #[derive(Clone, PartialEq, ::prost::Message)]
428    pub struct Success {
429        #[prost(string, tag = "1")]
430        pub rendered_value: ::prost::alloc::string::String,
431    }
432    #[derive(serde::Serialize, serde::Deserialize)]
433    #[serde(rename_all = "snake_case")]
434    #[derive(Clone, PartialEq, ::prost::Message)]
435    pub struct Failure {
436        #[prost(string, tag = "1")]
437        pub message: ::prost::alloc::string::String,
438        #[prost(enumeration = "FailureReason", tag = "2")]
439        pub reason: i32,
440    }
441    #[derive(serde::Serialize, serde::Deserialize)]
442    #[serde(rename_all = "snake_case")]
443    #[derive(
444        Clone,
445        Copy,
446        Debug,
447        PartialEq,
448        Eq,
449        Hash,
450        PartialOrd,
451        Ord,
452        ::prost::Enumeration
453    )]
454    #[repr(i32)]
455    pub enum FailureReason {
456        Unspecified = 0,
457        InvalidTemplate = 1,
458        FieldNotFound = 2,
459        TemplateExceedsMaxLength = 3,
460        RenderedValueExceedsMaxLength = 4,
461    }
462    impl FailureReason {
463        /// String value of the enum field names used in the ProtoBuf definition.
464        ///
465        /// The values are not transformed in any way and thus are considered stable
466        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
467        pub fn as_str_name(&self) -> &'static str {
468            match self {
469                Self::Unspecified => "FAILURE_REASON_UNSPECIFIED",
470                Self::InvalidTemplate => "INVALID_TEMPLATE",
471                Self::FieldNotFound => "FIELD_NOT_FOUND",
472                Self::TemplateExceedsMaxLength => "TEMPLATE_EXCEEDS_MAX_LENGTH",
473                Self::RenderedValueExceedsMaxLength => {
474                    "RENDERED_VALUE_EXCEEDS_MAX_LENGTH"
475                }
476            }
477        }
478        /// Creates an enum from field names used in the ProtoBuf definition.
479        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
480            match value {
481                "FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
482                "INVALID_TEMPLATE" => Some(Self::InvalidTemplate),
483                "FIELD_NOT_FOUND" => Some(Self::FieldNotFound),
484                "TEMPLATE_EXCEEDS_MAX_LENGTH" => Some(Self::TemplateExceedsMaxLength),
485                "RENDERED_VALUE_EXCEEDS_MAX_LENGTH" => {
486                    Some(Self::RenderedValueExceedsMaxLength)
487                }
488                _ => None,
489            }
490        }
491    }
492    #[derive(serde::Serialize, serde::Deserialize)]
493    #[serde(rename_all = "snake_case")]
494    #[derive(Clone, PartialEq, ::prost::Oneof)]
495    pub enum Result {
496        #[prost(message, tag = "1")]
497        Success(Success),
498        #[prost(message, tag = "2")]
499        Failure(Failure),
500    }
501}
502#[derive(serde::Serialize, serde::Deserialize)]
503#[serde(rename_all = "snake_case")]
504#[derive(Clone, PartialEq, ::prost::Message)]
505pub struct TestTemplateRenderResponse {
506    #[prost(message, optional, tag = "1")]
507    pub result: ::core::option::Option<TestTemplateRenderResult>,
508}
509#[derive(serde::Serialize, serde::Deserialize)]
510#[serde(rename_all = "snake_case")]
511#[derive(Clone, PartialEq, ::prost::Message)]
512pub struct TestRoutingConditionValidRequest {
513    #[deprecated]
514    #[prost(string, tag = "1")]
515    pub deprecated_entity_type: ::prost::alloc::string::String,
516    #[prost(string, tag = "2")]
517    pub template: ::prost::alloc::string::String,
518    #[prost(enumeration = "super::super::EntityType", tag = "3")]
519    pub entity_type: i32,
520}
521#[derive(serde::Serialize, serde::Deserialize)]
522#[serde(rename_all = "snake_case")]
523#[derive(Clone, PartialEq, ::prost::Message)]
524pub struct TestRoutingConditionValidResponse {
525    #[prost(oneof = "test_routing_condition_valid_response::Result", tags = "1, 2")]
526    pub result: ::core::option::Option<test_routing_condition_valid_response::Result>,
527}
528/// Nested message and enum types in `TestRoutingConditionValidResponse`.
529pub mod test_routing_condition_valid_response {
530    #[derive(serde::Serialize, serde::Deserialize)]
531    #[serde(rename_all = "snake_case")]
532    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
533    pub struct Success {
534        #[prost(bool, tag = "1")]
535        pub result: bool,
536    }
537    #[derive(serde::Serialize, serde::Deserialize)]
538    #[serde(rename_all = "snake_case")]
539    #[derive(Clone, PartialEq, ::prost::Message)]
540    pub struct Failure {
541        #[prost(string, tag = "1")]
542        pub message: ::prost::alloc::string::String,
543    }
544    #[derive(serde::Serialize, serde::Deserialize)]
545    #[serde(rename_all = "snake_case")]
546    #[derive(Clone, PartialEq, ::prost::Oneof)]
547    pub enum Result {
548        #[prost(message, tag = "1")]
549        Success(Success),
550        #[prost(message, tag = "2")]
551        Failure(Failure),
552    }
553}
554/// Generated client implementations.
555pub mod testing_service_client {
556    #![allow(
557        unused_variables,
558        dead_code,
559        missing_docs,
560        clippy::wildcard_imports,
561        clippy::let_unit_value,
562    )]
563    use tonic::codegen::*;
564    use tonic::codegen::http::Uri;
565    /// Public API for testing Notification Center configurations including connectors, presets, and templates.
566    #[derive(Debug, Clone)]
567    pub struct TestingServiceClient<T> {
568        inner: tonic::client::Grpc<T>,
569    }
570    impl TestingServiceClient<tonic::transport::Channel> {
571        /// Attempt to create a new client by connecting to a given endpoint.
572        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
573        where
574            D: TryInto<tonic::transport::Endpoint>,
575            D::Error: Into<StdError>,
576        {
577            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
578            Ok(Self::new(conn))
579        }
580    }
581    impl<T> TestingServiceClient<T>
582    where
583        T: tonic::client::GrpcService<tonic::body::BoxBody>,
584        T::Error: Into<StdError>,
585        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
586        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
587    {
588        pub fn new(inner: T) -> Self {
589            let inner = tonic::client::Grpc::new(inner);
590            Self { inner }
591        }
592        pub fn with_origin(inner: T, origin: Uri) -> Self {
593            let inner = tonic::client::Grpc::with_origin(inner, origin);
594            Self { inner }
595        }
596        pub fn with_interceptor<F>(
597            inner: T,
598            interceptor: F,
599        ) -> TestingServiceClient<InterceptedService<T, F>>
600        where
601            F: tonic::service::Interceptor,
602            T::ResponseBody: Default,
603            T: tonic::codegen::Service<
604                http::Request<tonic::body::BoxBody>,
605                Response = http::Response<
606                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
607                >,
608            >,
609            <T as tonic::codegen::Service<
610                http::Request<tonic::body::BoxBody>,
611            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
612        {
613            TestingServiceClient::new(InterceptedService::new(inner, interceptor))
614        }
615        /// Compress requests with the given encoding.
616        ///
617        /// This requires the server to support it otherwise it might respond with an
618        /// error.
619        #[must_use]
620        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
621            self.inner = self.inner.send_compressed(encoding);
622            self
623        }
624        /// Enable decompressing responses.
625        #[must_use]
626        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
627            self.inner = self.inner.accept_compressed(encoding);
628            self
629        }
630        /// Limits the maximum size of a decoded message.
631        ///
632        /// Default: `4MB`
633        #[must_use]
634        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
635            self.inner = self.inner.max_decoding_message_size(limit);
636            self
637        }
638        /// Limits the maximum size of an encoded message.
639        ///
640        /// Default: `usize::MAX`
641        #[must_use]
642        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
643            self.inner = self.inner.max_encoding_message_size(limit);
644            self
645        }
646        pub async fn test_connector_config(
647            &mut self,
648            request: impl tonic::IntoRequest<super::TestConnectorConfigRequest>,
649        ) -> std::result::Result<
650            tonic::Response<super::TestConnectorConfigResponse>,
651            tonic::Status,
652        > {
653            self.inner
654                .ready()
655                .await
656                .map_err(|e| {
657                    tonic::Status::unknown(
658                        format!("Service was not ready: {}", e.into()),
659                    )
660                })?;
661            let codec = tonic::codec::ProstCodec::default();
662            let path = http::uri::PathAndQuery::from_static(
663                "/com.coralogixapis.notification_center.notifications.v1.TestingService/TestConnectorConfig",
664            );
665            let mut req = request.into_request();
666            req.extensions_mut()
667                .insert(
668                    GrpcMethod::new(
669                        "com.coralogixapis.notification_center.notifications.v1.TestingService",
670                        "TestConnectorConfig",
671                    ),
672                );
673            self.inner.unary(req, path, codec).await
674        }
675        pub async fn test_existing_connector(
676            &mut self,
677            request: impl tonic::IntoRequest<super::TestExistingConnectorRequest>,
678        ) -> std::result::Result<
679            tonic::Response<super::TestExistingConnectorResponse>,
680            tonic::Status,
681        > {
682            self.inner
683                .ready()
684                .await
685                .map_err(|e| {
686                    tonic::Status::unknown(
687                        format!("Service was not ready: {}", e.into()),
688                    )
689                })?;
690            let codec = tonic::codec::ProstCodec::default();
691            let path = http::uri::PathAndQuery::from_static(
692                "/com.coralogixapis.notification_center.notifications.v1.TestingService/TestExistingConnector",
693            );
694            let mut req = request.into_request();
695            req.extensions_mut()
696                .insert(
697                    GrpcMethod::new(
698                        "com.coralogixapis.notification_center.notifications.v1.TestingService",
699                        "TestExistingConnector",
700                    ),
701                );
702            self.inner.unary(req, path, codec).await
703        }
704        pub async fn test_preset_config(
705            &mut self,
706            request: impl tonic::IntoRequest<super::TestPresetConfigRequest>,
707        ) -> std::result::Result<
708            tonic::Response<super::TestPresetConfigResponse>,
709            tonic::Status,
710        > {
711            self.inner
712                .ready()
713                .await
714                .map_err(|e| {
715                    tonic::Status::unknown(
716                        format!("Service was not ready: {}", e.into()),
717                    )
718                })?;
719            let codec = tonic::codec::ProstCodec::default();
720            let path = http::uri::PathAndQuery::from_static(
721                "/com.coralogixapis.notification_center.notifications.v1.TestingService/TestPresetConfig",
722            );
723            let mut req = request.into_request();
724            req.extensions_mut()
725                .insert(
726                    GrpcMethod::new(
727                        "com.coralogixapis.notification_center.notifications.v1.TestingService",
728                        "TestPresetConfig",
729                    ),
730                );
731            self.inner.unary(req, path, codec).await
732        }
733        pub async fn test_existing_preset(
734            &mut self,
735            request: impl tonic::IntoRequest<super::TestExistingPresetRequest>,
736        ) -> std::result::Result<
737            tonic::Response<super::TestExistingPresetResponse>,
738            tonic::Status,
739        > {
740            self.inner
741                .ready()
742                .await
743                .map_err(|e| {
744                    tonic::Status::unknown(
745                        format!("Service was not ready: {}", e.into()),
746                    )
747                })?;
748            let codec = tonic::codec::ProstCodec::default();
749            let path = http::uri::PathAndQuery::from_static(
750                "/com.coralogixapis.notification_center.notifications.v1.TestingService/TestExistingPreset",
751            );
752            let mut req = request.into_request();
753            req.extensions_mut()
754                .insert(
755                    GrpcMethod::new(
756                        "com.coralogixapis.notification_center.notifications.v1.TestingService",
757                        "TestExistingPreset",
758                    ),
759                );
760            self.inner.unary(req, path, codec).await
761        }
762        pub async fn test_destination(
763            &mut self,
764            request: impl tonic::IntoRequest<super::TestDestinationRequest>,
765        ) -> std::result::Result<
766            tonic::Response<super::TestDestinationResponse>,
767            tonic::Status,
768        > {
769            self.inner
770                .ready()
771                .await
772                .map_err(|e| {
773                    tonic::Status::unknown(
774                        format!("Service was not ready: {}", e.into()),
775                    )
776                })?;
777            let codec = tonic::codec::ProstCodec::default();
778            let path = http::uri::PathAndQuery::from_static(
779                "/com.coralogixapis.notification_center.notifications.v1.TestingService/TestDestination",
780            );
781            let mut req = request.into_request();
782            req.extensions_mut()
783                .insert(
784                    GrpcMethod::new(
785                        "com.coralogixapis.notification_center.notifications.v1.TestingService",
786                        "TestDestination",
787                    ),
788                );
789            self.inner.unary(req, path, codec).await
790        }
791        pub async fn test_template_render(
792            &mut self,
793            request: impl tonic::IntoRequest<super::TestTemplateRenderRequest>,
794        ) -> std::result::Result<
795            tonic::Response<super::TestTemplateRenderResponse>,
796            tonic::Status,
797        > {
798            self.inner
799                .ready()
800                .await
801                .map_err(|e| {
802                    tonic::Status::unknown(
803                        format!("Service was not ready: {}", e.into()),
804                    )
805                })?;
806            let codec = tonic::codec::ProstCodec::default();
807            let path = http::uri::PathAndQuery::from_static(
808                "/com.coralogixapis.notification_center.notifications.v1.TestingService/TestTemplateRender",
809            );
810            let mut req = request.into_request();
811            req.extensions_mut()
812                .insert(
813                    GrpcMethod::new(
814                        "com.coralogixapis.notification_center.notifications.v1.TestingService",
815                        "TestTemplateRender",
816                    ),
817                );
818            self.inner.unary(req, path, codec).await
819        }
820        pub async fn test_routing_condition_valid(
821            &mut self,
822            request: impl tonic::IntoRequest<super::TestRoutingConditionValidRequest>,
823        ) -> std::result::Result<
824            tonic::Response<super::TestRoutingConditionValidResponse>,
825            tonic::Status,
826        > {
827            self.inner
828                .ready()
829                .await
830                .map_err(|e| {
831                    tonic::Status::unknown(
832                        format!("Service was not ready: {}", e.into()),
833                    )
834                })?;
835            let codec = tonic::codec::ProstCodec::default();
836            let path = http::uri::PathAndQuery::from_static(
837                "/com.coralogixapis.notification_center.notifications.v1.TestingService/TestRoutingConditionValid",
838            );
839            let mut req = request.into_request();
840            req.extensions_mut()
841                .insert(
842                    GrpcMethod::new(
843                        "com.coralogixapis.notification_center.notifications.v1.TestingService",
844                        "TestRoutingConditionValid",
845                    ),
846                );
847            self.inner.unary(req, path, codec).await
848        }
849    }
850}