#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessagePayload {
#[prost(message, optional, tag = "1")]
pub header: ::core::option::Option<super::super::make87_messages::core::Header>,
#[prost(string, tag = "2")]
pub topic: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub message: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "message_payload::Priority", optional, tag = "6")]
pub priority: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "7")]
pub actions: ::prost::alloc::vec::Vec<message_payload::Action>,
#[prost(string, optional, tag = "8")]
pub click: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub attach: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "10")]
pub markdown: ::core::option::Option<bool>,
#[prost(string, optional, tag = "11")]
pub icon: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "12")]
pub filename: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "13")]
pub delay: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "14")]
pub email: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "15")]
pub call: ::core::option::Option<::prost::alloc::string::String>,
}
pub mod message_payload {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub clear: bool,
#[prost(oneof = "action::ActionType", tags = "3, 4, 5")]
pub action_type: ::core::option::Option<action::ActionType>,
}
pub mod action {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ActionType {
#[prost(message, tag = "3")]
View(super::ViewAction),
#[prost(message, tag = "4")]
Broadcast(super::BroadcastAction),
#[prost(message, tag = "5")]
Http(super::HttpAction),
}
}
impl ::prost::Name for Action {
const NAME: &'static str = "Action";
const PACKAGE: &'static str = "make87_ntfy.publish";
fn full_name() -> ::prost::alloc::string::String {
"make87_ntfy.publish.MessagePayload.Action".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/make87_ntfy.publish.MessagePayload.Action".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViewAction {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
}
impl ::prost::Name for ViewAction {
const NAME: &'static str = "ViewAction";
const PACKAGE: &'static str = "make87_ntfy.publish";
fn full_name() -> ::prost::alloc::string::String {
"make87_ntfy.publish.MessagePayload.ViewAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/make87_ntfy.publish.MessagePayload.ViewAction".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BroadcastAction {
#[prost(map = "string, string", tag = "1")]
pub extras: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
impl ::prost::Name for BroadcastAction {
const NAME: &'static str = "BroadcastAction";
const PACKAGE: &'static str = "make87_ntfy.publish";
fn full_name() -> ::prost::alloc::string::String {
"make87_ntfy.publish.MessagePayload.BroadcastAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/make87_ntfy.publish.MessagePayload.BroadcastAction".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpAction {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub method: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "3")]
pub headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "4")]
pub body: ::prost::alloc::string::String,
}
impl ::prost::Name for HttpAction {
const NAME: &'static str = "HttpAction";
const PACKAGE: &'static str = "make87_ntfy.publish";
fn full_name() -> ::prost::alloc::string::String {
"make87_ntfy.publish.MessagePayload.HttpAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/make87_ntfy.publish.MessagePayload.HttpAction".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Priority {
Unknown = 0,
Min = 1,
Low = 2,
Default = 3,
High = 4,
Max = 5,
}
impl Priority {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "UNKNOWN",
Self::Min => "PRIORITY_MIN",
Self::Low => "PRIORITY_LOW",
Self::Default => "PRIORITY_DEFAULT",
Self::High => "PRIORITY_HIGH",
Self::Max => "PRIORITY_MAX",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"PRIORITY_MIN" => Some(Self::Min),
"PRIORITY_LOW" => Some(Self::Low),
"PRIORITY_DEFAULT" => Some(Self::Default),
"PRIORITY_HIGH" => Some(Self::High),
"PRIORITY_MAX" => Some(Self::Max),
_ => None,
}
}
}
}
impl ::prost::Name for MessagePayload {
const NAME: &'static str = "MessagePayload";
const PACKAGE: &'static str = "make87_ntfy.publish";
fn full_name() -> ::prost::alloc::string::String {
"make87_ntfy.publish.MessagePayload".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/make87_ntfy.publish.MessagePayload".into()
}
}