#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SendFeedbackInput {
pub case_id: ::std::option::Option<::std::string::String>,
pub result_id: ::std::option::Option<::std::string::String>,
pub usefulness: ::std::option::Option<crate::types::UsefulnessRating>,
pub comment: ::std::option::Option<::std::string::String>,
}
impl SendFeedbackInput {
pub fn case_id(&self) -> ::std::option::Option<&str> {
self.case_id.as_deref()
}
pub fn result_id(&self) -> ::std::option::Option<&str> {
self.result_id.as_deref()
}
pub fn usefulness(&self) -> ::std::option::Option<&crate::types::UsefulnessRating> {
self.usefulness.as_ref()
}
pub fn comment(&self) -> ::std::option::Option<&str> {
self.comment.as_deref()
}
}
impl SendFeedbackInput {
pub fn builder() -> crate::operation::send_feedback::builders::SendFeedbackInputBuilder {
crate::operation::send_feedback::builders::SendFeedbackInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SendFeedbackInputBuilder {
pub(crate) case_id: ::std::option::Option<::std::string::String>,
pub(crate) result_id: ::std::option::Option<::std::string::String>,
pub(crate) usefulness: ::std::option::Option<crate::types::UsefulnessRating>,
pub(crate) comment: ::std::option::Option<::std::string::String>,
}
impl SendFeedbackInputBuilder {
pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.case_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.case_id = input;
self
}
pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
&self.case_id
}
pub fn result_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.result_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_result_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.result_id = input;
self
}
pub fn get_result_id(&self) -> &::std::option::Option<::std::string::String> {
&self.result_id
}
pub fn usefulness(mut self, input: crate::types::UsefulnessRating) -> Self {
self.usefulness = ::std::option::Option::Some(input);
self
}
pub fn set_usefulness(mut self, input: ::std::option::Option<crate::types::UsefulnessRating>) -> Self {
self.usefulness = input;
self
}
pub fn get_usefulness(&self) -> &::std::option::Option<crate::types::UsefulnessRating> {
&self.usefulness
}
pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.comment = ::std::option::Option::Some(input.into());
self
}
pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.comment = input;
self
}
pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
&self.comment
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::send_feedback::SendFeedbackInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::send_feedback::SendFeedbackInput {
case_id: self.case_id,
result_id: self.result_id,
usefulness: self.usefulness,
comment: self.comment,
})
}
}