#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NotificationConfig {
pub id: ::std::option::Option<::std::string::String>,
pub name: ::std::string::String,
pub type_: ::protobuf::EnumOrUnknown<NotificationType>,
pub config: ::std::option::Option<notification_config::Config>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NotificationConfig {
fn default() -> &'a NotificationConfig {
<NotificationConfig as ::protobuf::Message>::default_instance()
}
}
impl NotificationConfig {
pub fn new() -> NotificationConfig {
::std::default::Default::default()
}
pub fn slack(&self) -> &NotificationSlack {
match self.config {
::std::option::Option::Some(notification_config::Config::Slack(ref v)) => v,
_ => <NotificationSlack as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_slack(&mut self) {
self.config = ::std::option::Option::None;
}
pub fn has_slack(&self) -> bool {
match self.config {
::std::option::Option::Some(notification_config::Config::Slack(..)) => true,
_ => false,
}
}
pub fn set_slack(&mut self, v: NotificationSlack) {
self.config = ::std::option::Option::Some(notification_config::Config::Slack(v))
}
pub fn mut_slack(&mut self) -> &mut NotificationSlack {
if let ::std::option::Option::Some(notification_config::Config::Slack(_)) = self.config {
} else {
self.config = ::std::option::Option::Some(notification_config::Config::Slack(NotificationSlack::new()));
}
match self.config {
::std::option::Option::Some(notification_config::Config::Slack(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_slack(&mut self) -> NotificationSlack {
if self.has_slack() {
match self.config.take() {
::std::option::Option::Some(notification_config::Config::Slack(v)) => v,
_ => panic!(),
}
} else {
NotificationSlack::new()
}
}
pub fn email(&self) -> &NotificationEmail {
match self.config {
::std::option::Option::Some(notification_config::Config::Email(ref v)) => v,
_ => <NotificationEmail as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_email(&mut self) {
self.config = ::std::option::Option::None;
}
pub fn has_email(&self) -> bool {
match self.config {
::std::option::Option::Some(notification_config::Config::Email(..)) => true,
_ => false,
}
}
pub fn set_email(&mut self, v: NotificationEmail) {
self.config = ::std::option::Option::Some(notification_config::Config::Email(v))
}
pub fn mut_email(&mut self) -> &mut NotificationEmail {
if let ::std::option::Option::Some(notification_config::Config::Email(_)) = self.config {
} else {
self.config = ::std::option::Option::Some(notification_config::Config::Email(NotificationEmail::new()));
}
match self.config {
::std::option::Option::Some(notification_config::Config::Email(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_email(&mut self) -> NotificationEmail {
if self.has_email() {
match self.config.take() {
::std::option::Option::Some(notification_config::Config::Email(v)) => v,
_ => panic!(),
}
} else {
NotificationEmail::new()
}
}
pub fn pagerduty(&self) -> &NotificationPagerDuty {
match self.config {
::std::option::Option::Some(notification_config::Config::Pagerduty(ref v)) => v,
_ => <NotificationPagerDuty as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_pagerduty(&mut self) {
self.config = ::std::option::Option::None;
}
pub fn has_pagerduty(&self) -> bool {
match self.config {
::std::option::Option::Some(notification_config::Config::Pagerduty(..)) => true,
_ => false,
}
}
pub fn set_pagerduty(&mut self, v: NotificationPagerDuty) {
self.config = ::std::option::Option::Some(notification_config::Config::Pagerduty(v))
}
pub fn mut_pagerduty(&mut self) -> &mut NotificationPagerDuty {
if let ::std::option::Option::Some(notification_config::Config::Pagerduty(_)) = self.config {
} else {
self.config = ::std::option::Option::Some(notification_config::Config::Pagerduty(NotificationPagerDuty::new()));
}
match self.config {
::std::option::Option::Some(notification_config::Config::Pagerduty(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_pagerduty(&mut self) -> NotificationPagerDuty {
if self.has_pagerduty() {
match self.config.take() {
::std::option::Option::Some(notification_config::Config::Pagerduty(v)) => v,
_ => panic!(),
}
} else {
NotificationPagerDuty::new()
}
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(6);
let mut oneofs = ::std::vec::Vec::with_capacity(1);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"id",
|m: &NotificationConfig| { &m.id },
|m: &mut NotificationConfig| { &mut m.id },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"name",
|m: &NotificationConfig| { &m.name },
|m: &mut NotificationConfig| { &mut m.name },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"type",
|m: &NotificationConfig| { &m.type_ },
|m: &mut NotificationConfig| { &mut m.type_ },
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, NotificationSlack>(
"slack",
NotificationConfig::has_slack,
NotificationConfig::slack,
NotificationConfig::mut_slack,
NotificationConfig::set_slack,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, NotificationEmail>(
"email",
NotificationConfig::has_email,
NotificationConfig::email,
NotificationConfig::mut_email,
NotificationConfig::set_email,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, NotificationPagerDuty>(
"pagerduty",
NotificationConfig::has_pagerduty,
NotificationConfig::pagerduty,
NotificationConfig::mut_pagerduty,
NotificationConfig::set_pagerduty,
));
oneofs.push(notification_config::Config::generated_oneof_descriptor_data());
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NotificationConfig>(
"NotificationConfig",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NotificationConfig {
const NAME: &'static str = "NotificationConfig";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.id = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.name = is.read_string()?;
},
24 => {
self.type_ = is.read_enum_or_unknown()?;
},
8002 => {
self.config = ::std::option::Option::Some(notification_config::Config::Slack(is.read_message()?));
},
8010 => {
self.config = ::std::option::Option::Some(notification_config::Config::Email(is.read_message()?));
},
8018 => {
self.config = ::std::option::Option::Some(notification_config::Config::Pagerduty(is.read_message()?));
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.id.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.name);
}
if self.type_ != ::protobuf::EnumOrUnknown::new(NotificationType::NOTIFICATION_TYPE_UNSET) {
my_size += ::protobuf::rt::int32_size(3, self.type_.value());
}
if let ::std::option::Option::Some(ref v) = self.config {
match v {
¬ification_config::Config::Slack(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
¬ification_config::Config::Email(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
¬ification_config::Config::Pagerduty(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
};
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.id.as_ref() {
os.write_string(1, v)?;
}
if !self.name.is_empty() {
os.write_string(2, &self.name)?;
}
if self.type_ != ::protobuf::EnumOrUnknown::new(NotificationType::NOTIFICATION_TYPE_UNSET) {
os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.type_))?;
}
if let ::std::option::Option::Some(ref v) = self.config {
match v {
¬ification_config::Config::Slack(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(1000, v, os)?;
},
¬ification_config::Config::Email(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(1001, v, os)?;
},
¬ification_config::Config::Pagerduty(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(1002, v, os)?;
},
};
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NotificationConfig {
NotificationConfig::new()
}
fn clear(&mut self) {
self.id = ::std::option::Option::None;
self.name.clear();
self.type_ = ::protobuf::EnumOrUnknown::new(NotificationType::NOTIFICATION_TYPE_UNSET);
self.config = ::std::option::Option::None;
self.config = ::std::option::Option::None;
self.config = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NotificationConfig {
static instance: NotificationConfig = NotificationConfig {
id: ::std::option::Option::None,
name: ::std::string::String::new(),
type_: ::protobuf::EnumOrUnknown::from_i32(0),
config: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NotificationConfig {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("NotificationConfig").unwrap()).clone()
}
}
impl ::std::fmt::Display for NotificationConfig {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NotificationConfig {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod notification_config {
#[derive(Clone,PartialEq,Debug)]
#[non_exhaustive]
pub enum Config {
Slack(super::NotificationSlack),
Email(super::NotificationEmail),
Pagerduty(super::NotificationPagerDuty),
}
impl ::protobuf::Oneof for Config {
}
impl ::protobuf::OneofFull for Config {
fn descriptor() -> ::protobuf::reflect::OneofDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| <super::NotificationConfig as ::protobuf::MessageFull>::descriptor().oneof_by_name("config").unwrap()).clone()
}
}
impl Config {
pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData {
::protobuf::reflect::GeneratedOneofDescriptorData::new::<Config>("config")
}
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NotificationSlack {
pub bot_token: ::std::string::String,
pub channel: ::std::string::String,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NotificationSlack {
fn default() -> &'a NotificationSlack {
<NotificationSlack as ::protobuf::Message>::default_instance()
}
}
impl NotificationSlack {
pub fn new() -> NotificationSlack {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"bot_token",
|m: &NotificationSlack| { &m.bot_token },
|m: &mut NotificationSlack| { &mut m.bot_token },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"channel",
|m: &NotificationSlack| { &m.channel },
|m: &mut NotificationSlack| { &mut m.channel },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NotificationSlack>(
"NotificationSlack",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NotificationSlack {
const NAME: &'static str = "NotificationSlack";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.bot_token = is.read_string()?;
},
18 => {
self.channel = is.read_string()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.bot_token.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.bot_token);
}
if !self.channel.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.channel);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if !self.bot_token.is_empty() {
os.write_string(1, &self.bot_token)?;
}
if !self.channel.is_empty() {
os.write_string(2, &self.channel)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NotificationSlack {
NotificationSlack::new()
}
fn clear(&mut self) {
self.bot_token.clear();
self.channel.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static NotificationSlack {
static instance: NotificationSlack = NotificationSlack {
bot_token: ::std::string::String::new(),
channel: ::std::string::String::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NotificationSlack {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("NotificationSlack").unwrap()).clone()
}
}
impl ::std::fmt::Display for NotificationSlack {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NotificationSlack {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NotificationEmail {
pub type_: ::protobuf::EnumOrUnknown<notification_email::Type>,
pub recipients: ::std::vec::Vec<::std::string::String>,
pub from_address: ::std::string::String,
pub config: ::std::option::Option<notification_email::Config>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NotificationEmail {
fn default() -> &'a NotificationEmail {
<NotificationEmail as ::protobuf::Message>::default_instance()
}
}
impl NotificationEmail {
pub fn new() -> NotificationEmail {
::std::default::Default::default()
}
pub fn smtp(&self) -> &NotificationEmailSMTP {
match self.config {
::std::option::Option::Some(notification_email::Config::Smtp(ref v)) => v,
_ => <NotificationEmailSMTP as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_smtp(&mut self) {
self.config = ::std::option::Option::None;
}
pub fn has_smtp(&self) -> bool {
match self.config {
::std::option::Option::Some(notification_email::Config::Smtp(..)) => true,
_ => false,
}
}
pub fn set_smtp(&mut self, v: NotificationEmailSMTP) {
self.config = ::std::option::Option::Some(notification_email::Config::Smtp(v))
}
pub fn mut_smtp(&mut self) -> &mut NotificationEmailSMTP {
if let ::std::option::Option::Some(notification_email::Config::Smtp(_)) = self.config {
} else {
self.config = ::std::option::Option::Some(notification_email::Config::Smtp(NotificationEmailSMTP::new()));
}
match self.config {
::std::option::Option::Some(notification_email::Config::Smtp(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_smtp(&mut self) -> NotificationEmailSMTP {
if self.has_smtp() {
match self.config.take() {
::std::option::Option::Some(notification_email::Config::Smtp(v)) => v,
_ => panic!(),
}
} else {
NotificationEmailSMTP::new()
}
}
pub fn ses(&self) -> &NotificationEmailSES {
match self.config {
::std::option::Option::Some(notification_email::Config::Ses(ref v)) => v,
_ => <NotificationEmailSES as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_ses(&mut self) {
self.config = ::std::option::Option::None;
}
pub fn has_ses(&self) -> bool {
match self.config {
::std::option::Option::Some(notification_email::Config::Ses(..)) => true,
_ => false,
}
}
pub fn set_ses(&mut self, v: NotificationEmailSES) {
self.config = ::std::option::Option::Some(notification_email::Config::Ses(v))
}
pub fn mut_ses(&mut self) -> &mut NotificationEmailSES {
if let ::std::option::Option::Some(notification_email::Config::Ses(_)) = self.config {
} else {
self.config = ::std::option::Option::Some(notification_email::Config::Ses(NotificationEmailSES::new()));
}
match self.config {
::std::option::Option::Some(notification_email::Config::Ses(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_ses(&mut self) -> NotificationEmailSES {
if self.has_ses() {
match self.config.take() {
::std::option::Option::Some(notification_email::Config::Ses(v)) => v,
_ => panic!(),
}
} else {
NotificationEmailSES::new()
}
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(5);
let mut oneofs = ::std::vec::Vec::with_capacity(1);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"type",
|m: &NotificationEmail| { &m.type_ },
|m: &mut NotificationEmail| { &mut m.type_ },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"recipients",
|m: &NotificationEmail| { &m.recipients },
|m: &mut NotificationEmail| { &mut m.recipients },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"from_address",
|m: &NotificationEmail| { &m.from_address },
|m: &mut NotificationEmail| { &mut m.from_address },
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, NotificationEmailSMTP>(
"smtp",
NotificationEmail::has_smtp,
NotificationEmail::smtp,
NotificationEmail::mut_smtp,
NotificationEmail::set_smtp,
));
fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, NotificationEmailSES>(
"ses",
NotificationEmail::has_ses,
NotificationEmail::ses,
NotificationEmail::mut_ses,
NotificationEmail::set_ses,
));
oneofs.push(notification_email::Config::generated_oneof_descriptor_data());
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NotificationEmail>(
"NotificationEmail",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NotificationEmail {
const NAME: &'static str = "NotificationEmail";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
8 => {
self.type_ = is.read_enum_or_unknown()?;
},
18 => {
self.recipients.push(is.read_string()?);
},
26 => {
self.from_address = is.read_string()?;
},
8002 => {
self.config = ::std::option::Option::Some(notification_email::Config::Smtp(is.read_message()?));
},
8010 => {
self.config = ::std::option::Option::Some(notification_email::Config::Ses(is.read_message()?));
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.type_ != ::protobuf::EnumOrUnknown::new(notification_email::Type::TYPE_UNSET) {
my_size += ::protobuf::rt::int32_size(1, self.type_.value());
}
for value in &self.recipients {
my_size += ::protobuf::rt::string_size(2, &value);
};
if !self.from_address.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.from_address);
}
if let ::std::option::Option::Some(ref v) = self.config {
match v {
¬ification_email::Config::Smtp(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
¬ification_email::Config::Ses(ref v) => {
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
},
};
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if self.type_ != ::protobuf::EnumOrUnknown::new(notification_email::Type::TYPE_UNSET) {
os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.type_))?;
}
for v in &self.recipients {
os.write_string(2, &v)?;
};
if !self.from_address.is_empty() {
os.write_string(3, &self.from_address)?;
}
if let ::std::option::Option::Some(ref v) = self.config {
match v {
¬ification_email::Config::Smtp(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(1000, v, os)?;
},
¬ification_email::Config::Ses(ref v) => {
::protobuf::rt::write_message_field_with_cached_size(1001, v, os)?;
},
};
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NotificationEmail {
NotificationEmail::new()
}
fn clear(&mut self) {
self.type_ = ::protobuf::EnumOrUnknown::new(notification_email::Type::TYPE_UNSET);
self.recipients.clear();
self.from_address.clear();
self.config = ::std::option::Option::None;
self.config = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NotificationEmail {
static instance: NotificationEmail = NotificationEmail {
type_: ::protobuf::EnumOrUnknown::from_i32(0),
recipients: ::std::vec::Vec::new(),
from_address: ::std::string::String::new(),
config: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NotificationEmail {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("NotificationEmail").unwrap()).clone()
}
}
impl ::std::fmt::Display for NotificationEmail {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NotificationEmail {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod notification_email {
#[derive(Clone,PartialEq,Debug)]
#[non_exhaustive]
pub enum Config {
Smtp(super::NotificationEmailSMTP),
Ses(super::NotificationEmailSES),
}
impl ::protobuf::Oneof for Config {
}
impl ::protobuf::OneofFull for Config {
fn descriptor() -> ::protobuf::reflect::OneofDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| <super::NotificationEmail as ::protobuf::MessageFull>::descriptor().oneof_by_name("config").unwrap()).clone()
}
}
impl Config {
pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData {
::protobuf::reflect::GeneratedOneofDescriptorData::new::<Config>("config")
}
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum Type {
TYPE_UNSET = 0,
TYPE_SMTP = 1,
TYPE_SES = 2,
}
impl ::protobuf::Enum for Type {
const NAME: &'static str = "Type";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Type> {
match value {
0 => ::std::option::Option::Some(Type::TYPE_UNSET),
1 => ::std::option::Option::Some(Type::TYPE_SMTP),
2 => ::std::option::Option::Some(Type::TYPE_SES),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<Type> {
match str {
"TYPE_UNSET" => ::std::option::Option::Some(Type::TYPE_UNSET),
"TYPE_SMTP" => ::std::option::Option::Some(Type::TYPE_SMTP),
"TYPE_SES" => ::std::option::Option::Some(Type::TYPE_SES),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [Type] = &[
Type::TYPE_UNSET,
Type::TYPE_SMTP,
Type::TYPE_SES,
];
}
impl ::protobuf::EnumFull for Type {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("NotificationEmail.Type").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for Type {
fn default() -> Self {
Type::TYPE_UNSET
}
}
impl Type {
pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<Type>("NotificationEmail.Type")
}
}
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NotificationEmailSMTP {
pub host: ::std::string::String,
pub port: i32,
pub user: ::std::string::String,
pub password: ::std::string::String,
pub use_tls: bool,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NotificationEmailSMTP {
fn default() -> &'a NotificationEmailSMTP {
<NotificationEmailSMTP as ::protobuf::Message>::default_instance()
}
}
impl NotificationEmailSMTP {
pub fn new() -> NotificationEmailSMTP {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(5);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"host",
|m: &NotificationEmailSMTP| { &m.host },
|m: &mut NotificationEmailSMTP| { &mut m.host },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"port",
|m: &NotificationEmailSMTP| { &m.port },
|m: &mut NotificationEmailSMTP| { &mut m.port },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"user",
|m: &NotificationEmailSMTP| { &m.user },
|m: &mut NotificationEmailSMTP| { &mut m.user },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"password",
|m: &NotificationEmailSMTP| { &m.password },
|m: &mut NotificationEmailSMTP| { &mut m.password },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"use_tls",
|m: &NotificationEmailSMTP| { &m.use_tls },
|m: &mut NotificationEmailSMTP| { &mut m.use_tls },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NotificationEmailSMTP>(
"NotificationEmailSMTP",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NotificationEmailSMTP {
const NAME: &'static str = "NotificationEmailSMTP";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.host = is.read_string()?;
},
16 => {
self.port = is.read_int32()?;
},
26 => {
self.user = is.read_string()?;
},
34 => {
self.password = is.read_string()?;
},
40 => {
self.use_tls = is.read_bool()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.host.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.host);
}
if self.port != 0 {
my_size += ::protobuf::rt::int32_size(2, self.port);
}
if !self.user.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.user);
}
if !self.password.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.password);
}
if self.use_tls != false {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if !self.host.is_empty() {
os.write_string(1, &self.host)?;
}
if self.port != 0 {
os.write_int32(2, self.port)?;
}
if !self.user.is_empty() {
os.write_string(3, &self.user)?;
}
if !self.password.is_empty() {
os.write_string(4, &self.password)?;
}
if self.use_tls != false {
os.write_bool(5, self.use_tls)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NotificationEmailSMTP {
NotificationEmailSMTP::new()
}
fn clear(&mut self) {
self.host.clear();
self.port = 0;
self.user.clear();
self.password.clear();
self.use_tls = false;
self.special_fields.clear();
}
fn default_instance() -> &'static NotificationEmailSMTP {
static instance: NotificationEmailSMTP = NotificationEmailSMTP {
host: ::std::string::String::new(),
port: 0,
user: ::std::string::String::new(),
password: ::std::string::String::new(),
use_tls: false,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NotificationEmailSMTP {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("NotificationEmailSMTP").unwrap()).clone()
}
}
impl ::std::fmt::Display for NotificationEmailSMTP {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NotificationEmailSMTP {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NotificationEmailSES {
pub ses_region: ::std::string::String,
pub ses_access_key_id: ::std::string::String,
pub ses_secret_access_key: ::std::string::String,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NotificationEmailSES {
fn default() -> &'a NotificationEmailSES {
<NotificationEmailSES as ::protobuf::Message>::default_instance()
}
}
impl NotificationEmailSES {
pub fn new() -> NotificationEmailSES {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(3);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"ses_region",
|m: &NotificationEmailSES| { &m.ses_region },
|m: &mut NotificationEmailSES| { &mut m.ses_region },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"ses_access_key_id",
|m: &NotificationEmailSES| { &m.ses_access_key_id },
|m: &mut NotificationEmailSES| { &mut m.ses_access_key_id },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"ses_secret_access_key",
|m: &NotificationEmailSES| { &m.ses_secret_access_key },
|m: &mut NotificationEmailSES| { &mut m.ses_secret_access_key },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NotificationEmailSES>(
"NotificationEmailSES",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NotificationEmailSES {
const NAME: &'static str = "NotificationEmailSES";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.ses_region = is.read_string()?;
},
18 => {
self.ses_access_key_id = is.read_string()?;
},
26 => {
self.ses_secret_access_key = is.read_string()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.ses_region.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.ses_region);
}
if !self.ses_access_key_id.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.ses_access_key_id);
}
if !self.ses_secret_access_key.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.ses_secret_access_key);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if !self.ses_region.is_empty() {
os.write_string(1, &self.ses_region)?;
}
if !self.ses_access_key_id.is_empty() {
os.write_string(2, &self.ses_access_key_id)?;
}
if !self.ses_secret_access_key.is_empty() {
os.write_string(3, &self.ses_secret_access_key)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NotificationEmailSES {
NotificationEmailSES::new()
}
fn clear(&mut self) {
self.ses_region.clear();
self.ses_access_key_id.clear();
self.ses_secret_access_key.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static NotificationEmailSES {
static instance: NotificationEmailSES = NotificationEmailSES {
ses_region: ::std::string::String::new(),
ses_access_key_id: ::std::string::String::new(),
ses_secret_access_key: ::std::string::String::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NotificationEmailSES {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("NotificationEmailSES").unwrap()).clone()
}
}
impl ::std::fmt::Display for NotificationEmailSES {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NotificationEmailSES {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NotificationPagerDuty {
pub token: ::std::string::String,
pub email: ::std::string::String,
pub service_id: ::std::string::String,
pub urgency: ::protobuf::EnumOrUnknown<notification_pager_duty::Urgency>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NotificationPagerDuty {
fn default() -> &'a NotificationPagerDuty {
<NotificationPagerDuty as ::protobuf::Message>::default_instance()
}
}
impl NotificationPagerDuty {
pub fn new() -> NotificationPagerDuty {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"token",
|m: &NotificationPagerDuty| { &m.token },
|m: &mut NotificationPagerDuty| { &mut m.token },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"email",
|m: &NotificationPagerDuty| { &m.email },
|m: &mut NotificationPagerDuty| { &mut m.email },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"service_id",
|m: &NotificationPagerDuty| { &m.service_id },
|m: &mut NotificationPagerDuty| { &mut m.service_id },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"urgency",
|m: &NotificationPagerDuty| { &m.urgency },
|m: &mut NotificationPagerDuty| { &mut m.urgency },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NotificationPagerDuty>(
"NotificationPagerDuty",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NotificationPagerDuty {
const NAME: &'static str = "NotificationPagerDuty";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.token = is.read_string()?;
},
18 => {
self.email = is.read_string()?;
},
26 => {
self.service_id = is.read_string()?;
},
32 => {
self.urgency = is.read_enum_or_unknown()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.token.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.token);
}
if !self.email.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.email);
}
if !self.service_id.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.service_id);
}
if self.urgency != ::protobuf::EnumOrUnknown::new(notification_pager_duty::Urgency::URGENCY_UNSET) {
my_size += ::protobuf::rt::int32_size(4, self.urgency.value());
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if !self.token.is_empty() {
os.write_string(1, &self.token)?;
}
if !self.email.is_empty() {
os.write_string(2, &self.email)?;
}
if !self.service_id.is_empty() {
os.write_string(3, &self.service_id)?;
}
if self.urgency != ::protobuf::EnumOrUnknown::new(notification_pager_duty::Urgency::URGENCY_UNSET) {
os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.urgency))?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NotificationPagerDuty {
NotificationPagerDuty::new()
}
fn clear(&mut self) {
self.token.clear();
self.email.clear();
self.service_id.clear();
self.urgency = ::protobuf::EnumOrUnknown::new(notification_pager_duty::Urgency::URGENCY_UNSET);
self.special_fields.clear();
}
fn default_instance() -> &'static NotificationPagerDuty {
static instance: NotificationPagerDuty = NotificationPagerDuty {
token: ::std::string::String::new(),
email: ::std::string::String::new(),
service_id: ::std::string::String::new(),
urgency: ::protobuf::EnumOrUnknown::from_i32(0),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NotificationPagerDuty {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("NotificationPagerDuty").unwrap()).clone()
}
}
impl ::std::fmt::Display for NotificationPagerDuty {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NotificationPagerDuty {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod notification_pager_duty {
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum Urgency {
URGENCY_UNSET = 0,
URGENCY_LOW = 1,
URGENCY_HIGH = 2,
}
impl ::protobuf::Enum for Urgency {
const NAME: &'static str = "Urgency";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Urgency> {
match value {
0 => ::std::option::Option::Some(Urgency::URGENCY_UNSET),
1 => ::std::option::Option::Some(Urgency::URGENCY_LOW),
2 => ::std::option::Option::Some(Urgency::URGENCY_HIGH),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<Urgency> {
match str {
"URGENCY_UNSET" => ::std::option::Option::Some(Urgency::URGENCY_UNSET),
"URGENCY_LOW" => ::std::option::Option::Some(Urgency::URGENCY_LOW),
"URGENCY_HIGH" => ::std::option::Option::Some(Urgency::URGENCY_HIGH),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [Urgency] = &[
Urgency::URGENCY_UNSET,
Urgency::URGENCY_LOW,
Urgency::URGENCY_HIGH,
];
}
impl ::protobuf::EnumFull for Urgency {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("NotificationPagerDuty.Urgency").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for Urgency {
fn default() -> Self {
Urgency::URGENCY_UNSET
}
}
impl Urgency {
pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<Urgency>("NotificationPagerDuty.Urgency")
}
}
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum NotificationType {
NOTIFICATION_TYPE_UNSET = 0,
NOTIFICATION_TYPE_SLACK = 1,
NOTIFICATION_TYPE_EMAIL = 2,
NOTIFICATION_TYPE_PAGERDUTY = 3,
}
impl ::protobuf::Enum for NotificationType {
const NAME: &'static str = "NotificationType";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<NotificationType> {
match value {
0 => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_UNSET),
1 => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_SLACK),
2 => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_EMAIL),
3 => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_PAGERDUTY),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<NotificationType> {
match str {
"NOTIFICATION_TYPE_UNSET" => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_UNSET),
"NOTIFICATION_TYPE_SLACK" => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_SLACK),
"NOTIFICATION_TYPE_EMAIL" => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_EMAIL),
"NOTIFICATION_TYPE_PAGERDUTY" => ::std::option::Option::Some(NotificationType::NOTIFICATION_TYPE_PAGERDUTY),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [NotificationType] = &[
NotificationType::NOTIFICATION_TYPE_UNSET,
NotificationType::NOTIFICATION_TYPE_SLACK,
NotificationType::NOTIFICATION_TYPE_EMAIL,
NotificationType::NOTIFICATION_TYPE_PAGERDUTY,
];
}
impl ::protobuf::EnumFull for NotificationType {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().enum_by_package_relative_name("NotificationType").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for NotificationType {
fn default() -> Self {
NotificationType::NOTIFICATION_TYPE_UNSET
}
}
impl NotificationType {
fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<NotificationType>("NotificationType")
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0fsp_notify.proto\x12\x06protos\"\xa4\x02\n\x12NotificationConfig\
\x12\x13\n\x02id\x18\x01\x20\x01(\tH\x01R\x02id\x88\x01\x01\x12\x12\n\
\x04name\x18\x02\x20\x01(\tR\x04name\x12,\n\x04type\x18\x03\x20\x01(\x0e\
2\x18.protos.NotificationTypeR\x04type\x122\n\x05slack\x18\xe8\x07\x20\
\x01(\x0b2\x19.protos.NotificationSlackH\0R\x05slack\x122\n\x05email\x18\
\xe9\x07\x20\x01(\x0b2\x19.protos.NotificationEmailH\0R\x05email\x12>\n\
\tpagerduty\x18\xea\x07\x20\x01(\x0b2\x1d.protos.NotificationPagerDutyH\
\0R\tpagerdutyB\x08\n\x06configB\x05\n\x03_id\"J\n\x11NotificationSlack\
\x12\x1b\n\tbot_token\x18\x01\x20\x01(\tR\x08botToken\x12\x18\n\x07chann\
el\x18\x02\x20\x01(\tR\x07channel\"\xb2\x02\n\x11NotificationEmail\x122\
\n\x04type\x18\x01\x20\x01(\x0e2\x1e.protos.NotificationEmail.TypeR\x04t\
ype\x12\x1e\n\nrecipients\x18\x02\x20\x03(\tR\nrecipients\x12!\n\x0cfrom\
_address\x18\x03\x20\x01(\tR\x0bfromAddress\x124\n\x04smtp\x18\xe8\x07\
\x20\x01(\x0b2\x1d.protos.NotificationEmailSMTPH\0R\x04smtp\x121\n\x03se\
s\x18\xe9\x07\x20\x01(\x0b2\x1c.protos.NotificationEmailSESH\0R\x03ses\"\
3\n\x04Type\x12\x0e\n\nTYPE_UNSET\x10\0\x12\r\n\tTYPE_SMTP\x10\x01\x12\
\x0c\n\x08TYPE_SES\x10\x02B\x08\n\x06config\"\x88\x01\n\x15NotificationE\
mailSMTP\x12\x12\n\x04host\x18\x01\x20\x01(\tR\x04host\x12\x12\n\x04port\
\x18\x02\x20\x01(\x05R\x04port\x12\x12\n\x04user\x18\x03\x20\x01(\tR\x04\
user\x12\x1a\n\x08password\x18\x04\x20\x01(\tR\x08password\x12\x17\n\x07\
use_tls\x18\x05\x20\x01(\x08R\x06useTls\"\x93\x01\n\x14NotificationEmail\
SES\x12\x1d\n\nses_region\x18\x01\x20\x01(\tR\tsesRegion\x12)\n\x11ses_a\
ccess_key_id\x18\x02\x20\x01(\tR\x0esesAccessKeyId\x121\n\x15ses_secret_\
access_key\x18\x03\x20\x01(\tR\x12sesSecretAccessKey\"\xe4\x01\n\x15Noti\
ficationPagerDuty\x12\x14\n\x05token\x18\x01\x20\x01(\tR\x05token\x12\
\x14\n\x05email\x18\x02\x20\x01(\tR\x05email\x12\x1d\n\nservice_id\x18\
\x03\x20\x01(\tR\tserviceId\x12?\n\x07urgency\x18\x04\x20\x01(\x0e2%.pro\
tos.NotificationPagerDuty.UrgencyR\x07urgency\"?\n\x07Urgency\x12\x11\n\
\rURGENCY_UNSET\x10\0\x12\x0f\n\x0bURGENCY_LOW\x10\x01\x12\x10\n\x0cURGE\
NCY_HIGH\x10\x02*\x8a\x01\n\x10NotificationType\x12\x1b\n\x17NOTIFICATIO\
N_TYPE_UNSET\x10\0\x12\x1b\n\x17NOTIFICATION_TYPE_SLACK\x10\x01\x12\x1b\
\n\x17NOTIFICATION_TYPE_EMAIL\x10\x02\x12\x1f\n\x1bNOTIFICATION_TYPE_PAG\
ERDUTY\x10\x03B<Z:github.com/streamdal/streamdal/libs/protos/build/go/pr\
otosJ\xe3\x11\n\x06\x12\x04\0\0R\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\
\x08\n\x01\x02\x12\x03\x02\0\x0f\n\x08\n\x01\x08\x12\x03\x04\0Q\n\t\n\
\x02\x08\x0b\x12\x03\x04\0Q\n\n\n\x02\x05\0\x12\x04\x06\0\x0b\x01\n\n\n\
\x03\x05\0\x01\x12\x03\x06\x05\x15\n\x0b\n\x04\x05\0\x02\0\x12\x03\x07\
\x02\x1e\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x07\x02\x19\n\x0c\n\x05\x05\
\0\x02\0\x02\x12\x03\x07\x1c\x1d\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x08\
\x02\x1e\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x08\x02\x19\n\x0c\n\x05\
\x05\0\x02\x01\x02\x12\x03\x08\x1c\x1d\n\x0b\n\x04\x05\0\x02\x02\x12\x03\
\t\x02\x1e\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\t\x02\x19\n\x0c\n\x05\
\x05\0\x02\x02\x02\x12\x03\t\x1c\x1d\n\x0b\n\x04\x05\0\x02\x03\x12\x03\n\
\x02\"\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\n\x02\x1d\n\x0c\n\x05\x05\0\
\x02\x03\x02\x12\x03\n\x20!\n\n\n\x02\x04\0\x12\x04\r\0\x19\x01\n\n\n\
\x03\x04\0\x01\x12\x03\r\x08\x1a\n\x0b\n\x04\x04\0\x02\0\x12\x03\x0e\x02\
\x19\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x0e\x02\n\n\x0c\n\x05\x04\0\x02\
\0\x05\x12\x03\x0e\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x0e\x12\
\x14\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x0e\x17\x18\n\x0b\n\x04\x04\0\
\x02\x01\x12\x03\x10\x02\x12\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x10\
\x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x10\t\r\n\x0c\n\x05\x04\0\
\x02\x01\x03\x12\x03\x10\x10\x11\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x12\
\x02\x1c\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03\x12\x02\x12\n\x0c\n\x05\
\x04\0\x02\x02\x01\x12\x03\x12\x13\x17\n\x0c\n\x05\x04\0\x02\x02\x03\x12\
\x03\x12\x1a\x1b\n\x0c\n\x04\x04\0\x08\0\x12\x04\x14\x02\x18\x03\n\x0c\n\
\x05\x04\0\x08\0\x01\x12\x03\x14\x08\x0e\n\x0b\n\x04\x04\0\x02\x03\x12\
\x03\x15\x04#\n\x0c\n\x05\x04\0\x02\x03\x06\x12\x03\x15\x04\x15\n\x0c\n\
\x05\x04\0\x02\x03\x01\x12\x03\x15\x16\x1b\n\x0c\n\x05\x04\0\x02\x03\x03\
\x12\x03\x15\x1e\"\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x16\x04#\n\x0c\n\
\x05\x04\0\x02\x04\x06\x12\x03\x16\x04\x15\n\x0c\n\x05\x04\0\x02\x04\x01\
\x12\x03\x16\x16\x1b\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x16\x1e\"\n\
\x0b\n\x04\x04\0\x02\x05\x12\x03\x17\x04+\n\x0c\n\x05\x04\0\x02\x05\x06\
\x12\x03\x17\x04\x19\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x03\x17\x1a#\n\
\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\x17&*\n\n\n\x02\x04\x01\x12\x04\x1b\
\0\x1e\x01\n\n\n\x03\x04\x01\x01\x12\x03\x1b\x08\x19\n\x0b\n\x04\x04\x01\
\x02\0\x12\x03\x1c\x02\x17\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x1c\x02\
\x08\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x1c\t\x12\n\x0c\n\x05\x04\x01\
\x02\0\x03\x12\x03\x1c\x15\x16\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x1d\
\x02\x15\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x1d\x02\x08\n\x0c\n\x05\
\x04\x01\x02\x01\x01\x12\x03\x1d\t\x10\n\x0c\n\x05\x04\x01\x02\x01\x03\
\x12\x03\x1d\x13\x14\n\n\n\x02\x04\x02\x12\x04\x20\01\x01\n\n\n\x03\x04\
\x02\x01\x12\x03\x20\x08\x19\n\x0c\n\x04\x04\x02\x04\0\x12\x04!\x02%\x03\
\n\x0c\n\x05\x04\x02\x04\0\x01\x12\x03!\x07\x0b\n\r\n\x06\x04\x02\x04\0\
\x02\0\x12\x03\"\x04\x13\n\x0e\n\x07\x04\x02\x04\0\x02\0\x01\x12\x03\"\
\x04\x0e\n\x0e\n\x07\x04\x02\x04\0\x02\0\x02\x12\x03\"\x11\x12\n\r\n\x06\
\x04\x02\x04\0\x02\x01\x12\x03#\x04\x12\n\x0e\n\x07\x04\x02\x04\0\x02\
\x01\x01\x12\x03#\x04\r\n\x0e\n\x07\x04\x02\x04\0\x02\x01\x02\x12\x03#\
\x10\x11\n\r\n\x06\x04\x02\x04\0\x02\x02\x12\x03$\x04\x11\n\x0e\n\x07\
\x04\x02\x04\0\x02\x02\x01\x12\x03$\x04\x0c\n\x0e\n\x07\x04\x02\x04\0\
\x02\x02\x02\x12\x03$\x0f\x10\n\x0b\n\x04\x04\x02\x02\0\x12\x03'\x02\x10\
\n\x0c\n\x05\x04\x02\x02\0\x06\x12\x03'\x02\x06\n\x0c\n\x05\x04\x02\x02\
\0\x01\x12\x03'\x07\x0b\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03'\x0e\x0f\n\
\x0b\n\x04\x04\x02\x02\x01\x12\x03)\x02!\n\x0c\n\x05\x04\x02\x02\x01\x04\
\x12\x03)\x02\n\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03)\x0b\x11\n\x0c\n\
\x05\x04\x02\x02\x01\x01\x12\x03)\x12\x1c\n\x0c\n\x05\x04\x02\x02\x01\
\x03\x12\x03)\x1f\x20\n\x0b\n\x04\x04\x02\x02\x02\x12\x03+\x02\x1a\n\x0c\
\n\x05\x04\x02\x02\x02\x05\x12\x03+\x02\x08\n\x0c\n\x05\x04\x02\x02\x02\
\x01\x12\x03+\t\x15\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03+\x18\x19\n\
\x0c\n\x04\x04\x02\x08\0\x12\x04-\x020\x03\n\x0c\n\x05\x04\x02\x08\0\x01\
\x12\x03-\x08\x0e\n\x0b\n\x04\x04\x02\x02\x03\x12\x03.\x04&\n\x0c\n\x05\
\x04\x02\x02\x03\x06\x12\x03.\x04\x19\n\x0c\n\x05\x04\x02\x02\x03\x01\
\x12\x03.\x1a\x1e\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03.!%\n\x0b\n\x04\
\x04\x02\x02\x04\x12\x03/\x04$\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03/\
\x04\x18\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03/\x19\x1c\n\x0c\n\x05\
\x04\x02\x02\x04\x03\x12\x03/\x1f#\n\n\n\x02\x04\x03\x12\x043\09\x01\n\n\
\n\x03\x04\x03\x01\x12\x033\x08\x1d\n\x0b\n\x04\x04\x03\x02\0\x12\x034\
\x02\x12\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x034\x02\x08\n\x0c\n\x05\x04\
\x03\x02\0\x01\x12\x034\t\r\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x034\x10\
\x11\n\x0b\n\x04\x04\x03\x02\x01\x12\x035\x02\x11\n\x0c\n\x05\x04\x03\
\x02\x01\x05\x12\x035\x02\x07\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x035\
\x08\x0c\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x035\x0f\x10\n\x0b\n\x04\
\x04\x03\x02\x02\x12\x036\x02\x12\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\
\x036\x02\x08\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x036\t\r\n\x0c\n\x05\
\x04\x03\x02\x02\x03\x12\x036\x10\x11\n\x0b\n\x04\x04\x03\x02\x03\x12\
\x037\x02\x16\n\x0c\n\x05\x04\x03\x02\x03\x05\x12\x037\x02\x08\n\x0c\n\
\x05\x04\x03\x02\x03\x01\x12\x037\t\x11\n\x0c\n\x05\x04\x03\x02\x03\x03\
\x12\x037\x14\x15\n\x0b\n\x04\x04\x03\x02\x04\x12\x038\x02\x13\n\x0c\n\
\x05\x04\x03\x02\x04\x05\x12\x038\x02\x06\n\x0c\n\x05\x04\x03\x02\x04\
\x01\x12\x038\x07\x0e\n\x0c\n\x05\x04\x03\x02\x04\x03\x12\x038\x11\x12\n\
\n\n\x02\x04\x04\x12\x04;\0?\x01\n\n\n\x03\x04\x04\x01\x12\x03;\x08\x1c\
\n\x0b\n\x04\x04\x04\x02\0\x12\x03<\x02\x18\n\x0c\n\x05\x04\x04\x02\0\
\x05\x12\x03<\x02\x08\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03<\t\x13\n\x0c\
\n\x05\x04\x04\x02\0\x03\x12\x03<\x16\x17\n\x0b\n\x04\x04\x04\x02\x01\
\x12\x03=\x02\x1f\n\x0c\n\x05\x04\x04\x02\x01\x05\x12\x03=\x02\x08\n\x0c\
\n\x05\x04\x04\x02\x01\x01\x12\x03=\t\x1a\n\x0c\n\x05\x04\x04\x02\x01\
\x03\x12\x03=\x1d\x1e\n\x0b\n\x04\x04\x04\x02\x02\x12\x03>\x02#\n\x0c\n\
\x05\x04\x04\x02\x02\x05\x12\x03>\x02\x08\n\x0c\n\x05\x04\x04\x02\x02\
\x01\x12\x03>\t\x1e\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03>!\"\n\n\n\
\x02\x04\x05\x12\x04A\0R\x01\n\n\n\x03\x04\x05\x01\x12\x03A\x08\x1d\n\
\x0c\n\x04\x04\x05\x04\0\x12\x04B\x02F\x03\n\x0c\n\x05\x04\x05\x04\0\x01\
\x12\x03B\x07\x0e\n\r\n\x06\x04\x05\x04\0\x02\0\x12\x03C\x04\x16\n\x0e\n\
\x07\x04\x05\x04\0\x02\0\x01\x12\x03C\x04\x11\n\x0e\n\x07\x04\x05\x04\0\
\x02\0\x02\x12\x03C\x14\x15\n\r\n\x06\x04\x05\x04\0\x02\x01\x12\x03D\x04\
\x14\n\x0e\n\x07\x04\x05\x04\0\x02\x01\x01\x12\x03D\x04\x0f\n\x0e\n\x07\
\x04\x05\x04\0\x02\x01\x02\x12\x03D\x12\x13\n\r\n\x06\x04\x05\x04\0\x02\
\x02\x12\x03E\x04\x15\n\x0e\n\x07\x04\x05\x04\0\x02\x02\x01\x12\x03E\x04\
\x10\n\x0e\n\x07\x04\x05\x04\0\x02\x02\x02\x12\x03E\x13\x14\n\x19\n\x04\
\x04\x05\x02\0\x12\x03I\x02\x13\x1a\x0c\x20Auth\x20token\n\n\x0c\n\x05\
\x04\x05\x02\0\x05\x12\x03I\x02\x08\n\x0c\n\x05\x04\x05\x02\0\x01\x12\
\x03I\t\x0e\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03I\x11\x12\n9\n\x04\x04\
\x05\x02\x01\x12\x03L\x02\x13\x1a,\x20Must\x20be\x20a\x20valid\x20email\
\x20for\x20a\x20PagerDuty\x20user\n\n\x0c\n\x05\x04\x05\x02\x01\x05\x12\
\x03L\x02\x08\n\x0c\n\x05\x04\x05\x02\x01\x01\x12\x03L\t\x0e\n\x0c\n\x05\
\x04\x05\x02\x01\x03\x12\x03L\x11\x12\n0\n\x04\x04\x05\x02\x02\x12\x03O\
\x02\x18\x1a#\x20Must\x20be\x20a\x20valid\x20PagerDuty\x20service\n\n\
\x0c\n\x05\x04\x05\x02\x02\x05\x12\x03O\x02\x08\n\x0c\n\x05\x04\x05\x02\
\x02\x01\x12\x03O\t\x13\n\x0c\n\x05\x04\x05\x02\x02\x03\x12\x03O\x16\x17\
\n\x0b\n\x04\x04\x05\x02\x03\x12\x03Q\x02\x16\n\x0c\n\x05\x04\x05\x02\
\x03\x06\x12\x03Q\x02\t\n\x0c\n\x05\x04\x05\x02\x03\x01\x12\x03Q\n\x11\n\
\x0c\n\x05\x04\x05\x02\x03\x03\x12\x03Q\x14\x15b\x06proto3\
";
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
file_descriptor_proto_lazy.get(|| {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
})
}
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(0);
let mut messages = ::std::vec::Vec::with_capacity(6);
messages.push(NotificationConfig::generated_message_descriptor_data());
messages.push(NotificationSlack::generated_message_descriptor_data());
messages.push(NotificationEmail::generated_message_descriptor_data());
messages.push(NotificationEmailSMTP::generated_message_descriptor_data());
messages.push(NotificationEmailSES::generated_message_descriptor_data());
messages.push(NotificationPagerDuty::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(3);
enums.push(NotificationType::generated_enum_descriptor_data());
enums.push(notification_email::Type::generated_enum_descriptor_data());
enums.push(notification_pager_duty::Urgency::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}