#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateArchiveRuleInput {
pub analyzer_name: ::std::option::Option<::std::string::String>,
pub rule_name: ::std::option::Option<::std::string::String>,
pub filter: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>>,
pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateArchiveRuleInput {
pub fn analyzer_name(&self) -> ::std::option::Option<&str> {
self.analyzer_name.as_deref()
}
pub fn rule_name(&self) -> ::std::option::Option<&str> {
self.rule_name.as_deref()
}
pub fn filter(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Criterion>> {
self.filter.as_ref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl CreateArchiveRuleInput {
pub fn builder() -> crate::operation::create_archive_rule::builders::CreateArchiveRuleInputBuilder {
crate::operation::create_archive_rule::builders::CreateArchiveRuleInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateArchiveRuleInputBuilder {
pub(crate) analyzer_name: ::std::option::Option<::std::string::String>,
pub(crate) rule_name: ::std::option::Option<::std::string::String>,
pub(crate) filter: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateArchiveRuleInputBuilder {
pub fn analyzer_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.analyzer_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_analyzer_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.analyzer_name = input;
self
}
pub fn get_analyzer_name(&self) -> &::std::option::Option<::std::string::String> {
&self.analyzer_name
}
pub fn rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.rule_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.rule_name = input;
self
}
pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
&self.rule_name
}
pub fn filter(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Criterion) -> Self {
let mut hash_map = self.filter.unwrap_or_default();
hash_map.insert(k.into(), v);
self.filter = ::std::option::Option::Some(hash_map);
self
}
pub fn set_filter(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>>) -> Self {
self.filter = input;
self
}
pub fn get_filter(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Criterion>> {
&self.filter
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_archive_rule::CreateArchiveRuleInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_archive_rule::CreateArchiveRuleInput {
analyzer_name: self.analyzer_name,
rule_name: self.rule_name,
filter: self.filter,
client_token: self.client_token,
})
}
}