#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RuleGroupSourceStatefulRulesOptionsDetails {
pub keyword: ::std::option::Option<::std::string::String>,
pub settings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl RuleGroupSourceStatefulRulesOptionsDetails {
pub fn keyword(&self) -> ::std::option::Option<&str> {
self.keyword.as_deref()
}
pub fn settings(&self) -> &[::std::string::String] {
self.settings.as_deref().unwrap_or_default()
}
}
impl RuleGroupSourceStatefulRulesOptionsDetails {
pub fn builder() -> crate::types::builders::RuleGroupSourceStatefulRulesOptionsDetailsBuilder {
crate::types::builders::RuleGroupSourceStatefulRulesOptionsDetailsBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RuleGroupSourceStatefulRulesOptionsDetailsBuilder {
pub(crate) keyword: ::std::option::Option<::std::string::String>,
pub(crate) settings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl RuleGroupSourceStatefulRulesOptionsDetailsBuilder {
pub fn keyword(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.keyword = ::std::option::Option::Some(input.into());
self
}
pub fn set_keyword(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.keyword = input;
self
}
pub fn get_keyword(&self) -> &::std::option::Option<::std::string::String> {
&self.keyword
}
pub fn settings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.settings.unwrap_or_default();
v.push(input.into());
self.settings = ::std::option::Option::Some(v);
self
}
pub fn set_settings(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.settings = input;
self
}
pub fn get_settings(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.settings
}
pub fn build(self) -> crate::types::RuleGroupSourceStatefulRulesOptionsDetails {
crate::types::RuleGroupSourceStatefulRulesOptionsDetails {
keyword: self.keyword,
settings: self.settings,
}
}
}