Skip to main content

nominal_api_proto/proto/
nominal.integrations.v1.rs

1// This file is @generated by prost-build.
2#[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}
73/// Nested message and enum types in `IntegrationDetails`.
74pub 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}
148/// Nested message and enum types in `CreateIntegrationDetails`.
149pub 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}
212/// Nested message and enum types in `UpdateIntegrationDetails`.
213pub 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, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
365#[repr(i32)]
366pub enum SlackInstance {
367    Unspecified = 0,
368    Commercial = 1,
369    Gov = 2,
370}
371impl SlackInstance {
372    /// String value of the enum field names used in the ProtoBuf definition.
373    ///
374    /// The values are not transformed in any way and thus are considered stable
375    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
376    pub fn as_str_name(&self) -> &'static str {
377        match self {
378            Self::Unspecified => "SLACK_INSTANCE_UNSPECIFIED",
379            Self::Commercial => "SLACK_INSTANCE_COMMERCIAL",
380            Self::Gov => "SLACK_INSTANCE_GOV",
381        }
382    }
383    /// Creates an enum from field names used in the ProtoBuf definition.
384    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
385        match value {
386            "SLACK_INSTANCE_UNSPECIFIED" => Some(Self::Unspecified),
387            "SLACK_INSTANCE_COMMERCIAL" => Some(Self::Commercial),
388            "SLACK_INSTANCE_GOV" => Some(Self::Gov),
389            _ => None,
390        }
391    }
392}
393#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
394#[repr(i32)]
395pub enum WebhookContentType {
396    Unspecified = 0,
397    ApplicationJson = 1,
398    ApplicationXWwwFormUrlencoded = 2,
399}
400impl WebhookContentType {
401    /// String value of the enum field names used in the ProtoBuf definition.
402    ///
403    /// The values are not transformed in any way and thus are considered stable
404    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
405    pub fn as_str_name(&self) -> &'static str {
406        match self {
407            Self::Unspecified => "WEBHOOK_CONTENT_TYPE_UNSPECIFIED",
408            Self::ApplicationJson => "WEBHOOK_CONTENT_TYPE_APPLICATION_JSON",
409            Self::ApplicationXWwwFormUrlencoded => {
410                "WEBHOOK_CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED"
411            }
412        }
413    }
414    /// Creates an enum from field names used in the ProtoBuf definition.
415    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
416        match value {
417            "WEBHOOK_CONTENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
418            "WEBHOOK_CONTENT_TYPE_APPLICATION_JSON" => Some(Self::ApplicationJson),
419            "WEBHOOK_CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED" => {
420                Some(Self::ApplicationXWwwFormUrlencoded)
421            }
422            _ => None,
423        }
424    }
425}
426#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
427#[repr(i32)]
428pub enum OpsgenieRegion {
429    Unspecified = 0,
430    Us = 1,
431    Eu = 2,
432}
433impl OpsgenieRegion {
434    /// String value of the enum field names used in the ProtoBuf definition.
435    ///
436    /// The values are not transformed in any way and thus are considered stable
437    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
438    pub fn as_str_name(&self) -> &'static str {
439        match self {
440            Self::Unspecified => "OPSGENIE_REGION_UNSPECIFIED",
441            Self::Us => "OPSGENIE_REGION_US",
442            Self::Eu => "OPSGENIE_REGION_EU",
443        }
444    }
445    /// Creates an enum from field names used in the ProtoBuf definition.
446    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
447        match value {
448            "OPSGENIE_REGION_UNSPECIFIED" => Some(Self::Unspecified),
449            "OPSGENIE_REGION_US" => Some(Self::Us),
450            "OPSGENIE_REGION_EU" => Some(Self::Eu),
451            _ => None,
452        }
453    }
454}
455#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
456#[repr(i32)]
457pub enum IntegrationsError {
458    InvalidRequest = 0,
459}
460impl IntegrationsError {
461    /// String value of the enum field names used in the ProtoBuf definition.
462    ///
463    /// The values are not transformed in any way and thus are considered stable
464    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
465    pub fn as_str_name(&self) -> &'static str {
466        match self {
467            Self::InvalidRequest => "INTEGRATIONS_ERROR_INVALID_REQUEST",
468        }
469    }
470    /// Creates an enum from field names used in the ProtoBuf definition.
471    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
472        match value {
473            "INTEGRATIONS_ERROR_INVALID_REQUEST" => Some(Self::InvalidRequest),
474            _ => None,
475        }
476    }
477}
478/// Generated client implementations.
479pub mod integrations_service_client {
480    #![allow(
481        unused_variables,
482        dead_code,
483        missing_docs,
484        clippy::wildcard_imports,
485        clippy::let_unit_value,
486    )]
487    use tonic::codegen::*;
488    use tonic::codegen::http::Uri;
489    #[derive(Debug, Clone)]
490    pub struct IntegrationsServiceClient<T> {
491        inner: tonic::client::Grpc<T>,
492    }
493    impl IntegrationsServiceClient<tonic::transport::Channel> {
494        /// Attempt to create a new client by connecting to a given endpoint.
495        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
496        where
497            D: TryInto<tonic::transport::Endpoint>,
498            D::Error: Into<StdError>,
499        {
500            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
501            Ok(Self::new(conn))
502        }
503    }
504    impl<T> IntegrationsServiceClient<T>
505    where
506        T: tonic::client::GrpcService<tonic::body::Body>,
507        T::Error: Into<StdError>,
508        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
509        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
510    {
511        pub fn new(inner: T) -> Self {
512            let inner = tonic::client::Grpc::new(inner);
513            Self { inner }
514        }
515        pub fn with_origin(inner: T, origin: Uri) -> Self {
516            let inner = tonic::client::Grpc::with_origin(inner, origin);
517            Self { inner }
518        }
519        pub fn with_interceptor<F>(
520            inner: T,
521            interceptor: F,
522        ) -> IntegrationsServiceClient<InterceptedService<T, F>>
523        where
524            F: tonic::service::Interceptor,
525            T::ResponseBody: Default,
526            T: tonic::codegen::Service<
527                http::Request<tonic::body::Body>,
528                Response = http::Response<
529                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
530                >,
531            >,
532            <T as tonic::codegen::Service<
533                http::Request<tonic::body::Body>,
534            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
535        {
536            IntegrationsServiceClient::new(InterceptedService::new(inner, interceptor))
537        }
538        /// Compress requests with the given encoding.
539        ///
540        /// This requires the server to support it otherwise it might respond with an
541        /// error.
542        #[must_use]
543        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
544            self.inner = self.inner.send_compressed(encoding);
545            self
546        }
547        /// Enable decompressing responses.
548        #[must_use]
549        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
550            self.inner = self.inner.accept_compressed(encoding);
551            self
552        }
553        /// Limits the maximum size of a decoded message.
554        ///
555        /// Default: `4MB`
556        #[must_use]
557        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
558            self.inner = self.inner.max_decoding_message_size(limit);
559            self
560        }
561        /// Limits the maximum size of an encoded message.
562        ///
563        /// Default: `usize::MAX`
564        #[must_use]
565        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
566            self.inner = self.inner.max_encoding_message_size(limit);
567            self
568        }
569        pub async fn create_integration(
570            &mut self,
571            request: impl tonic::IntoRequest<super::CreateIntegrationRequest>,
572        ) -> std::result::Result<
573            tonic::Response<super::CreateIntegrationResponse>,
574            tonic::Status,
575        > {
576            self.inner
577                .ready()
578                .await
579                .map_err(|e| {
580                    tonic::Status::unknown(
581                        format!("Service was not ready: {}", e.into()),
582                    )
583                })?;
584            let codec = tonic::codec::ProstCodec::default();
585            let path = http::uri::PathAndQuery::from_static(
586                "/nominal.integrations.v1.IntegrationsService/CreateIntegration",
587            );
588            let mut req = request.into_request();
589            req.extensions_mut()
590                .insert(
591                    GrpcMethod::new(
592                        "nominal.integrations.v1.IntegrationsService",
593                        "CreateIntegration",
594                    ),
595                );
596            self.inner.unary(req, path, codec).await
597        }
598        pub async fn create_secure_webhook_integration(
599            &mut self,
600            request: impl tonic::IntoRequest<
601                super::CreateSecureWebhookIntegrationRequest,
602            >,
603        ) -> std::result::Result<
604            tonic::Response<super::CreateSecureWebhookIntegrationResponse>,
605            tonic::Status,
606        > {
607            self.inner
608                .ready()
609                .await
610                .map_err(|e| {
611                    tonic::Status::unknown(
612                        format!("Service was not ready: {}", e.into()),
613                    )
614                })?;
615            let codec = tonic::codec::ProstCodec::default();
616            let path = http::uri::PathAndQuery::from_static(
617                "/nominal.integrations.v1.IntegrationsService/CreateSecureWebhookIntegration",
618            );
619            let mut req = request.into_request();
620            req.extensions_mut()
621                .insert(
622                    GrpcMethod::new(
623                        "nominal.integrations.v1.IntegrationsService",
624                        "CreateSecureWebhookIntegration",
625                    ),
626                );
627            self.inner.unary(req, path, codec).await
628        }
629        pub async fn send_secure_webhook_message(
630            &mut self,
631            request: impl tonic::IntoRequest<super::SendSecureWebhookMessageRequest>,
632        ) -> std::result::Result<
633            tonic::Response<super::SendSecureWebhookMessageResponse>,
634            tonic::Status,
635        > {
636            self.inner
637                .ready()
638                .await
639                .map_err(|e| {
640                    tonic::Status::unknown(
641                        format!("Service was not ready: {}", e.into()),
642                    )
643                })?;
644            let codec = tonic::codec::ProstCodec::default();
645            let path = http::uri::PathAndQuery::from_static(
646                "/nominal.integrations.v1.IntegrationsService/SendSecureWebhookMessage",
647            );
648            let mut req = request.into_request();
649            req.extensions_mut()
650                .insert(
651                    GrpcMethod::new(
652                        "nominal.integrations.v1.IntegrationsService",
653                        "SendSecureWebhookMessage",
654                    ),
655                );
656            self.inner.unary(req, path, codec).await
657        }
658        pub async fn delete_integration(
659            &mut self,
660            request: impl tonic::IntoRequest<super::DeleteIntegrationRequest>,
661        ) -> std::result::Result<
662            tonic::Response<super::DeleteIntegrationResponse>,
663            tonic::Status,
664        > {
665            self.inner
666                .ready()
667                .await
668                .map_err(|e| {
669                    tonic::Status::unknown(
670                        format!("Service was not ready: {}", e.into()),
671                    )
672                })?;
673            let codec = tonic::codec::ProstCodec::default();
674            let path = http::uri::PathAndQuery::from_static(
675                "/nominal.integrations.v1.IntegrationsService/DeleteIntegration",
676            );
677            let mut req = request.into_request();
678            req.extensions_mut()
679                .insert(
680                    GrpcMethod::new(
681                        "nominal.integrations.v1.IntegrationsService",
682                        "DeleteIntegration",
683                    ),
684                );
685            self.inner.unary(req, path, codec).await
686        }
687        pub async fn update_integration_metadata(
688            &mut self,
689            request: impl tonic::IntoRequest<super::UpdateIntegrationMetadataRequest>,
690        ) -> std::result::Result<
691            tonic::Response<super::UpdateIntegrationMetadataResponse>,
692            tonic::Status,
693        > {
694            self.inner
695                .ready()
696                .await
697                .map_err(|e| {
698                    tonic::Status::unknown(
699                        format!("Service was not ready: {}", e.into()),
700                    )
701                })?;
702            let codec = tonic::codec::ProstCodec::default();
703            let path = http::uri::PathAndQuery::from_static(
704                "/nominal.integrations.v1.IntegrationsService/UpdateIntegrationMetadata",
705            );
706            let mut req = request.into_request();
707            req.extensions_mut()
708                .insert(
709                    GrpcMethod::new(
710                        "nominal.integrations.v1.IntegrationsService",
711                        "UpdateIntegrationMetadata",
712                    ),
713                );
714            self.inner.unary(req, path, codec).await
715        }
716        pub async fn update_integration_details(
717            &mut self,
718            request: impl tonic::IntoRequest<super::UpdateIntegrationDetailsRequest>,
719        ) -> std::result::Result<
720            tonic::Response<super::UpdateIntegrationDetailsResponse>,
721            tonic::Status,
722        > {
723            self.inner
724                .ready()
725                .await
726                .map_err(|e| {
727                    tonic::Status::unknown(
728                        format!("Service was not ready: {}", e.into()),
729                    )
730                })?;
731            let codec = tonic::codec::ProstCodec::default();
732            let path = http::uri::PathAndQuery::from_static(
733                "/nominal.integrations.v1.IntegrationsService/UpdateIntegrationDetails",
734            );
735            let mut req = request.into_request();
736            req.extensions_mut()
737                .insert(
738                    GrpcMethod::new(
739                        "nominal.integrations.v1.IntegrationsService",
740                        "UpdateIntegrationDetails",
741                    ),
742                );
743            self.inner.unary(req, path, codec).await
744        }
745        pub async fn get_integration(
746            &mut self,
747            request: impl tonic::IntoRequest<super::GetIntegrationRequest>,
748        ) -> std::result::Result<
749            tonic::Response<super::GetIntegrationResponse>,
750            tonic::Status,
751        > {
752            self.inner
753                .ready()
754                .await
755                .map_err(|e| {
756                    tonic::Status::unknown(
757                        format!("Service was not ready: {}", e.into()),
758                    )
759                })?;
760            let codec = tonic::codec::ProstCodec::default();
761            let path = http::uri::PathAndQuery::from_static(
762                "/nominal.integrations.v1.IntegrationsService/GetIntegration",
763            );
764            let mut req = request.into_request();
765            req.extensions_mut()
766                .insert(
767                    GrpcMethod::new(
768                        "nominal.integrations.v1.IntegrationsService",
769                        "GetIntegration",
770                    ),
771                );
772            self.inner.unary(req, path, codec).await
773        }
774        pub async fn list_integrations(
775            &mut self,
776            request: impl tonic::IntoRequest<super::ListIntegrationsRequest>,
777        ) -> std::result::Result<
778            tonic::Response<super::ListIntegrationsResponse>,
779            tonic::Status,
780        > {
781            self.inner
782                .ready()
783                .await
784                .map_err(|e| {
785                    tonic::Status::unknown(
786                        format!("Service was not ready: {}", e.into()),
787                    )
788                })?;
789            let codec = tonic::codec::ProstCodec::default();
790            let path = http::uri::PathAndQuery::from_static(
791                "/nominal.integrations.v1.IntegrationsService/ListIntegrations",
792            );
793            let mut req = request.into_request();
794            req.extensions_mut()
795                .insert(
796                    GrpcMethod::new(
797                        "nominal.integrations.v1.IntegrationsService",
798                        "ListIntegrations",
799                    ),
800                );
801            self.inner.unary(req, path, codec).await
802        }
803        pub async fn send_message(
804            &mut self,
805            request: impl tonic::IntoRequest<super::SendMessageRequest>,
806        ) -> std::result::Result<
807            tonic::Response<super::SendMessageResponse>,
808            tonic::Status,
809        > {
810            self.inner
811                .ready()
812                .await
813                .map_err(|e| {
814                    tonic::Status::unknown(
815                        format!("Service was not ready: {}", e.into()),
816                    )
817                })?;
818            let codec = tonic::codec::ProstCodec::default();
819            let path = http::uri::PathAndQuery::from_static(
820                "/nominal.integrations.v1.IntegrationsService/SendMessage",
821            );
822            let mut req = request.into_request();
823            req.extensions_mut()
824                .insert(
825                    GrpcMethod::new(
826                        "nominal.integrations.v1.IntegrationsService",
827                        "SendMessage",
828                    ),
829                );
830            self.inner.unary(req, path, codec).await
831        }
832        pub async fn rotate_secure_webhook_integration_signing_key(
833            &mut self,
834            request: impl tonic::IntoRequest<
835                super::RotateSecureWebhookIntegrationSigningKeyRequest,
836            >,
837        ) -> std::result::Result<
838            tonic::Response<super::RotateSecureWebhookIntegrationSigningKeyResponse>,
839            tonic::Status,
840        > {
841            self.inner
842                .ready()
843                .await
844                .map_err(|e| {
845                    tonic::Status::unknown(
846                        format!("Service was not ready: {}", e.into()),
847                    )
848                })?;
849            let codec = tonic::codec::ProstCodec::default();
850            let path = http::uri::PathAndQuery::from_static(
851                "/nominal.integrations.v1.IntegrationsService/RotateSecureWebhookIntegrationSigningKey",
852            );
853            let mut req = request.into_request();
854            req.extensions_mut()
855                .insert(
856                    GrpcMethod::new(
857                        "nominal.integrations.v1.IntegrationsService",
858                        "RotateSecureWebhookIntegrationSigningKey",
859                    ),
860                );
861            self.inner.unary(req, path, codec).await
862        }
863    }
864}