aws_sdk_codegurureviewer/operation/describe_recommendation_feedback/
_describe_recommendation_feedback_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeRecommendationFeedbackInput {
6    /// <p>The Amazon Resource Name (ARN) of the <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html">CodeReview</a> object.</p>
7    pub code_review_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
9    pub recommendation_id: ::std::option::Option<::std::string::String>,
10    /// <p>Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.</p>
11    /// <p>The <code>UserId</code> is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying"> Specifying a Principal</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>
12    pub user_id: ::std::option::Option<::std::string::String>,
13}
14impl DescribeRecommendationFeedbackInput {
15    /// <p>The Amazon Resource Name (ARN) of the <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html">CodeReview</a> object.</p>
16    pub fn code_review_arn(&self) -> ::std::option::Option<&str> {
17        self.code_review_arn.as_deref()
18    }
19    /// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
20    pub fn recommendation_id(&self) -> ::std::option::Option<&str> {
21        self.recommendation_id.as_deref()
22    }
23    /// <p>Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.</p>
24    /// <p>The <code>UserId</code> is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying"> Specifying a Principal</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>
25    pub fn user_id(&self) -> ::std::option::Option<&str> {
26        self.user_id.as_deref()
27    }
28}
29impl DescribeRecommendationFeedbackInput {
30    /// Creates a new builder-style object to manufacture [`DescribeRecommendationFeedbackInput`](crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput).
31    pub fn builder() -> crate::operation::describe_recommendation_feedback::builders::DescribeRecommendationFeedbackInputBuilder {
32        crate::operation::describe_recommendation_feedback::builders::DescribeRecommendationFeedbackInputBuilder::default()
33    }
34}
35
36/// A builder for [`DescribeRecommendationFeedbackInput`](crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DescribeRecommendationFeedbackInputBuilder {
40    pub(crate) code_review_arn: ::std::option::Option<::std::string::String>,
41    pub(crate) recommendation_id: ::std::option::Option<::std::string::String>,
42    pub(crate) user_id: ::std::option::Option<::std::string::String>,
43}
44impl DescribeRecommendationFeedbackInputBuilder {
45    /// <p>The Amazon Resource Name (ARN) of the <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html">CodeReview</a> object.</p>
46    /// This field is required.
47    pub fn code_review_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.code_review_arn = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The Amazon Resource Name (ARN) of the <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html">CodeReview</a> object.</p>
52    pub fn set_code_review_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.code_review_arn = input;
54        self
55    }
56    /// <p>The Amazon Resource Name (ARN) of the <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html">CodeReview</a> object.</p>
57    pub fn get_code_review_arn(&self) -> &::std::option::Option<::std::string::String> {
58        &self.code_review_arn
59    }
60    /// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
61    /// This field is required.
62    pub fn recommendation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.recommendation_id = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
67    pub fn set_recommendation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.recommendation_id = input;
69        self
70    }
71    /// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
72    pub fn get_recommendation_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.recommendation_id
74    }
75    /// <p>Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.</p>
76    /// <p>The <code>UserId</code> is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying"> Specifying a Principal</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>
77    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.user_id = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.</p>
82    /// <p>The <code>UserId</code> is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying"> Specifying a Principal</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>
83    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.user_id = input;
85        self
86    }
87    /// <p>Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.</p>
88    /// <p>The <code>UserId</code> is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying"> Specifying a Principal</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>
89    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
90        &self.user_id
91    }
92    /// Consumes the builder and constructs a [`DescribeRecommendationFeedbackInput`](crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput).
93    pub fn build(
94        self,
95    ) -> ::std::result::Result<
96        crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput,
97        ::aws_smithy_types::error::operation::BuildError,
98    > {
99        ::std::result::Result::Ok(crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput {
100            code_review_arn: self.code_review_arn,
101            recommendation_id: self.recommendation_id,
102            user_id: self.user_id,
103        })
104    }
105}