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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeRecommendationFeedbackInput {
/// <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>
pub code_review_arn: ::std::option::Option<::std::string::String>,
/// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
pub recommendation_id: ::std::option::Option<::std::string::String>,
/// <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>
/// <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>
pub user_id: ::std::option::Option<::std::string::String>,
}
impl DescribeRecommendationFeedbackInput {
/// <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>
pub fn code_review_arn(&self) -> ::std::option::Option<&str> {
self.code_review_arn.as_deref()
}
/// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
pub fn recommendation_id(&self) -> ::std::option::Option<&str> {
self.recommendation_id.as_deref()
}
/// <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>
/// <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>
pub fn user_id(&self) -> ::std::option::Option<&str> {
self.user_id.as_deref()
}
}
impl DescribeRecommendationFeedbackInput {
/// Creates a new builder-style object to manufacture [`DescribeRecommendationFeedbackInput`](crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput).
pub fn builder() -> crate::operation::describe_recommendation_feedback::builders::DescribeRecommendationFeedbackInputBuilder {
crate::operation::describe_recommendation_feedback::builders::DescribeRecommendationFeedbackInputBuilder::default()
}
}
/// A builder for [`DescribeRecommendationFeedbackInput`](crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeRecommendationFeedbackInputBuilder {
pub(crate) code_review_arn: ::std::option::Option<::std::string::String>,
pub(crate) recommendation_id: ::std::option::Option<::std::string::String>,
pub(crate) user_id: ::std::option::Option<::std::string::String>,
}
impl DescribeRecommendationFeedbackInputBuilder {
/// <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>
/// This field is required.
pub fn code_review_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.code_review_arn = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_code_review_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.code_review_arn = input;
self
}
/// <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>
pub fn get_code_review_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.code_review_arn
}
/// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
/// This field is required.
pub fn recommendation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.recommendation_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
pub fn set_recommendation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.recommendation_id = input;
self
}
/// <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
pub fn get_recommendation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.recommendation_id
}
/// <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>
/// <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>
pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.user_id = ::std::option::Option::Some(input.into());
self
}
/// <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>
/// <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>
pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.user_id = input;
self
}
/// <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>
/// <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>
pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
&self.user_id
}
/// Consumes the builder and constructs a [`DescribeRecommendationFeedbackInput`](crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::describe_recommendation_feedback::DescribeRecommendationFeedbackInput {
code_review_arn: self.code_review_arn,
recommendation_id: self.recommendation_id,
user_id: self.user_id,
})
}
}