#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GenerateMappingOutput {
pub mapping_template: ::std::string::String,
pub mapping_accuracy: ::std::option::Option<f32>,
_request_id: Option<String>,
}
impl GenerateMappingOutput {
pub fn mapping_template(&self) -> &str {
use std::ops::Deref;
self.mapping_template.deref()
}
pub fn mapping_accuracy(&self) -> ::std::option::Option<f32> {
self.mapping_accuracy
}
}
impl ::aws_types::request_id::RequestId for GenerateMappingOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GenerateMappingOutput {
pub fn builder() -> crate::operation::generate_mapping::builders::GenerateMappingOutputBuilder {
crate::operation::generate_mapping::builders::GenerateMappingOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GenerateMappingOutputBuilder {
pub(crate) mapping_template: ::std::option::Option<::std::string::String>,
pub(crate) mapping_accuracy: ::std::option::Option<f32>,
_request_id: Option<String>,
}
impl GenerateMappingOutputBuilder {
pub fn mapping_template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.mapping_template = ::std::option::Option::Some(input.into());
self
}
pub fn set_mapping_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.mapping_template = input;
self
}
pub fn get_mapping_template(&self) -> &::std::option::Option<::std::string::String> {
&self.mapping_template
}
pub fn mapping_accuracy(mut self, input: f32) -> Self {
self.mapping_accuracy = ::std::option::Option::Some(input);
self
}
pub fn set_mapping_accuracy(mut self, input: ::std::option::Option<f32>) -> Self {
self.mapping_accuracy = input;
self
}
pub fn get_mapping_accuracy(&self) -> &::std::option::Option<f32> {
&self.mapping_accuracy
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::generate_mapping::GenerateMappingOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::generate_mapping::GenerateMappingOutput {
mapping_template: self.mapping_template.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"mapping_template",
"mapping_template was not specified but it is required when building GenerateMappingOutput",
)
})?,
mapping_accuracy: self.mapping_accuracy,
_request_id: self._request_id,
})
}
}