#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuditLogDescription {
#[prost(string, optional, tag = "1")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenericWebhookConfig {
#[prost(message, optional, tag = "1")]
pub uuid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "generic_webhook_config::MethodType", tag = "2")]
pub method: i32,
#[prost(map = "string, string", tag = "3")]
pub headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub payload: ::core::option::Option<::prost::alloc::string::String>,
}
pub mod generic_webhook_config {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MethodType {
Unknown = 0,
Get = 1,
Post = 2,
Put = 3,
}
impl MethodType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "UNKNOWN",
Self::Get => "GET",
Self::Post => "POST",
Self::Put => "PUT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"GET" => Some(Self::Get),
"POST" => Some(Self::Post),
"PUT" => Some(Self::Put),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlackConfig {
#[prost(message, repeated, tag = "1")]
pub digests: ::prost::alloc::vec::Vec<slack_config::Digest>,
#[prost(message, repeated, tag = "2")]
pub attachments: ::prost::alloc::vec::Vec<slack_config::Attachment>,
}
pub mod slack_config {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Digest {
#[prost(enumeration = "DigestType", tag = "1")]
pub r#type: i32,
#[prost(message, optional, tag = "2")]
pub is_active: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Attachment {
#[prost(enumeration = "AttachmentType", tag = "1")]
pub r#type: i32,
#[prost(message, optional, tag = "2")]
pub is_active: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DigestType {
Unknown = 0,
ErrorAndCriticalLogs = 1,
FlowAnomalies = 2,
SpikeAnomalies = 3,
DataUsage = 4,
}
impl DigestType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "UNKNOWN",
Self::ErrorAndCriticalLogs => "ERROR_AND_CRITICAL_LOGS",
Self::FlowAnomalies => "FLOW_ANOMALIES",
Self::SpikeAnomalies => "SPIKE_ANOMALIES",
Self::DataUsage => "DATA_USAGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"ERROR_AND_CRITICAL_LOGS" => Some(Self::ErrorAndCriticalLogs),
"FLOW_ANOMALIES" => Some(Self::FlowAnomalies),
"SPIKE_ANOMALIES" => Some(Self::SpikeAnomalies),
"DATA_USAGE" => Some(Self::DataUsage),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AttachmentType {
Empty = 0,
MetricSnapshot = 1,
Logs = 2,
}
impl AttachmentType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Empty => "EMPTY",
Self::MetricSnapshot => "METRIC_SNAPSHOT",
Self::Logs => "LOGS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EMPTY" => Some(Self::Empty),
"METRIC_SNAPSHOT" => Some(Self::MetricSnapshot),
"LOGS" => Some(Self::Logs),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PagerDutyConfig {
#[prost(message, optional, tag = "1")]
pub service_key: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendLogConfig {
#[prost(message, optional, tag = "1")]
pub uuid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub payload: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmailGroupConfig {
#[prost(message, repeated, tag = "1")]
pub email_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MicrosoftTeamsConfig {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsTeamsWorkflowConfig {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JiraConfig {
#[prost(message, optional, tag = "1")]
pub api_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub email: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub project_key: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpsgenieConfig {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DemistoConfig {
#[prost(message, optional, tag = "1")]
pub uuid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub payload: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AwsEventBridgeConfig {
#[prost(message, optional, tag = "1")]
pub event_bus_arn: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub detail: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub detail_type: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub source: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub role_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IbmEventNotificationsConfig {
#[prost(message, optional, tag = "1")]
pub event_notifications_instance_id: ::core::option::Option<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "2")]
pub region_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub source_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub source_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "ibm_event_notifications_config::EndpointType", tag = "5")]
pub endpoint_type: i32,
}
pub mod ibm_event_notifications_config {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum EndpointType {
DefaultOrPublic = 0,
Private = 1,
}
impl EndpointType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::DefaultOrPublic => "ENDPOINT_TYPE_DEFAULT_OR_PUBLIC",
Self::Private => "ENDPOINT_TYPE_PRIVATE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENDPOINT_TYPE_DEFAULT_OR_PUBLIC" => Some(Self::DefaultOrPublic),
"ENDPOINT_TYPE_PRIVATE" => Some(Self::Private),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutgoingWebhook {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "WebhookType", tag = "2")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub external_id: ::core::option::Option<u32>,
#[prost(
oneof = "outgoing_webhook::Config",
tags = "100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111"
)]
pub config: ::core::option::Option<outgoing_webhook::Config>,
}
pub mod outgoing_webhook {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "100")]
GenericWebhook(super::GenericWebhookConfig),
#[prost(message, tag = "101")]
Slack(super::SlackConfig),
#[prost(message, tag = "102")]
PagerDuty(super::PagerDutyConfig),
#[prost(message, tag = "103")]
SendLog(super::SendLogConfig),
#[prost(message, tag = "104")]
EmailGroup(super::EmailGroupConfig),
#[prost(message, tag = "105")]
MicrosoftTeams(super::MicrosoftTeamsConfig),
#[prost(message, tag = "106")]
Jira(super::JiraConfig),
#[prost(message, tag = "107")]
Opsgenie(super::OpsgenieConfig),
#[prost(message, tag = "108")]
Demisto(super::DemistoConfig),
#[prost(message, tag = "109")]
AwsEventBridge(super::AwsEventBridgeConfig),
#[prost(message, tag = "110")]
IbmEventNotifications(super::IbmEventNotificationsConfig),
#[prost(message, tag = "111")]
MsTeamsWorkflow(super::MsTeamsWorkflowConfig),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutgoingWebhookInputData {
#[prost(enumeration = "WebhookType", tag = "1")]
pub r#type: i32,
#[prost(message, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(
oneof = "outgoing_webhook_input_data::Config",
tags = "100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111"
)]
pub config: ::core::option::Option<outgoing_webhook_input_data::Config>,
}
pub mod outgoing_webhook_input_data {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "100")]
GenericWebhook(super::GenericWebhookConfig),
#[prost(message, tag = "101")]
Slack(super::SlackConfig),
#[prost(message, tag = "102")]
PagerDuty(super::PagerDutyConfig),
#[prost(message, tag = "103")]
SendLog(super::SendLogConfig),
#[prost(message, tag = "104")]
EmailGroup(super::EmailGroupConfig),
#[prost(message, tag = "105")]
MicrosoftTeams(super::MicrosoftTeamsConfig),
#[prost(message, tag = "106")]
Jira(super::JiraConfig),
#[prost(message, tag = "107")]
Opsgenie(super::OpsgenieConfig),
#[prost(message, tag = "108")]
Demisto(super::DemistoConfig),
#[prost(message, tag = "109")]
AwsEventBridge(super::AwsEventBridgeConfig),
#[prost(message, tag = "110")]
IbmEventNotifications(super::IbmEventNotificationsConfig),
#[prost(message, tag = "111")]
MsTeamsWorkflow(super::MsTeamsWorkflowConfig),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutgoingWebhookSummary {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub external_id: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutgoingWebhookExtendedSummary {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "WebhookType", tag = "2")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub external_id: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutgoingWebhookDetails {
#[prost(enumeration = "WebhookType", tag = "1")]
pub r#type: i32,
#[prost(message, optional, tag = "2")]
pub label: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutboundWebhookSummary {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "WebhookType", tag = "2")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub external_id: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WebhookType {
Unknown = 0,
Generic = 1,
Slack = 2,
Pagerduty = 3,
SendLog = 4,
EmailGroup = 5,
MicrosoftTeams = 6,
Jira = 7,
Opsgenie = 8,
Demisto = 9,
AwsEventBridge = 10,
IbmEventNotifications = 11,
MsTeamsWorkflow = 12,
}
impl WebhookType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "UNKNOWN",
Self::Generic => "GENERIC",
Self::Slack => "SLACK",
Self::Pagerduty => "PAGERDUTY",
Self::SendLog => "SEND_LOG",
Self::EmailGroup => "EMAIL_GROUP",
Self::MicrosoftTeams => "MICROSOFT_TEAMS",
Self::Jira => "JIRA",
Self::Opsgenie => "OPSGENIE",
Self::Demisto => "DEMISTO",
Self::AwsEventBridge => "AWS_EVENT_BRIDGE",
Self::IbmEventNotifications => "IBM_EVENT_NOTIFICATIONS",
Self::MsTeamsWorkflow => "MS_TEAMS_WORKFLOW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"GENERIC" => Some(Self::Generic),
"SLACK" => Some(Self::Slack),
"PAGERDUTY" => Some(Self::Pagerduty),
"SEND_LOG" => Some(Self::SendLog),
"EMAIL_GROUP" => Some(Self::EmailGroup),
"MICROSOFT_TEAMS" => Some(Self::MicrosoftTeams),
"JIRA" => Some(Self::Jira),
"OPSGENIE" => Some(Self::Opsgenie),
"DEMISTO" => Some(Self::Demisto),
"AWS_EVENT_BRIDGE" => Some(Self::AwsEventBridge),
"IBM_EVENT_NOTIFICATIONS" => Some(Self::IbmEventNotifications),
"MS_TEAMS_WORKFLOW" => Some(Self::MsTeamsWorkflow),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListOutgoingWebhookTypesRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOutgoingWebhookTypesResponse {
#[prost(message, repeated, tag = "1")]
pub webhooks: ::prost::alloc::vec::Vec<
list_outgoing_webhook_types_response::OutgoingWebhookType,
>,
}
pub mod list_outgoing_webhook_types_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutgoingWebhookType {
#[prost(enumeration = "super::WebhookType", tag = "1")]
pub r#type: i32,
#[prost(message, optional, tag = "2")]
pub label: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub count: ::core::option::Option<u32>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetOutgoingWebhookTypeDetailsRequest {
#[prost(enumeration = "WebhookType", tag = "1")]
pub r#type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOutgoingWebhookTypeDetailsResponse {
#[prost(message, optional, tag = "1")]
pub details: ::core::option::Option<OutgoingWebhookDetails>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListOutgoingWebhooksRequest {
#[prost(enumeration = "WebhookType", tag = "1")]
pub r#type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOutgoingWebhooksResponse {
#[prost(message, repeated, tag = "1")]
pub deployed: ::prost::alloc::vec::Vec<OutgoingWebhookSummary>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListAllOutgoingWebhooksRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAllOutgoingWebhooksResponse {
#[prost(message, repeated, tag = "1")]
pub deployed: ::prost::alloc::vec::Vec<OutgoingWebhookExtendedSummary>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListOutboundWebhooksSummaryRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOutboundWebhooksSummaryResponse {
#[prost(message, repeated, tag = "1")]
pub outbound_webhook_summaries: ::prost::alloc::vec::Vec<OutboundWebhookSummary>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOutgoingWebhookRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOutgoingWebhookResponse {
#[prost(message, optional, tag = "1")]
pub webhook: ::core::option::Option<OutgoingWebhook>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOutgoingWebhookRequest {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<OutgoingWebhookInputData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOutgoingWebhookResponse {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateOutgoingWebhookRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub data: ::core::option::Option<OutgoingWebhookInputData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateOutgoingWebhookResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteOutgoingWebhookRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteOutgoingWebhookResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestOutgoingWebhookRequest {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<OutgoingWebhookInputData>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestExistingOutgoingWebhookRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestOutgoingWebhookResponse {
#[prost(oneof = "test_outgoing_webhook_response::Result", tags = "1, 2")]
pub result: ::core::option::Option<test_outgoing_webhook_response::Result>,
}
pub mod test_outgoing_webhook_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Success {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Failure {
#[prost(message, optional, tag = "1")]
pub error_message: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub display_message: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub status_code: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Success(Success),
#[prost(message, tag = "2")]
Failure(Failure),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListIbmEventNotificationsInstancesRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIbmEventNotificationsInstancesResponse {
#[prost(message, repeated, tag = "1")]
pub instances: ::prost::alloc::vec::Vec<
list_ibm_event_notifications_instances_response::EventNotificationsInstance,
>,
}
pub mod list_ibm_event_notifications_instances_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventNotificationsInstance {
#[prost(string, tag = "1")]
pub instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub region_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub crn: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub is_used: bool,
}
}
pub mod outgoing_webhooks_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 OutgoingWebhooksServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl OutgoingWebhooksServiceClient<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> OutgoingWebhooksServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
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,
) -> OutgoingWebhooksServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
OutgoingWebhooksServiceClient::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 list_outgoing_webhook_types(
&mut self,
request: impl tonic::IntoRequest<super::ListOutgoingWebhookTypesRequest>,
) -> std::result::Result<
tonic::Response<super::ListOutgoingWebhookTypesResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/ListOutgoingWebhookTypes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"ListOutgoingWebhookTypes",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_outgoing_webhook_type_details(
&mut self,
request: impl tonic::IntoRequest<super::GetOutgoingWebhookTypeDetailsRequest>,
) -> std::result::Result<
tonic::Response<super::GetOutgoingWebhookTypeDetailsResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/GetOutgoingWebhookTypeDetails",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"GetOutgoingWebhookTypeDetails",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_outgoing_webhooks(
&mut self,
request: impl tonic::IntoRequest<super::ListOutgoingWebhooksRequest>,
) -> std::result::Result<
tonic::Response<super::ListOutgoingWebhooksResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/ListOutgoingWebhooks",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"ListOutgoingWebhooks",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_outbound_webhooks_summary(
&mut self,
request: impl tonic::IntoRequest<super::ListOutboundWebhooksSummaryRequest>,
) -> std::result::Result<
tonic::Response<super::ListOutboundWebhooksSummaryResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/ListOutboundWebhooksSummary",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"ListOutboundWebhooksSummary",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_all_outgoing_webhooks(
&mut self,
request: impl tonic::IntoRequest<super::ListAllOutgoingWebhooksRequest>,
) -> std::result::Result<
tonic::Response<super::ListAllOutgoingWebhooksResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/ListAllOutgoingWebhooks",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"ListAllOutgoingWebhooks",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_outgoing_webhook(
&mut self,
request: impl tonic::IntoRequest<super::GetOutgoingWebhookRequest>,
) -> std::result::Result<
tonic::Response<super::GetOutgoingWebhookResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/GetOutgoingWebhook",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"GetOutgoingWebhook",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_outgoing_webhook(
&mut self,
request: impl tonic::IntoRequest<super::CreateOutgoingWebhookRequest>,
) -> std::result::Result<
tonic::Response<super::CreateOutgoingWebhookResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/CreateOutgoingWebhook",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"CreateOutgoingWebhook",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_outgoing_webhook(
&mut self,
request: impl tonic::IntoRequest<super::UpdateOutgoingWebhookRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateOutgoingWebhookResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/UpdateOutgoingWebhook",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"UpdateOutgoingWebhook",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_outgoing_webhook(
&mut self,
request: impl tonic::IntoRequest<super::DeleteOutgoingWebhookRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteOutgoingWebhookResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/DeleteOutgoingWebhook",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"DeleteOutgoingWebhook",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn test_outgoing_webhook(
&mut self,
request: impl tonic::IntoRequest<super::TestOutgoingWebhookRequest>,
) -> std::result::Result<
tonic::Response<super::TestOutgoingWebhookResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/TestOutgoingWebhook",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"TestOutgoingWebhook",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn test_existing_outgoing_webhook(
&mut self,
request: impl tonic::IntoRequest<super::TestExistingOutgoingWebhookRequest>,
) -> std::result::Result<
tonic::Response<super::TestOutgoingWebhookResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/TestExistingOutgoingWebhook",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"TestExistingOutgoingWebhook",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_ibm_event_notifications_instances(
&mut self,
request: impl tonic::IntoRequest<
super::ListIbmEventNotificationsInstancesRequest,
>,
) -> std::result::Result<
tonic::Response<super::ListIbmEventNotificationsInstancesResponse>,
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(
"/com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService/ListIbmEventNotificationsInstances",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.outgoing_webhooks.v1.OutgoingWebhooksService",
"ListIbmEventNotificationsInstances",
),
);
self.inner.unary(req, path, codec).await
}
}
}