aws_sdk_qconnect/operation/get_recommendations/
_get_recommendations_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 GetRecommendationsInput {
6    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
7    pub assistant_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
9    pub session_id: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum number of results to return per page.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call returns successfully with an empty list.</p>
13    pub wait_time_seconds: ::std::option::Option<i32>,
14    /// <p>The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.</p>
15    pub next_chunk_token: ::std::option::Option<::std::string::String>,
16    /// <p>The type of recommendation being requested.</p>
17    pub recommendation_type: ::std::option::Option<crate::types::RecommendationType>,
18}
19impl GetRecommendationsInput {
20    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
21    pub fn assistant_id(&self) -> ::std::option::Option<&str> {
22        self.assistant_id.as_deref()
23    }
24    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
25    pub fn session_id(&self) -> ::std::option::Option<&str> {
26        self.session_id.as_deref()
27    }
28    /// <p>The maximum number of results to return per page.</p>
29    pub fn max_results(&self) -> ::std::option::Option<i32> {
30        self.max_results
31    }
32    /// <p>The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call returns successfully with an empty list.</p>
33    pub fn wait_time_seconds(&self) -> ::std::option::Option<i32> {
34        self.wait_time_seconds
35    }
36    /// <p>The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.</p>
37    pub fn next_chunk_token(&self) -> ::std::option::Option<&str> {
38        self.next_chunk_token.as_deref()
39    }
40    /// <p>The type of recommendation being requested.</p>
41    pub fn recommendation_type(&self) -> ::std::option::Option<&crate::types::RecommendationType> {
42        self.recommendation_type.as_ref()
43    }
44}
45impl GetRecommendationsInput {
46    /// Creates a new builder-style object to manufacture [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
47    pub fn builder() -> crate::operation::get_recommendations::builders::GetRecommendationsInputBuilder {
48        crate::operation::get_recommendations::builders::GetRecommendationsInputBuilder::default()
49    }
50}
51
52/// A builder for [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct GetRecommendationsInputBuilder {
56    pub(crate) assistant_id: ::std::option::Option<::std::string::String>,
57    pub(crate) session_id: ::std::option::Option<::std::string::String>,
58    pub(crate) max_results: ::std::option::Option<i32>,
59    pub(crate) wait_time_seconds: ::std::option::Option<i32>,
60    pub(crate) next_chunk_token: ::std::option::Option<::std::string::String>,
61    pub(crate) recommendation_type: ::std::option::Option<crate::types::RecommendationType>,
62}
63impl GetRecommendationsInputBuilder {
64    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
65    /// This field is required.
66    pub fn assistant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.assistant_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
71    pub fn set_assistant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.assistant_id = input;
73        self
74    }
75    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
76    pub fn get_assistant_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.assistant_id
78    }
79    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
80    /// This field is required.
81    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.session_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
86    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.session_id = input;
88        self
89    }
90    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
91    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.session_id
93    }
94    /// <p>The maximum number of results to return per page.</p>
95    pub fn max_results(mut self, input: i32) -> Self {
96        self.max_results = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>The maximum number of results to return per page.</p>
100    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
101        self.max_results = input;
102        self
103    }
104    /// <p>The maximum number of results to return per page.</p>
105    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
106        &self.max_results
107    }
108    /// <p>The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call returns successfully with an empty list.</p>
109    pub fn wait_time_seconds(mut self, input: i32) -> Self {
110        self.wait_time_seconds = ::std::option::Option::Some(input);
111        self
112    }
113    /// <p>The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call returns successfully with an empty list.</p>
114    pub fn set_wait_time_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
115        self.wait_time_seconds = input;
116        self
117    }
118    /// <p>The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call returns successfully with an empty list.</p>
119    pub fn get_wait_time_seconds(&self) -> &::std::option::Option<i32> {
120        &self.wait_time_seconds
121    }
122    /// <p>The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.</p>
123    pub fn next_chunk_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.next_chunk_token = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.</p>
128    pub fn set_next_chunk_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.next_chunk_token = input;
130        self
131    }
132    /// <p>The token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.</p>
133    pub fn get_next_chunk_token(&self) -> &::std::option::Option<::std::string::String> {
134        &self.next_chunk_token
135    }
136    /// <p>The type of recommendation being requested.</p>
137    pub fn recommendation_type(mut self, input: crate::types::RecommendationType) -> Self {
138        self.recommendation_type = ::std::option::Option::Some(input);
139        self
140    }
141    /// <p>The type of recommendation being requested.</p>
142    pub fn set_recommendation_type(mut self, input: ::std::option::Option<crate::types::RecommendationType>) -> Self {
143        self.recommendation_type = input;
144        self
145    }
146    /// <p>The type of recommendation being requested.</p>
147    pub fn get_recommendation_type(&self) -> &::std::option::Option<crate::types::RecommendationType> {
148        &self.recommendation_type
149    }
150    /// Consumes the builder and constructs a [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
151    pub fn build(
152        self,
153    ) -> ::std::result::Result<crate::operation::get_recommendations::GetRecommendationsInput, ::aws_smithy_types::error::operation::BuildError> {
154        ::std::result::Result::Ok(crate::operation::get_recommendations::GetRecommendationsInput {
155            assistant_id: self.assistant_id,
156            session_id: self.session_id,
157            max_results: self.max_results,
158            wait_time_seconds: self.wait_time_seconds,
159            next_chunk_token: self.next_chunk_token,
160            recommendation_type: self.recommendation_type,
161        })
162    }
163}