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