#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Analysis {
pub analyzer: ::std::string::String,
pub result_field: ::std::string::String,
}
impl Analysis {
pub fn analyzer(&self) -> &str {
use std::ops::Deref;
self.analyzer.deref()
}
pub fn result_field(&self) -> &str {
use std::ops::Deref;
self.result_field.deref()
}
}
impl Analysis {
pub fn builder() -> crate::types::builders::AnalysisBuilder {
crate::types::builders::AnalysisBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AnalysisBuilder {
pub(crate) analyzer: ::std::option::Option<::std::string::String>,
pub(crate) result_field: ::std::option::Option<::std::string::String>,
}
impl AnalysisBuilder {
pub fn analyzer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.analyzer = ::std::option::Option::Some(input.into());
self
}
pub fn set_analyzer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.analyzer = input;
self
}
pub fn get_analyzer(&self) -> &::std::option::Option<::std::string::String> {
&self.analyzer
}
pub fn result_field(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.result_field = ::std::option::Option::Some(input.into());
self
}
pub fn set_result_field(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.result_field = input;
self
}
pub fn get_result_field(&self) -> &::std::option::Option<::std::string::String> {
&self.result_field
}
pub fn build(self) -> ::std::result::Result<crate::types::Analysis, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Analysis {
analyzer: self.analyzer.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"analyzer",
"analyzer was not specified but it is required when building Analysis",
)
})?,
result_field: self.result_field.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"result_field",
"result_field was not specified but it is required when building Analysis",
)
})?,
})
}
}