#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Comment {
pub message: ::std::string::String,
}
impl Comment {
pub fn message(&self) -> &str {
use std::ops::Deref;
self.message.deref()
}
}
impl Comment {
pub fn builder() -> crate::types::builders::CommentBuilder {
crate::types::builders::CommentBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CommentBuilder {
pub(crate) message: ::std::option::Option<::std::string::String>,
}
impl CommentBuilder {
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::Comment, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Comment {
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 Comment",
)
})?,
})
}
}