#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateAnalyzerInput {
pub analyzer_name: ::std::option::Option<::std::string::String>,
pub r#type: ::std::option::Option<crate::types::Type>,
pub archive_rules: ::std::option::Option<::std::vec::Vec<crate::types::InlineArchiveRule>>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateAnalyzerInput {
pub fn analyzer_name(&self) -> ::std::option::Option<&str> {
self.analyzer_name.as_deref()
}
pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
self.r#type.as_ref()
}
pub fn archive_rules(&self) -> ::std::option::Option<&[crate::types::InlineArchiveRule]> {
self.archive_rules.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl CreateAnalyzerInput {
pub fn builder() -> crate::operation::create_analyzer::builders::CreateAnalyzerInputBuilder {
crate::operation::create_analyzer::builders::CreateAnalyzerInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateAnalyzerInputBuilder {
pub(crate) analyzer_name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::Type>,
pub(crate) archive_rules: ::std::option::Option<::std::vec::Vec<crate::types::InlineArchiveRule>>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateAnalyzerInputBuilder {
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 r#type(mut self, input: crate::types::Type) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
&self.r#type
}
pub fn archive_rules(mut self, input: crate::types::InlineArchiveRule) -> Self {
let mut v = self.archive_rules.unwrap_or_default();
v.push(input);
self.archive_rules = ::std::option::Option::Some(v);
self
}
pub fn set_archive_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InlineArchiveRule>>) -> Self {
self.archive_rules = input;
self
}
pub fn get_archive_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InlineArchiveRule>> {
&self.archive_rules
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
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_analyzer::CreateAnalyzerInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::create_analyzer::CreateAnalyzerInput {
analyzer_name: self.analyzer_name,
r#type: self.r#type,
archive_rules: self.archive_rules,
tags: self.tags,
client_token: self.client_token,
})
}
}