1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct SlackWebhookIntegration {
4 #[prost(string, tag = "1")]
5 pub team_name: ::prost::alloc::string::String,
6 #[prost(string, tag = "2")]
7 pub channel: ::prost::alloc::string::String,
8 #[prost(string, tag = "3")]
9 pub channel_id: ::prost::alloc::string::String,
10 #[prost(enumeration = "SlackInstance", optional, tag = "4")]
11 pub slack_instance: ::core::option::Option<i32>,
12}
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct SimpleWebhookIntegration {
15 #[prost(string, optional, tag = "1")]
16 pub hmac_secret_rid: ::core::option::Option<::prost::alloc::string::String>,
17 #[prost(enumeration = "WebhookContentType", optional, tag = "2")]
18 pub content_type: ::core::option::Option<i32>,
19 #[prost(int32, optional, tag = "3")]
20 pub timeout_seconds: ::core::option::Option<i32>,
21 #[prost(map = "string, string", tag = "4")]
22 pub custom_headers: ::std::collections::HashMap<
23 ::prost::alloc::string::String,
24 ::prost::alloc::string::String,
25 >,
26}
27#[derive(Clone, Copy, PartialEq, ::prost::Message)]
28pub struct WebhookDeliveryConfig {
29 #[prost(int32, optional, tag = "1")]
30 pub default_request_timeout_seconds: ::core::option::Option<i32>,
31 #[prost(int32, optional, tag = "2")]
32 pub default_max_retries: ::core::option::Option<i32>,
33 #[prost(int32, optional, tag = "3")]
34 pub default_retry_interval_seconds: ::core::option::Option<i32>,
35 #[prost(bool, optional, tag = "4")]
36 pub default_exponential_backoff: ::core::option::Option<bool>,
37 #[prost(int32, optional, tag = "5")]
38 pub default_max_retry_interval_seconds: ::core::option::Option<i32>,
39 #[prost(int32, optional, tag = "6")]
40 pub default_delivery_timeout_seconds: ::core::option::Option<i32>,
41}
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct SecureWebhookIntegration {
44 #[prost(string, tag = "1")]
45 pub url: ::prost::alloc::string::String,
46 #[prost(map = "string, string", tag = "2")]
47 pub custom_headers: ::std::collections::HashMap<
48 ::prost::alloc::string::String,
49 ::prost::alloc::string::String,
50 >,
51 #[prost(message, optional, tag = "3")]
52 pub delivery_config: ::core::option::Option<WebhookDeliveryConfig>,
53}
54#[derive(Clone, Copy, PartialEq, ::prost::Message)]
55pub struct OpsgenieIntegration {
56 #[prost(enumeration = "OpsgenieRegion", tag = "1")]
57 pub region: i32,
58}
59#[derive(Clone, Copy, PartialEq, ::prost::Message)]
60pub struct TeamsWebhookIntegration {}
61#[derive(Clone, Copy, PartialEq, ::prost::Message)]
62pub struct PagerDutyIntegration {}
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct IntegrationDetails {
65 #[prost(
66 oneof = "integration_details::IntegrationDetails",
67 tags = "1, 2, 3, 4, 5, 6"
68 )]
69 pub integration_details: ::core::option::Option<
70 integration_details::IntegrationDetails,
71 >,
72}
73pub mod integration_details {
75 #[derive(Clone, PartialEq, ::prost::Oneof)]
76 pub enum IntegrationDetails {
77 #[prost(message, tag = "1")]
78 SlackWebhook(super::SlackWebhookIntegration),
79 #[prost(message, tag = "2")]
80 Opsgenie(super::OpsgenieIntegration),
81 #[prost(message, tag = "3")]
82 SimpleWebhook(super::SimpleWebhookIntegration),
83 #[prost(message, tag = "4")]
84 SecureWebhook(super::SecureWebhookIntegration),
85 #[prost(message, tag = "5")]
86 TeamsWebhook(super::TeamsWebhookIntegration),
87 #[prost(message, tag = "6")]
88 PagerDuty(super::PagerDutyIntegration),
89 }
90}
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct Integration {
93 #[prost(string, tag = "1")]
94 pub rid: ::prost::alloc::string::String,
95 #[prost(string, tag = "2")]
96 pub name: ::prost::alloc::string::String,
97 #[prost(string, optional, tag = "3")]
98 pub description: ::core::option::Option<::prost::alloc::string::String>,
99 #[prost(message, optional, tag = "4")]
100 pub details: ::core::option::Option<IntegrationDetails>,
101 #[prost(message, optional, tag = "5")]
102 pub created_at: ::core::option::Option<
103 super::super::super::google::protobuf::Timestamp,
104 >,
105 #[prost(string, tag = "6")]
106 pub created_by: ::prost::alloc::string::String,
107 #[prost(bool, tag = "7")]
108 pub archived: bool,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct CreateSimpleWebhookDetails {
112 #[prost(string, tag = "1")]
113 pub webhook: ::prost::alloc::string::String,
114 #[prost(string, optional, tag = "2")]
115 pub secret: ::core::option::Option<::prost::alloc::string::String>,
116 #[prost(enumeration = "WebhookContentType", optional, tag = "3")]
117 pub content_type: ::core::option::Option<i32>,
118 #[prost(int32, optional, tag = "4")]
119 pub timeout_seconds: ::core::option::Option<i32>,
120 #[prost(map = "string, string", tag = "5")]
121 pub custom_headers: ::std::collections::HashMap<
122 ::prost::alloc::string::String,
123 ::prost::alloc::string::String,
124 >,
125}
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct CreateOpsgenieDetails {
128 #[prost(string, tag = "1")]
129 pub api_key: ::prost::alloc::string::String,
130 #[prost(enumeration = "OpsgenieRegion", tag = "2")]
131 pub region: i32,
132}
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct CreateTeamsWebhookDetails {
135 #[prost(string, tag = "1")]
136 pub webhook: ::prost::alloc::string::String,
137}
138#[derive(Clone, PartialEq, ::prost::Message)]
139pub struct CreatePagerDutyDetails {
140 #[prost(string, tag = "1")]
141 pub routing_key: ::prost::alloc::string::String,
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct CreateIntegrationDetails {
145 #[prost(oneof = "create_integration_details::Details", tags = "1, 2, 3, 4")]
146 pub details: ::core::option::Option<create_integration_details::Details>,
147}
148pub mod create_integration_details {
150 #[derive(Clone, PartialEq, ::prost::Oneof)]
151 pub enum Details {
152 #[prost(message, tag = "1")]
153 SimpleWebhook(super::CreateSimpleWebhookDetails),
154 #[prost(message, tag = "2")]
155 Opsgenie(super::CreateOpsgenieDetails),
156 #[prost(message, tag = "3")]
157 TeamsWebhook(super::CreateTeamsWebhookDetails),
158 #[prost(message, tag = "4")]
159 PagerDuty(super::CreatePagerDutyDetails),
160 }
161}
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct UpdateSimpleWebhookDetails {
164 #[prost(string, tag = "1")]
165 pub webhook: ::prost::alloc::string::String,
166 #[prost(string, optional, tag = "2")]
167 pub secret: ::core::option::Option<::prost::alloc::string::String>,
168 #[prost(enumeration = "WebhookContentType", optional, tag = "3")]
169 pub content_type: ::core::option::Option<i32>,
170 #[prost(int32, optional, tag = "4")]
171 pub timeout_seconds: ::core::option::Option<i32>,
172 #[prost(map = "string, string", tag = "5")]
173 pub custom_headers: ::std::collections::HashMap<
174 ::prost::alloc::string::String,
175 ::prost::alloc::string::String,
176 >,
177}
178#[derive(Clone, PartialEq, ::prost::Message)]
179pub struct UpdateSecureWebhookDetails {
180 #[prost(string, tag = "1")]
181 pub url: ::prost::alloc::string::String,
182 #[prost(map = "string, string", tag = "2")]
183 pub custom_headers: ::std::collections::HashMap<
184 ::prost::alloc::string::String,
185 ::prost::alloc::string::String,
186 >,
187 #[prost(message, optional, tag = "3")]
188 pub delivery_config: ::core::option::Option<WebhookDeliveryConfig>,
189}
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct UpdateOpsgenieDetails {
192 #[prost(string, tag = "1")]
193 pub api_key: ::prost::alloc::string::String,
194 #[prost(enumeration = "OpsgenieRegion", tag = "2")]
195 pub region: i32,
196}
197#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct UpdateTeamsWebhookDetails {
199 #[prost(string, tag = "1")]
200 pub webhook: ::prost::alloc::string::String,
201}
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct UpdatePagerDutyDetails {
204 #[prost(string, tag = "1")]
205 pub routing_key: ::prost::alloc::string::String,
206}
207#[derive(Clone, PartialEq, ::prost::Message)]
208pub struct UpdateIntegrationDetails {
209 #[prost(oneof = "update_integration_details::Details", tags = "1, 2, 3, 4, 5")]
210 pub details: ::core::option::Option<update_integration_details::Details>,
211}
212pub mod update_integration_details {
214 #[derive(Clone, PartialEq, ::prost::Oneof)]
215 pub enum Details {
216 #[prost(message, tag = "1")]
217 SimpleWebhook(super::UpdateSimpleWebhookDetails),
218 #[prost(message, tag = "2")]
219 SecureWebhook(super::UpdateSecureWebhookDetails),
220 #[prost(message, tag = "3")]
221 Opsgenie(super::UpdateOpsgenieDetails),
222 #[prost(message, tag = "4")]
223 TeamsWebhook(super::UpdateTeamsWebhookDetails),
224 #[prost(message, tag = "5")]
225 PagerDuty(super::UpdatePagerDutyDetails),
226 }
227}
228#[derive(Clone, PartialEq, ::prost::Message)]
229pub struct CreateIntegrationRequest {
230 #[prost(string, tag = "1")]
231 pub name: ::prost::alloc::string::String,
232 #[prost(string, optional, tag = "2")]
233 pub description: ::core::option::Option<::prost::alloc::string::String>,
234 #[prost(message, optional, tag = "3")]
235 pub details: ::core::option::Option<CreateIntegrationDetails>,
236 #[prost(string, optional, tag = "4")]
237 pub workspace: ::core::option::Option<::prost::alloc::string::String>,
238}
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct CreateIntegrationResponse {
241 #[prost(message, optional, tag = "1")]
242 pub integration: ::core::option::Option<Integration>,
243}
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct CreateSecureWebhookIntegrationRequest {
246 #[prost(string, tag = "1")]
247 pub name: ::prost::alloc::string::String,
248 #[prost(string, optional, tag = "2")]
249 pub description: ::core::option::Option<::prost::alloc::string::String>,
250 #[prost(string, optional, tag = "3")]
251 pub workspace: ::core::option::Option<::prost::alloc::string::String>,
252 #[prost(message, optional, tag = "4")]
253 pub integration: ::core::option::Option<SecureWebhookIntegration>,
254}
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct CreateSecureWebhookIntegrationResponse {
257 #[prost(message, optional, tag = "1")]
258 pub integration: ::core::option::Option<Integration>,
259 #[prost(string, tag = "2")]
260 pub signing_key: ::prost::alloc::string::String,
261}
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct SendSecureWebhookMessageRequest {
264 #[prost(string, tag = "1")]
265 pub integration_rid: ::prost::alloc::string::String,
266 #[prost(string, tag = "2")]
267 pub payload: ::prost::alloc::string::String,
268 #[prost(map = "string, string", tag = "3")]
269 pub custom_headers: ::std::collections::HashMap<
270 ::prost::alloc::string::String,
271 ::prost::alloc::string::String,
272 >,
273 #[prost(message, optional, tag = "4")]
274 pub delivery_config: ::core::option::Option<WebhookDeliveryConfig>,
275}
276#[derive(Clone, Copy, PartialEq, ::prost::Message)]
277pub struct SendSecureWebhookMessageResponse {}
278#[derive(Clone, PartialEq, ::prost::Message)]
279pub struct DeleteIntegrationRequest {
280 #[prost(string, tag = "1")]
281 pub integration_rid: ::prost::alloc::string::String,
282}
283#[derive(Clone, Copy, PartialEq, ::prost::Message)]
284pub struct DeleteIntegrationResponse {}
285#[derive(Clone, PartialEq, ::prost::Message)]
286pub struct UpdateIntegrationMetadataRequest {
287 #[prost(string, tag = "1")]
288 pub integration_rid: ::prost::alloc::string::String,
289 #[prost(string, optional, tag = "2")]
290 pub name: ::core::option::Option<::prost::alloc::string::String>,
291 #[prost(string, optional, tag = "3")]
292 pub description: ::core::option::Option<::prost::alloc::string::String>,
293}
294#[derive(Clone, PartialEq, ::prost::Message)]
295pub struct UpdateIntegrationMetadataResponse {
296 #[prost(message, optional, tag = "1")]
297 pub integration: ::core::option::Option<Integration>,
298}
299#[derive(Clone, PartialEq, ::prost::Message)]
300pub struct UpdateIntegrationDetailsRequest {
301 #[prost(string, tag = "1")]
302 pub integration_rid: ::prost::alloc::string::String,
303 #[prost(message, optional, tag = "2")]
304 pub details: ::core::option::Option<UpdateIntegrationDetails>,
305}
306#[derive(Clone, PartialEq, ::prost::Message)]
307pub struct UpdateIntegrationDetailsResponse {
308 #[prost(message, optional, tag = "1")]
309 pub integration: ::core::option::Option<Integration>,
310}
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct GetIntegrationRequest {
313 #[prost(string, tag = "1")]
314 pub integration_rid: ::prost::alloc::string::String,
315}
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct GetIntegrationResponse {
318 #[prost(message, optional, tag = "1")]
319 pub integration: ::core::option::Option<Integration>,
320}
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct ListIntegrationsRequest {
323 #[prost(string, repeated, tag = "1")]
324 pub workspaces: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
325 #[prost(int32, optional, tag = "2")]
326 pub page_size: ::core::option::Option<i32>,
327 #[prost(string, optional, tag = "3")]
328 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
329}
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct ListIntegrationsResponse {
332 #[prost(message, repeated, tag = "1")]
333 pub integrations: ::prost::alloc::vec::Vec<Integration>,
334 #[prost(string, optional, tag = "2")]
335 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
336}
337#[derive(Clone, PartialEq, ::prost::Message)]
338pub struct SendMessageRequest {
339 #[prost(string, optional, tag = "1")]
340 pub title: ::core::option::Option<::prost::alloc::string::String>,
341 #[prost(string, tag = "2")]
342 pub message: ::prost::alloc::string::String,
343 #[prost(string, repeated, tag = "3")]
344 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
345 #[prost(string, optional, tag = "4")]
346 pub opsgenie_alias: ::core::option::Option<::prost::alloc::string::String>,
347 #[prost(string, tag = "5")]
348 pub integration_rid: ::prost::alloc::string::String,
349 #[prost(enumeration = "super::super::types::Priority", optional, tag = "6")]
350 pub priority: ::core::option::Option<i32>,
351}
352#[derive(Clone, Copy, PartialEq, ::prost::Message)]
353pub struct SendMessageResponse {}
354#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct RotateSecureWebhookIntegrationSigningKeyRequest {
356 #[prost(string, tag = "1")]
357 pub integration_rid: ::prost::alloc::string::String,
358}
359#[derive(Clone, PartialEq, ::prost::Message)]
360pub struct RotateSecureWebhookIntegrationSigningKeyResponse {
361 #[prost(string, tag = "1")]
362 pub signing_key: ::prost::alloc::string::String,
363}
364#[derive(Clone, PartialEq, ::prost::Message)]
365pub struct CreateSlackAuthorizationUrlRequest {
366 #[prost(string, optional, tag = "1")]
367 pub workspace: ::core::option::Option<::prost::alloc::string::String>,
368 #[prost(enumeration = "SlackInstance", optional, tag = "2")]
369 pub slack_instance: ::core::option::Option<i32>,
370}
371#[derive(Clone, PartialEq, ::prost::Message)]
372pub struct CreateSlackAuthorizationUrlResponse {
373 #[prost(string, tag = "1")]
374 pub authorization_url: ::prost::alloc::string::String,
375}
376#[derive(Clone, PartialEq, ::prost::Message)]
377pub struct CreateSlackWebhookIntegrationRequest {
378 #[prost(string, tag = "1")]
379 pub code: ::prost::alloc::string::String,
380 #[prost(string, tag = "2")]
381 pub state: ::prost::alloc::string::String,
382}
383#[derive(Clone, PartialEq, ::prost::Message)]
384pub struct CreateSlackWebhookIntegrationResponse {
385 #[prost(message, optional, tag = "1")]
386 pub integration: ::core::option::Option<Integration>,
387}
388#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
389#[repr(i32)]
390pub enum SlackInstance {
391 Unspecified = 0,
392 Commercial = 1,
393 Gov = 2,
394}
395impl SlackInstance {
396 pub fn as_str_name(&self) -> &'static str {
401 match self {
402 Self::Unspecified => "SLACK_INSTANCE_UNSPECIFIED",
403 Self::Commercial => "SLACK_INSTANCE_COMMERCIAL",
404 Self::Gov => "SLACK_INSTANCE_GOV",
405 }
406 }
407 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
409 match value {
410 "SLACK_INSTANCE_UNSPECIFIED" => Some(Self::Unspecified),
411 "SLACK_INSTANCE_COMMERCIAL" => Some(Self::Commercial),
412 "SLACK_INSTANCE_GOV" => Some(Self::Gov),
413 _ => None,
414 }
415 }
416}
417#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
418#[repr(i32)]
419pub enum WebhookContentType {
420 Unspecified = 0,
421 ApplicationJson = 1,
422 ApplicationXWwwFormUrlencoded = 2,
423}
424impl WebhookContentType {
425 pub fn as_str_name(&self) -> &'static str {
430 match self {
431 Self::Unspecified => "WEBHOOK_CONTENT_TYPE_UNSPECIFIED",
432 Self::ApplicationJson => "WEBHOOK_CONTENT_TYPE_APPLICATION_JSON",
433 Self::ApplicationXWwwFormUrlencoded => {
434 "WEBHOOK_CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED"
435 }
436 }
437 }
438 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
440 match value {
441 "WEBHOOK_CONTENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
442 "WEBHOOK_CONTENT_TYPE_APPLICATION_JSON" => Some(Self::ApplicationJson),
443 "WEBHOOK_CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED" => {
444 Some(Self::ApplicationXWwwFormUrlencoded)
445 }
446 _ => None,
447 }
448 }
449}
450#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
451#[repr(i32)]
452pub enum OpsgenieRegion {
453 Unspecified = 0,
454 Us = 1,
455 Eu = 2,
456}
457impl OpsgenieRegion {
458 pub fn as_str_name(&self) -> &'static str {
463 match self {
464 Self::Unspecified => "OPSGENIE_REGION_UNSPECIFIED",
465 Self::Us => "OPSGENIE_REGION_US",
466 Self::Eu => "OPSGENIE_REGION_EU",
467 }
468 }
469 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
471 match value {
472 "OPSGENIE_REGION_UNSPECIFIED" => Some(Self::Unspecified),
473 "OPSGENIE_REGION_US" => Some(Self::Us),
474 "OPSGENIE_REGION_EU" => Some(Self::Eu),
475 _ => None,
476 }
477 }
478}
479#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
480#[repr(i32)]
481pub enum IntegrationsError {
482 InvalidRequest = 0,
483}
484impl IntegrationsError {
485 pub fn as_str_name(&self) -> &'static str {
490 match self {
491 Self::InvalidRequest => "INTEGRATIONS_ERROR_INVALID_REQUEST",
492 }
493 }
494 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
496 match value {
497 "INTEGRATIONS_ERROR_INVALID_REQUEST" => Some(Self::InvalidRequest),
498 _ => None,
499 }
500 }
501}
502pub mod integrations_service_client {
504 #![allow(
505 unused_variables,
506 dead_code,
507 missing_docs,
508 clippy::wildcard_imports,
509 clippy::let_unit_value,
510 )]
511 use tonic::codegen::*;
512 use tonic::codegen::http::Uri;
513 #[derive(Debug, Clone)]
514 pub struct IntegrationsServiceClient<T> {
515 inner: tonic::client::Grpc<T>,
516 }
517 impl IntegrationsServiceClient<tonic::transport::Channel> {
518 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
520 where
521 D: TryInto<tonic::transport::Endpoint>,
522 D::Error: Into<StdError>,
523 {
524 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
525 Ok(Self::new(conn))
526 }
527 }
528 impl<T> IntegrationsServiceClient<T>
529 where
530 T: tonic::client::GrpcService<tonic::body::Body>,
531 T::Error: Into<StdError>,
532 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
533 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
534 {
535 pub fn new(inner: T) -> Self {
536 let inner = tonic::client::Grpc::new(inner);
537 Self { inner }
538 }
539 pub fn with_origin(inner: T, origin: Uri) -> Self {
540 let inner = tonic::client::Grpc::with_origin(inner, origin);
541 Self { inner }
542 }
543 pub fn with_interceptor<F>(
544 inner: T,
545 interceptor: F,
546 ) -> IntegrationsServiceClient<InterceptedService<T, F>>
547 where
548 F: tonic::service::Interceptor,
549 T::ResponseBody: Default,
550 T: tonic::codegen::Service<
551 http::Request<tonic::body::Body>,
552 Response = http::Response<
553 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
554 >,
555 >,
556 <T as tonic::codegen::Service<
557 http::Request<tonic::body::Body>,
558 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
559 {
560 IntegrationsServiceClient::new(InterceptedService::new(inner, interceptor))
561 }
562 #[must_use]
567 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
568 self.inner = self.inner.send_compressed(encoding);
569 self
570 }
571 #[must_use]
573 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
574 self.inner = self.inner.accept_compressed(encoding);
575 self
576 }
577 #[must_use]
581 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
582 self.inner = self.inner.max_decoding_message_size(limit);
583 self
584 }
585 #[must_use]
589 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
590 self.inner = self.inner.max_encoding_message_size(limit);
591 self
592 }
593 pub async fn create_integration(
594 &mut self,
595 request: impl tonic::IntoRequest<super::CreateIntegrationRequest>,
596 ) -> std::result::Result<
597 tonic::Response<super::CreateIntegrationResponse>,
598 tonic::Status,
599 > {
600 self.inner
601 .ready()
602 .await
603 .map_err(|e| {
604 tonic::Status::unknown(
605 format!("Service was not ready: {}", e.into()),
606 )
607 })?;
608 let codec = tonic::codec::ProstCodec::default();
609 let path = http::uri::PathAndQuery::from_static(
610 "/nominal.integrations.v1.IntegrationsService/CreateIntegration",
611 );
612 let mut req = request.into_request();
613 req.extensions_mut()
614 .insert(
615 GrpcMethod::new(
616 "nominal.integrations.v1.IntegrationsService",
617 "CreateIntegration",
618 ),
619 );
620 self.inner.unary(req, path, codec).await
621 }
622 pub async fn create_slack_authorization_url(
623 &mut self,
624 request: impl tonic::IntoRequest<super::CreateSlackAuthorizationUrlRequest>,
625 ) -> std::result::Result<
626 tonic::Response<super::CreateSlackAuthorizationUrlResponse>,
627 tonic::Status,
628 > {
629 self.inner
630 .ready()
631 .await
632 .map_err(|e| {
633 tonic::Status::unknown(
634 format!("Service was not ready: {}", e.into()),
635 )
636 })?;
637 let codec = tonic::codec::ProstCodec::default();
638 let path = http::uri::PathAndQuery::from_static(
639 "/nominal.integrations.v1.IntegrationsService/CreateSlackAuthorizationUrl",
640 );
641 let mut req = request.into_request();
642 req.extensions_mut()
643 .insert(
644 GrpcMethod::new(
645 "nominal.integrations.v1.IntegrationsService",
646 "CreateSlackAuthorizationUrl",
647 ),
648 );
649 self.inner.unary(req, path, codec).await
650 }
651 pub async fn create_slack_webhook_integration(
652 &mut self,
653 request: impl tonic::IntoRequest<super::CreateSlackWebhookIntegrationRequest>,
654 ) -> std::result::Result<
655 tonic::Response<super::CreateSlackWebhookIntegrationResponse>,
656 tonic::Status,
657 > {
658 self.inner
659 .ready()
660 .await
661 .map_err(|e| {
662 tonic::Status::unknown(
663 format!("Service was not ready: {}", e.into()),
664 )
665 })?;
666 let codec = tonic::codec::ProstCodec::default();
667 let path = http::uri::PathAndQuery::from_static(
668 "/nominal.integrations.v1.IntegrationsService/CreateSlackWebhookIntegration",
669 );
670 let mut req = request.into_request();
671 req.extensions_mut()
672 .insert(
673 GrpcMethod::new(
674 "nominal.integrations.v1.IntegrationsService",
675 "CreateSlackWebhookIntegration",
676 ),
677 );
678 self.inner.unary(req, path, codec).await
679 }
680 pub async fn create_secure_webhook_integration(
681 &mut self,
682 request: impl tonic::IntoRequest<
683 super::CreateSecureWebhookIntegrationRequest,
684 >,
685 ) -> std::result::Result<
686 tonic::Response<super::CreateSecureWebhookIntegrationResponse>,
687 tonic::Status,
688 > {
689 self.inner
690 .ready()
691 .await
692 .map_err(|e| {
693 tonic::Status::unknown(
694 format!("Service was not ready: {}", e.into()),
695 )
696 })?;
697 let codec = tonic::codec::ProstCodec::default();
698 let path = http::uri::PathAndQuery::from_static(
699 "/nominal.integrations.v1.IntegrationsService/CreateSecureWebhookIntegration",
700 );
701 let mut req = request.into_request();
702 req.extensions_mut()
703 .insert(
704 GrpcMethod::new(
705 "nominal.integrations.v1.IntegrationsService",
706 "CreateSecureWebhookIntegration",
707 ),
708 );
709 self.inner.unary(req, path, codec).await
710 }
711 pub async fn send_secure_webhook_message(
712 &mut self,
713 request: impl tonic::IntoRequest<super::SendSecureWebhookMessageRequest>,
714 ) -> std::result::Result<
715 tonic::Response<super::SendSecureWebhookMessageResponse>,
716 tonic::Status,
717 > {
718 self.inner
719 .ready()
720 .await
721 .map_err(|e| {
722 tonic::Status::unknown(
723 format!("Service was not ready: {}", e.into()),
724 )
725 })?;
726 let codec = tonic::codec::ProstCodec::default();
727 let path = http::uri::PathAndQuery::from_static(
728 "/nominal.integrations.v1.IntegrationsService/SendSecureWebhookMessage",
729 );
730 let mut req = request.into_request();
731 req.extensions_mut()
732 .insert(
733 GrpcMethod::new(
734 "nominal.integrations.v1.IntegrationsService",
735 "SendSecureWebhookMessage",
736 ),
737 );
738 self.inner.unary(req, path, codec).await
739 }
740 pub async fn delete_integration(
741 &mut self,
742 request: impl tonic::IntoRequest<super::DeleteIntegrationRequest>,
743 ) -> std::result::Result<
744 tonic::Response<super::DeleteIntegrationResponse>,
745 tonic::Status,
746 > {
747 self.inner
748 .ready()
749 .await
750 .map_err(|e| {
751 tonic::Status::unknown(
752 format!("Service was not ready: {}", e.into()),
753 )
754 })?;
755 let codec = tonic::codec::ProstCodec::default();
756 let path = http::uri::PathAndQuery::from_static(
757 "/nominal.integrations.v1.IntegrationsService/DeleteIntegration",
758 );
759 let mut req = request.into_request();
760 req.extensions_mut()
761 .insert(
762 GrpcMethod::new(
763 "nominal.integrations.v1.IntegrationsService",
764 "DeleteIntegration",
765 ),
766 );
767 self.inner.unary(req, path, codec).await
768 }
769 pub async fn update_integration_metadata(
770 &mut self,
771 request: impl tonic::IntoRequest<super::UpdateIntegrationMetadataRequest>,
772 ) -> std::result::Result<
773 tonic::Response<super::UpdateIntegrationMetadataResponse>,
774 tonic::Status,
775 > {
776 self.inner
777 .ready()
778 .await
779 .map_err(|e| {
780 tonic::Status::unknown(
781 format!("Service was not ready: {}", e.into()),
782 )
783 })?;
784 let codec = tonic::codec::ProstCodec::default();
785 let path = http::uri::PathAndQuery::from_static(
786 "/nominal.integrations.v1.IntegrationsService/UpdateIntegrationMetadata",
787 );
788 let mut req = request.into_request();
789 req.extensions_mut()
790 .insert(
791 GrpcMethod::new(
792 "nominal.integrations.v1.IntegrationsService",
793 "UpdateIntegrationMetadata",
794 ),
795 );
796 self.inner.unary(req, path, codec).await
797 }
798 pub async fn update_integration_details(
799 &mut self,
800 request: impl tonic::IntoRequest<super::UpdateIntegrationDetailsRequest>,
801 ) -> std::result::Result<
802 tonic::Response<super::UpdateIntegrationDetailsResponse>,
803 tonic::Status,
804 > {
805 self.inner
806 .ready()
807 .await
808 .map_err(|e| {
809 tonic::Status::unknown(
810 format!("Service was not ready: {}", e.into()),
811 )
812 })?;
813 let codec = tonic::codec::ProstCodec::default();
814 let path = http::uri::PathAndQuery::from_static(
815 "/nominal.integrations.v1.IntegrationsService/UpdateIntegrationDetails",
816 );
817 let mut req = request.into_request();
818 req.extensions_mut()
819 .insert(
820 GrpcMethod::new(
821 "nominal.integrations.v1.IntegrationsService",
822 "UpdateIntegrationDetails",
823 ),
824 );
825 self.inner.unary(req, path, codec).await
826 }
827 pub async fn get_integration(
828 &mut self,
829 request: impl tonic::IntoRequest<super::GetIntegrationRequest>,
830 ) -> std::result::Result<
831 tonic::Response<super::GetIntegrationResponse>,
832 tonic::Status,
833 > {
834 self.inner
835 .ready()
836 .await
837 .map_err(|e| {
838 tonic::Status::unknown(
839 format!("Service was not ready: {}", e.into()),
840 )
841 })?;
842 let codec = tonic::codec::ProstCodec::default();
843 let path = http::uri::PathAndQuery::from_static(
844 "/nominal.integrations.v1.IntegrationsService/GetIntegration",
845 );
846 let mut req = request.into_request();
847 req.extensions_mut()
848 .insert(
849 GrpcMethod::new(
850 "nominal.integrations.v1.IntegrationsService",
851 "GetIntegration",
852 ),
853 );
854 self.inner.unary(req, path, codec).await
855 }
856 pub async fn list_integrations(
857 &mut self,
858 request: impl tonic::IntoRequest<super::ListIntegrationsRequest>,
859 ) -> std::result::Result<
860 tonic::Response<super::ListIntegrationsResponse>,
861 tonic::Status,
862 > {
863 self.inner
864 .ready()
865 .await
866 .map_err(|e| {
867 tonic::Status::unknown(
868 format!("Service was not ready: {}", e.into()),
869 )
870 })?;
871 let codec = tonic::codec::ProstCodec::default();
872 let path = http::uri::PathAndQuery::from_static(
873 "/nominal.integrations.v1.IntegrationsService/ListIntegrations",
874 );
875 let mut req = request.into_request();
876 req.extensions_mut()
877 .insert(
878 GrpcMethod::new(
879 "nominal.integrations.v1.IntegrationsService",
880 "ListIntegrations",
881 ),
882 );
883 self.inner.unary(req, path, codec).await
884 }
885 pub async fn send_message(
886 &mut self,
887 request: impl tonic::IntoRequest<super::SendMessageRequest>,
888 ) -> std::result::Result<
889 tonic::Response<super::SendMessageResponse>,
890 tonic::Status,
891 > {
892 self.inner
893 .ready()
894 .await
895 .map_err(|e| {
896 tonic::Status::unknown(
897 format!("Service was not ready: {}", e.into()),
898 )
899 })?;
900 let codec = tonic::codec::ProstCodec::default();
901 let path = http::uri::PathAndQuery::from_static(
902 "/nominal.integrations.v1.IntegrationsService/SendMessage",
903 );
904 let mut req = request.into_request();
905 req.extensions_mut()
906 .insert(
907 GrpcMethod::new(
908 "nominal.integrations.v1.IntegrationsService",
909 "SendMessage",
910 ),
911 );
912 self.inner.unary(req, path, codec).await
913 }
914 pub async fn rotate_secure_webhook_integration_signing_key(
915 &mut self,
916 request: impl tonic::IntoRequest<
917 super::RotateSecureWebhookIntegrationSigningKeyRequest,
918 >,
919 ) -> std::result::Result<
920 tonic::Response<super::RotateSecureWebhookIntegrationSigningKeyResponse>,
921 tonic::Status,
922 > {
923 self.inner
924 .ready()
925 .await
926 .map_err(|e| {
927 tonic::Status::unknown(
928 format!("Service was not ready: {}", e.into()),
929 )
930 })?;
931 let codec = tonic::codec::ProstCodec::default();
932 let path = http::uri::PathAndQuery::from_static(
933 "/nominal.integrations.v1.IntegrationsService/RotateSecureWebhookIntegrationSigningKey",
934 );
935 let mut req = request.into_request();
936 req.extensions_mut()
937 .insert(
938 GrpcMethod::new(
939 "nominal.integrations.v1.IntegrationsService",
940 "RotateSecureWebhookIntegrationSigningKey",
941 ),
942 );
943 self.inner.unary(req, path, codec).await
944 }
945 }
946}