aws_sdk_codeguruprofiler/operation/submit_feedback/
_submit_feedback_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SubmitFeedbackInput {
7 pub profiling_group_name: ::std::option::Option<::std::string::String>,
9 pub anomaly_instance_id: ::std::option::Option<::std::string::String>,
11 pub r#type: ::std::option::Option<crate::types::FeedbackType>,
13 pub comment: ::std::option::Option<::std::string::String>,
15}
16impl SubmitFeedbackInput {
17 pub fn profiling_group_name(&self) -> ::std::option::Option<&str> {
19 self.profiling_group_name.as_deref()
20 }
21 pub fn anomaly_instance_id(&self) -> ::std::option::Option<&str> {
23 self.anomaly_instance_id.as_deref()
24 }
25 pub fn r#type(&self) -> ::std::option::Option<&crate::types::FeedbackType> {
27 self.r#type.as_ref()
28 }
29 pub fn comment(&self) -> ::std::option::Option<&str> {
31 self.comment.as_deref()
32 }
33}
34impl SubmitFeedbackInput {
35 pub fn builder() -> crate::operation::submit_feedback::builders::SubmitFeedbackInputBuilder {
37 crate::operation::submit_feedback::builders::SubmitFeedbackInputBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct SubmitFeedbackInputBuilder {
45 pub(crate) profiling_group_name: ::std::option::Option<::std::string::String>,
46 pub(crate) anomaly_instance_id: ::std::option::Option<::std::string::String>,
47 pub(crate) r#type: ::std::option::Option<crate::types::FeedbackType>,
48 pub(crate) comment: ::std::option::Option<::std::string::String>,
49}
50impl SubmitFeedbackInputBuilder {
51 pub fn profiling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.profiling_group_name = ::std::option::Option::Some(input.into());
55 self
56 }
57 pub fn set_profiling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.profiling_group_name = input;
60 self
61 }
62 pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
64 &self.profiling_group_name
65 }
66 pub fn anomaly_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.anomaly_instance_id = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_anomaly_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.anomaly_instance_id = input;
75 self
76 }
77 pub fn get_anomaly_instance_id(&self) -> &::std::option::Option<::std::string::String> {
79 &self.anomaly_instance_id
80 }
81 pub fn r#type(mut self, input: crate::types::FeedbackType) -> Self {
84 self.r#type = ::std::option::Option::Some(input);
85 self
86 }
87 pub fn set_type(mut self, input: ::std::option::Option<crate::types::FeedbackType>) -> Self {
89 self.r#type = input;
90 self
91 }
92 pub fn get_type(&self) -> &::std::option::Option<crate::types::FeedbackType> {
94 &self.r#type
95 }
96 pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.comment = ::std::option::Option::Some(input.into());
99 self
100 }
101 pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.comment = input;
104 self
105 }
106 pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
108 &self.comment
109 }
110 pub fn build(
112 self,
113 ) -> ::std::result::Result<crate::operation::submit_feedback::SubmitFeedbackInput, ::aws_smithy_types::error::operation::BuildError> {
114 ::std::result::Result::Ok(crate::operation::submit_feedback::SubmitFeedbackInput {
115 profiling_group_name: self.profiling_group_name,
116 anomaly_instance_id: self.anomaly_instance_id,
117 r#type: self.r#type,
118 comment: self.comment,
119 })
120 }
121}