aws_sdk_securityir/operation/send_feedback/
_send_feedback_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SendFeedbackInput {
6 pub case_id: ::std::option::Option<::std::string::String>,
8 pub result_id: ::std::option::Option<::std::string::String>,
10 pub usefulness: ::std::option::Option<crate::types::UsefulnessRating>,
12 pub comment: ::std::option::Option<::std::string::String>,
14}
15impl SendFeedbackInput {
16 pub fn case_id(&self) -> ::std::option::Option<&str> {
18 self.case_id.as_deref()
19 }
20 pub fn result_id(&self) -> ::std::option::Option<&str> {
22 self.result_id.as_deref()
23 }
24 pub fn usefulness(&self) -> ::std::option::Option<&crate::types::UsefulnessRating> {
26 self.usefulness.as_ref()
27 }
28 pub fn comment(&self) -> ::std::option::Option<&str> {
30 self.comment.as_deref()
31 }
32}
33impl SendFeedbackInput {
34 pub fn builder() -> crate::operation::send_feedback::builders::SendFeedbackInputBuilder {
36 crate::operation::send_feedback::builders::SendFeedbackInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct SendFeedbackInputBuilder {
44 pub(crate) case_id: ::std::option::Option<::std::string::String>,
45 pub(crate) result_id: ::std::option::Option<::std::string::String>,
46 pub(crate) usefulness: ::std::option::Option<crate::types::UsefulnessRating>,
47 pub(crate) comment: ::std::option::Option<::std::string::String>,
48}
49impl SendFeedbackInputBuilder {
50 pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.case_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.case_id = input;
59 self
60 }
61 pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.case_id
64 }
65 pub fn result_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.result_id = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_result_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.result_id = input;
74 self
75 }
76 pub fn get_result_id(&self) -> &::std::option::Option<::std::string::String> {
78 &self.result_id
79 }
80 pub fn usefulness(mut self, input: crate::types::UsefulnessRating) -> Self {
83 self.usefulness = ::std::option::Option::Some(input);
84 self
85 }
86 pub fn set_usefulness(mut self, input: ::std::option::Option<crate::types::UsefulnessRating>) -> Self {
88 self.usefulness = input;
89 self
90 }
91 pub fn get_usefulness(&self) -> &::std::option::Option<crate::types::UsefulnessRating> {
93 &self.usefulness
94 }
95 pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.comment = ::std::option::Option::Some(input.into());
98 self
99 }
100 pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.comment = input;
103 self
104 }
105 pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
107 &self.comment
108 }
109 pub fn build(
111 self,
112 ) -> ::std::result::Result<crate::operation::send_feedback::SendFeedbackInput, ::aws_smithy_types::error::operation::BuildError> {
113 ::std::result::Result::Ok(crate::operation::send_feedback::SendFeedbackInput {
114 case_id: self.case_id,
115 result_id: self.result_id,
116 usefulness: self.usefulness,
117 comment: self.comment,
118 })
119 }
120}