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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// 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 GetActionRecommendationsInput {
/// <p>The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.</p>
pub campaign_arn: ::std::option::Option<::std::string::String>,
/// <p>The user ID of the user to provide action recommendations for.</p>
pub user_id: ::std::option::Option<::std::string::String>,
/// <p>The number of results to return. The default is 5. The maximum is 100.</p>
pub num_results: ::std::option::Option<i32>,
/// <p>The ARN of the filter to apply to the returned recommendations. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p>
/// <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p>
pub filter_arn: ::std::option::Option<::std::string::String>,
/// <p>The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. </p>
/// <p>For filter expressions that use an <code>INCLUDE</code> element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an <code>EXCLUDE</code> element to exclude actions, you can omit the <code>filter-values</code>. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering recommendations and user segments</a>.</p>
pub filter_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl GetActionRecommendationsInput {
/// <p>The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.</p>
pub fn campaign_arn(&self) -> ::std::option::Option<&str> {
self.campaign_arn.as_deref()
}
/// <p>The user ID of the user to provide action recommendations for.</p>
pub fn user_id(&self) -> ::std::option::Option<&str> {
self.user_id.as_deref()
}
/// <p>The number of results to return. The default is 5. The maximum is 100.</p>
pub fn num_results(&self) -> ::std::option::Option<i32> {
self.num_results
}
/// <p>The ARN of the filter to apply to the returned recommendations. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p>
/// <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p>
pub fn filter_arn(&self) -> ::std::option::Option<&str> {
self.filter_arn.as_deref()
}
/// <p>The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. </p>
/// <p>For filter expressions that use an <code>INCLUDE</code> element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an <code>EXCLUDE</code> element to exclude actions, you can omit the <code>filter-values</code>. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering recommendations and user segments</a>.</p>
pub fn filter_values(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.filter_values.as_ref()
}
}
impl GetActionRecommendationsInput {
/// Creates a new builder-style object to manufacture [`GetActionRecommendationsInput`](crate::operation::get_action_recommendations::GetActionRecommendationsInput).
pub fn builder() -> crate::operation::get_action_recommendations::builders::GetActionRecommendationsInputBuilder {
crate::operation::get_action_recommendations::builders::GetActionRecommendationsInputBuilder::default()
}
}
/// A builder for [`GetActionRecommendationsInput`](crate::operation::get_action_recommendations::GetActionRecommendationsInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetActionRecommendationsInputBuilder {
pub(crate) campaign_arn: ::std::option::Option<::std::string::String>,
pub(crate) user_id: ::std::option::Option<::std::string::String>,
pub(crate) num_results: ::std::option::Option<i32>,
pub(crate) filter_arn: ::std::option::Option<::std::string::String>,
pub(crate) filter_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl GetActionRecommendationsInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.</p>
pub fn campaign_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.campaign_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.</p>
pub fn set_campaign_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.campaign_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.</p>
pub fn get_campaign_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.campaign_arn
}
/// <p>The user ID of the user to provide action recommendations for.</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>The user ID of the user to provide action recommendations for.</p>
pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.user_id = input;
self
}
/// <p>The user ID of the user to provide action recommendations for.</p>
pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
&self.user_id
}
/// <p>The number of results to return. The default is 5. The maximum is 100.</p>
pub fn num_results(mut self, input: i32) -> Self {
self.num_results = ::std::option::Option::Some(input);
self
}
/// <p>The number of results to return. The default is 5. The maximum is 100.</p>
pub fn set_num_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.num_results = input;
self
}
/// <p>The number of results to return. The default is 5. The maximum is 100.</p>
pub fn get_num_results(&self) -> &::std::option::Option<i32> {
&self.num_results
}
/// <p>The ARN of the filter to apply to the returned recommendations. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p>
/// <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p>
pub fn filter_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.filter_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the filter to apply to the returned recommendations. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p>
/// <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p>
pub fn set_filter_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.filter_arn = input;
self
}
/// <p>The ARN of the filter to apply to the returned recommendations. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering Recommendations</a>.</p>
/// <p>When using this parameter, be sure the filter resource is <code>ACTIVE</code>.</p>
pub fn get_filter_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.filter_arn
}
/// Adds a key-value pair to `filter_values`.
///
/// To override the contents of this collection use [`set_filter_values`](Self::set_filter_values).
///
/// <p>The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. </p>
/// <p>For filter expressions that use an <code>INCLUDE</code> element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an <code>EXCLUDE</code> element to exclude actions, you can omit the <code>filter-values</code>. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering recommendations and user segments</a>.</p>
pub fn filter_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.filter_values.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.filter_values = ::std::option::Option::Some(hash_map);
self
}
/// <p>The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. </p>
/// <p>For filter expressions that use an <code>INCLUDE</code> element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an <code>EXCLUDE</code> element to exclude actions, you can omit the <code>filter-values</code>. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering recommendations and user segments</a>.</p>
pub fn set_filter_values(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.filter_values = input;
self
}
/// <p>The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma. </p>
/// <p>For filter expressions that use an <code>INCLUDE</code> element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an <code>EXCLUDE</code> element to exclude actions, you can omit the <code>filter-values</code>. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/filter.html">Filtering recommendations and user segments</a>.</p>
pub fn get_filter_values(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.filter_values
}
/// Consumes the builder and constructs a [`GetActionRecommendationsInput`](crate::operation::get_action_recommendations::GetActionRecommendationsInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::get_action_recommendations::GetActionRecommendationsInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::get_action_recommendations::GetActionRecommendationsInput {
campaign_arn: self.campaign_arn,
user_id: self.user_id,
num_results: self.num_results,
filter_arn: self.filter_arn,
filter_values: self.filter_values,
})
}
}