1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The structure representing the SubmitFeedbackRequest.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubmitFeedbackInput {
/// <p>The name of the profiling group that is associated with the analysis data.</p>
#[doc(hidden)]
pub profiling_group_name: std::option::Option<std::string::String>,
/// <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>
#[doc(hidden)]
pub anomaly_instance_id: std::option::Option<std::string::String>,
/// <p> The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>. </p>
#[doc(hidden)]
pub r#type: std::option::Option<crate::types::FeedbackType>,
/// <p>Optional feedback about this anomaly.</p>
#[doc(hidden)]
pub comment: std::option::Option<std::string::String>,
}
impl SubmitFeedbackInput {
/// <p>The name of the profiling group that is associated with the analysis data.</p>
pub fn profiling_group_name(&self) -> std::option::Option<&str> {
self.profiling_group_name.as_deref()
}
/// <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>
pub fn anomaly_instance_id(&self) -> std::option::Option<&str> {
self.anomaly_instance_id.as_deref()
}
/// <p> The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>. </p>
pub fn r#type(&self) -> std::option::Option<&crate::types::FeedbackType> {
self.r#type.as_ref()
}
/// <p>Optional feedback about this anomaly.</p>
pub fn comment(&self) -> std::option::Option<&str> {
self.comment.as_deref()
}
}
impl SubmitFeedbackInput {
/// Creates a new builder-style object to manufacture [`SubmitFeedbackInput`](crate::operation::submit_feedback::SubmitFeedbackInput).
pub fn builder() -> crate::operation::submit_feedback::builders::SubmitFeedbackInputBuilder {
crate::operation::submit_feedback::builders::SubmitFeedbackInputBuilder::default()
}
}
/// A builder for [`SubmitFeedbackInput`](crate::operation::submit_feedback::SubmitFeedbackInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SubmitFeedbackInputBuilder {
pub(crate) profiling_group_name: std::option::Option<std::string::String>,
pub(crate) anomaly_instance_id: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::types::FeedbackType>,
pub(crate) comment: std::option::Option<std::string::String>,
}
impl SubmitFeedbackInputBuilder {
/// <p>The name of the profiling group that is associated with the analysis data.</p>
pub fn profiling_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.profiling_group_name = Some(input.into());
self
}
/// <p>The name of the profiling group that is associated with the analysis data.</p>
pub fn set_profiling_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.profiling_group_name = input;
self
}
/// <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>
pub fn anomaly_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.anomaly_instance_id = Some(input.into());
self
}
/// <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>
pub fn set_anomaly_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.anomaly_instance_id = input;
self
}
/// <p> The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>. </p>
pub fn r#type(mut self, input: crate::types::FeedbackType) -> Self {
self.r#type = Some(input);
self
}
/// <p> The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>. </p>
pub fn set_type(mut self, input: std::option::Option<crate::types::FeedbackType>) -> Self {
self.r#type = input;
self
}
/// <p>Optional feedback about this anomaly.</p>
pub fn comment(mut self, input: impl Into<std::string::String>) -> Self {
self.comment = Some(input.into());
self
}
/// <p>Optional feedback about this anomaly.</p>
pub fn set_comment(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment = input;
self
}
/// Consumes the builder and constructs a [`SubmitFeedbackInput`](crate::operation::submit_feedback::SubmitFeedbackInput).
pub fn build(
self,
) -> Result<
crate::operation::submit_feedback::SubmitFeedbackInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::submit_feedback::SubmitFeedbackInput {
profiling_group_name: self.profiling_group_name,
anomaly_instance_id: self.anomaly_instance_id,
r#type: self.r#type,
comment: self.comment,
})
}
}