aws_sdk_codeguruprofiler/operation/submit_feedback/
_submit_feedback_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The structure representing the SubmitFeedbackRequest.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SubmitFeedbackInput {
7    /// <p>The name of the profiling group that is associated with the analysis data.</p>
8    pub profiling_group_name: ::std::option::Option<::std::string::String>,
9    /// <p>The universally unique identifier (UUID) of the <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AnomalyInstance.html"> <code>AnomalyInstance</code> </a> object that is included in the analysis data.</p>
10    pub anomaly_instance_id: ::std::option::Option<::std::string::String>,
11    /// <p>The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>.</p>
12    pub r#type: ::std::option::Option<crate::types::FeedbackType>,
13    /// <p>Optional feedback about this anomaly.</p>
14    pub comment: ::std::option::Option<::std::string::String>,
15}
16impl SubmitFeedbackInput {
17    /// <p>The name of the profiling group that is associated with the analysis data.</p>
18    pub fn profiling_group_name(&self) -> ::std::option::Option<&str> {
19        self.profiling_group_name.as_deref()
20    }
21    /// <p>The universally unique identifier (UUID) of the <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AnomalyInstance.html"> <code>AnomalyInstance</code> </a> object that is included in the analysis data.</p>
22    pub fn anomaly_instance_id(&self) -> ::std::option::Option<&str> {
23        self.anomaly_instance_id.as_deref()
24    }
25    /// <p>The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>.</p>
26    pub fn r#type(&self) -> ::std::option::Option<&crate::types::FeedbackType> {
27        self.r#type.as_ref()
28    }
29    /// <p>Optional feedback about this anomaly.</p>
30    pub fn comment(&self) -> ::std::option::Option<&str> {
31        self.comment.as_deref()
32    }
33}
34impl SubmitFeedbackInput {
35    /// Creates a new builder-style object to manufacture [`SubmitFeedbackInput`](crate::operation::submit_feedback::SubmitFeedbackInput).
36    pub fn builder() -> crate::operation::submit_feedback::builders::SubmitFeedbackInputBuilder {
37        crate::operation::submit_feedback::builders::SubmitFeedbackInputBuilder::default()
38    }
39}
40
41/// A builder for [`SubmitFeedbackInput`](crate::operation::submit_feedback::SubmitFeedbackInput).
42#[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    /// <p>The name of the profiling group that is associated with the analysis data.</p>
52    /// This field is required.
53    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    /// <p>The name of the profiling group that is associated with the analysis data.</p>
58    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    /// <p>The name of the profiling group that is associated with the analysis data.</p>
63    pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
64        &self.profiling_group_name
65    }
66    /// <p>The universally unique identifier (UUID) of the <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AnomalyInstance.html"> <code>AnomalyInstance</code> </a> object that is included in the analysis data.</p>
67    /// This field is required.
68    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    /// <p>The universally unique identifier (UUID) of the <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AnomalyInstance.html"> <code>AnomalyInstance</code> </a> object that is included in the analysis data.</p>
73    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    /// <p>The universally unique identifier (UUID) of the <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AnomalyInstance.html"> <code>AnomalyInstance</code> </a> object that is included in the analysis data.</p>
78    pub fn get_anomaly_instance_id(&self) -> &::std::option::Option<::std::string::String> {
79        &self.anomaly_instance_id
80    }
81    /// <p>The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>.</p>
82    /// This field is required.
83    pub fn r#type(mut self, input: crate::types::FeedbackType) -> Self {
84        self.r#type = ::std::option::Option::Some(input);
85        self
86    }
87    /// <p>The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>.</p>
88    pub fn set_type(mut self, input: ::std::option::Option<crate::types::FeedbackType>) -> Self {
89        self.r#type = input;
90        self
91    }
92    /// <p>The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>.</p>
93    pub fn get_type(&self) -> &::std::option::Option<crate::types::FeedbackType> {
94        &self.r#type
95    }
96    /// <p>Optional feedback about this anomaly.</p>
97    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    /// <p>Optional feedback about this anomaly.</p>
102    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.comment = input;
104        self
105    }
106    /// <p>Optional feedback about this anomaly.</p>
107    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
108        &self.comment
109    }
110    /// Consumes the builder and constructs a [`SubmitFeedbackInput`](crate::operation::submit_feedback::SubmitFeedbackInput).
111    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}