#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlackWebhookIntegration {
#[prost(string, tag = "1")]
pub team_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub channel_id: ::prost::alloc::string::String,
#[prost(enumeration = "SlackInstance", optional, tag = "4")]
pub slack_instance: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimpleWebhookIntegration {
#[prost(string, optional, tag = "1")]
pub hmac_secret_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "WebhookContentType", optional, tag = "2")]
pub content_type: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "3")]
pub timeout_seconds: ::core::option::Option<i32>,
#[prost(map = "string, string", tag = "4")]
pub custom_headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WebhookDeliveryConfig {
#[prost(int32, optional, tag = "1")]
pub default_request_timeout_seconds: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "2")]
pub default_max_retries: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "3")]
pub default_retry_interval_seconds: ::core::option::Option<i32>,
#[prost(bool, optional, tag = "4")]
pub default_exponential_backoff: ::core::option::Option<bool>,
#[prost(int32, optional, tag = "5")]
pub default_max_retry_interval_seconds: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "6")]
pub default_delivery_timeout_seconds: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecureWebhookIntegration {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub custom_headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "3")]
pub delivery_config: ::core::option::Option<WebhookDeliveryConfig>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpsgenieIntegration {
#[prost(enumeration = "OpsgenieRegion", tag = "1")]
pub region: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TeamsWebhookIntegration {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PagerDutyIntegration {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntegrationDetails {
#[prost(
oneof = "integration_details::IntegrationDetails",
tags = "1, 2, 3, 4, 5, 6"
)]
pub integration_details: ::core::option::Option<
integration_details::IntegrationDetails,
>,
}
pub mod integration_details {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum IntegrationDetails {
#[prost(message, tag = "1")]
SlackWebhook(super::SlackWebhookIntegration),
#[prost(message, tag = "2")]
Opsgenie(super::OpsgenieIntegration),
#[prost(message, tag = "3")]
SimpleWebhook(super::SimpleWebhookIntegration),
#[prost(message, tag = "4")]
SecureWebhook(super::SecureWebhookIntegration),
#[prost(message, tag = "5")]
TeamsWebhook(super::TeamsWebhookIntegration),
#[prost(message, tag = "6")]
PagerDuty(super::PagerDutyIntegration),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Integration {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub details: ::core::option::Option<IntegrationDetails>,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(string, tag = "6")]
pub created_by: ::prost::alloc::string::String,
#[prost(bool, tag = "7")]
pub archived: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSimpleWebhookDetails {
#[prost(string, tag = "1")]
pub webhook: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub secret: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "WebhookContentType", optional, tag = "3")]
pub content_type: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "4")]
pub timeout_seconds: ::core::option::Option<i32>,
#[prost(map = "string, string", tag = "5")]
pub custom_headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOpsgenieDetails {
#[prost(string, tag = "1")]
pub api_key: ::prost::alloc::string::String,
#[prost(enumeration = "OpsgenieRegion", tag = "2")]
pub region: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTeamsWebhookDetails {
#[prost(string, tag = "1")]
pub webhook: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePagerDutyDetails {
#[prost(string, tag = "1")]
pub routing_key: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIntegrationDetails {
#[prost(oneof = "create_integration_details::Details", tags = "1, 2, 3, 4")]
pub details: ::core::option::Option<create_integration_details::Details>,
}
pub mod create_integration_details {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
#[prost(message, tag = "1")]
SimpleWebhook(super::CreateSimpleWebhookDetails),
#[prost(message, tag = "2")]
Opsgenie(super::CreateOpsgenieDetails),
#[prost(message, tag = "3")]
TeamsWebhook(super::CreateTeamsWebhookDetails),
#[prost(message, tag = "4")]
PagerDuty(super::CreatePagerDutyDetails),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSimpleWebhookDetails {
#[prost(string, tag = "1")]
pub webhook: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub secret: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "WebhookContentType", optional, tag = "3")]
pub content_type: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "4")]
pub timeout_seconds: ::core::option::Option<i32>,
#[prost(map = "string, string", tag = "5")]
pub custom_headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSecureWebhookDetails {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub custom_headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "3")]
pub delivery_config: ::core::option::Option<WebhookDeliveryConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateOpsgenieDetails {
#[prost(string, tag = "1")]
pub api_key: ::prost::alloc::string::String,
#[prost(enumeration = "OpsgenieRegion", tag = "2")]
pub region: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTeamsWebhookDetails {
#[prost(string, tag = "1")]
pub webhook: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePagerDutyDetails {
#[prost(string, tag = "1")]
pub routing_key: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIntegrationDetails {
#[prost(oneof = "update_integration_details::Details", tags = "1, 2, 3, 4, 5")]
pub details: ::core::option::Option<update_integration_details::Details>,
}
pub mod update_integration_details {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
#[prost(message, tag = "1")]
SimpleWebhook(super::UpdateSimpleWebhookDetails),
#[prost(message, tag = "2")]
SecureWebhook(super::UpdateSecureWebhookDetails),
#[prost(message, tag = "3")]
Opsgenie(super::UpdateOpsgenieDetails),
#[prost(message, tag = "4")]
TeamsWebhook(super::UpdateTeamsWebhookDetails),
#[prost(message, tag = "5")]
PagerDuty(super::UpdatePagerDutyDetails),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIntegrationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub details: ::core::option::Option<CreateIntegrationDetails>,
#[prost(string, optional, tag = "4")]
pub workspace: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIntegrationResponse {
#[prost(message, optional, tag = "1")]
pub integration: ::core::option::Option<Integration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSecureWebhookIntegrationRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub workspace: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub integration: ::core::option::Option<SecureWebhookIntegration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSecureWebhookIntegrationResponse {
#[prost(message, optional, tag = "1")]
pub integration: ::core::option::Option<Integration>,
#[prost(string, tag = "2")]
pub signing_key: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendSecureWebhookMessageRequest {
#[prost(string, tag = "1")]
pub integration_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub payload: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "3")]
pub custom_headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub delivery_config: ::core::option::Option<WebhookDeliveryConfig>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SendSecureWebhookMessageResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteIntegrationRequest {
#[prost(string, tag = "1")]
pub integration_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteIntegrationResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIntegrationMetadataRequest {
#[prost(string, tag = "1")]
pub integration_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIntegrationMetadataResponse {
#[prost(message, optional, tag = "1")]
pub integration: ::core::option::Option<Integration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIntegrationDetailsRequest {
#[prost(string, tag = "1")]
pub integration_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub details: ::core::option::Option<UpdateIntegrationDetails>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateIntegrationDetailsResponse {
#[prost(message, optional, tag = "1")]
pub integration: ::core::option::Option<Integration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIntegrationRequest {
#[prost(string, tag = "1")]
pub integration_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIntegrationResponse {
#[prost(message, optional, tag = "1")]
pub integration: ::core::option::Option<Integration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIntegrationsRequest {
#[prost(string, repeated, tag = "1")]
pub workspaces: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "2")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, optional, tag = "3")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIntegrationsResponse {
#[prost(message, repeated, tag = "1")]
pub integrations: ::prost::alloc::vec::Vec<Integration>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendMessageRequest {
#[prost(string, optional, tag = "1")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub opsgenie_alias: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub integration_rid: ::prost::alloc::string::String,
#[prost(enumeration = "super::super::types::Priority", optional, tag = "6")]
pub priority: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SendMessageResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RotateSecureWebhookIntegrationSigningKeyRequest {
#[prost(string, tag = "1")]
pub integration_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RotateSecureWebhookIntegrationSigningKeyResponse {
#[prost(string, tag = "1")]
pub signing_key: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SlackInstance {
Unspecified = 0,
Commercial = 1,
Gov = 2,
}
impl SlackInstance {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SLACK_INSTANCE_UNSPECIFIED",
Self::Commercial => "SLACK_INSTANCE_COMMERCIAL",
Self::Gov => "SLACK_INSTANCE_GOV",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SLACK_INSTANCE_UNSPECIFIED" => Some(Self::Unspecified),
"SLACK_INSTANCE_COMMERCIAL" => Some(Self::Commercial),
"SLACK_INSTANCE_GOV" => Some(Self::Gov),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WebhookContentType {
Unspecified = 0,
ApplicationJson = 1,
ApplicationXWwwFormUrlencoded = 2,
}
impl WebhookContentType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "WEBHOOK_CONTENT_TYPE_UNSPECIFIED",
Self::ApplicationJson => "WEBHOOK_CONTENT_TYPE_APPLICATION_JSON",
Self::ApplicationXWwwFormUrlencoded => {
"WEBHOOK_CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WEBHOOK_CONTENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"WEBHOOK_CONTENT_TYPE_APPLICATION_JSON" => Some(Self::ApplicationJson),
"WEBHOOK_CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED" => {
Some(Self::ApplicationXWwwFormUrlencoded)
}
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpsgenieRegion {
Unspecified = 0,
Us = 1,
Eu = 2,
}
impl OpsgenieRegion {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "OPSGENIE_REGION_UNSPECIFIED",
Self::Us => "OPSGENIE_REGION_US",
Self::Eu => "OPSGENIE_REGION_EU",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OPSGENIE_REGION_UNSPECIFIED" => Some(Self::Unspecified),
"OPSGENIE_REGION_US" => Some(Self::Us),
"OPSGENIE_REGION_EU" => Some(Self::Eu),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IntegrationsError {
InvalidRequest = 0,
}
impl IntegrationsError {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::InvalidRequest => "INTEGRATIONS_ERROR_INVALID_REQUEST",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INTEGRATIONS_ERROR_INVALID_REQUEST" => Some(Self::InvalidRequest),
_ => None,
}
}
}
pub mod integrations_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct IntegrationsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl IntegrationsServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> IntegrationsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> IntegrationsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
IntegrationsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_integration(
&mut self,
request: impl tonic::IntoRequest<super::CreateIntegrationRequest>,
) -> std::result::Result<
tonic::Response<super::CreateIntegrationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/CreateIntegration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"CreateIntegration",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_secure_webhook_integration(
&mut self,
request: impl tonic::IntoRequest<
super::CreateSecureWebhookIntegrationRequest,
>,
) -> std::result::Result<
tonic::Response<super::CreateSecureWebhookIntegrationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/CreateSecureWebhookIntegration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"CreateSecureWebhookIntegration",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn send_secure_webhook_message(
&mut self,
request: impl tonic::IntoRequest<super::SendSecureWebhookMessageRequest>,
) -> std::result::Result<
tonic::Response<super::SendSecureWebhookMessageResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/SendSecureWebhookMessage",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"SendSecureWebhookMessage",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_integration(
&mut self,
request: impl tonic::IntoRequest<super::DeleteIntegrationRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteIntegrationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/DeleteIntegration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"DeleteIntegration",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_integration_metadata(
&mut self,
request: impl tonic::IntoRequest<super::UpdateIntegrationMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateIntegrationMetadataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/UpdateIntegrationMetadata",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"UpdateIntegrationMetadata",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_integration_details(
&mut self,
request: impl tonic::IntoRequest<super::UpdateIntegrationDetailsRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateIntegrationDetailsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/UpdateIntegrationDetails",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"UpdateIntegrationDetails",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_integration(
&mut self,
request: impl tonic::IntoRequest<super::GetIntegrationRequest>,
) -> std::result::Result<
tonic::Response<super::GetIntegrationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/GetIntegration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"GetIntegration",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_integrations(
&mut self,
request: impl tonic::IntoRequest<super::ListIntegrationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListIntegrationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/ListIntegrations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"ListIntegrations",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn send_message(
&mut self,
request: impl tonic::IntoRequest<super::SendMessageRequest>,
) -> std::result::Result<
tonic::Response<super::SendMessageResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/SendMessage",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"SendMessage",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn rotate_secure_webhook_integration_signing_key(
&mut self,
request: impl tonic::IntoRequest<
super::RotateSecureWebhookIntegrationSigningKeyRequest,
>,
) -> std::result::Result<
tonic::Response<super::RotateSecureWebhookIntegrationSigningKeyResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.integrations.v1.IntegrationsService/RotateSecureWebhookIntegrationSigningKey",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.integrations.v1.IntegrationsService",
"RotateSecureWebhookIntegrationSigningKey",
),
);
self.inner.unary(req, path, codec).await
}
}
}