aws-sdk-codeguruprofiler 1.98.0

AWS SDK for Amazon CodeGuru Profiler
Documentation
// 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>
    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>
    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>
    pub r#type: ::std::option::Option<crate::types::FeedbackType>,
    /// <p>Optional feedback about this anomaly.</p>
    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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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>
    /// This field is required.
    pub fn profiling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profiling_group_name = ::std::option::Option::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 name of the profiling group that is associated with the analysis data.</p>
    pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.profiling_group_name
    }
    /// <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>
    /// This field is required.
    pub fn anomaly_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.anomaly_instance_id = ::std::option::Option::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 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 get_anomaly_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.anomaly_instance_id
    }
    /// <p>The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::FeedbackType) -> Self {
        self.r#type = ::std::option::Option::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>The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::FeedbackType> {
        &self.r#type
    }
    /// <p>Optional feedback about this anomaly.</p>
    pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.comment = ::std::option::Option::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
    }
    /// <p>Optional feedback about this anomaly.</p>
    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
        &self.comment
    }
    /// Consumes the builder and constructs a [`SubmitFeedbackInput`](crate::operation::submit_feedback::SubmitFeedbackInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::submit_feedback::SubmitFeedbackInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::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,
        })
    }
}