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}
17impl GetRecommendationsInput {
18 /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
19 pub fn assistant_id(&self) -> ::std::option::Option<&str> {
20 self.assistant_id.as_deref()
21 }
22 /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
23 pub fn session_id(&self) -> ::std::option::Option<&str> {
24 self.session_id.as_deref()
25 }
26 /// <p>The maximum number of results to return per page.</p>
27 pub fn max_results(&self) -> ::std::option::Option<i32> {
28 self.max_results
29 }
30 /// <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>
31 pub fn wait_time_seconds(&self) -> ::std::option::Option<i32> {
32 self.wait_time_seconds
33 }
34 /// <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>
35 pub fn next_chunk_token(&self) -> ::std::option::Option<&str> {
36 self.next_chunk_token.as_deref()
37 }
38}
39impl GetRecommendationsInput {
40 /// Creates a new builder-style object to manufacture [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
41 pub fn builder() -> crate::operation::get_recommendations::builders::GetRecommendationsInputBuilder {
42 crate::operation::get_recommendations::builders::GetRecommendationsInputBuilder::default()
43 }
44}
45
46/// A builder for [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetRecommendationsInputBuilder {
50 pub(crate) assistant_id: ::std::option::Option<::std::string::String>,
51 pub(crate) session_id: ::std::option::Option<::std::string::String>,
52 pub(crate) max_results: ::std::option::Option<i32>,
53 pub(crate) wait_time_seconds: ::std::option::Option<i32>,
54 pub(crate) next_chunk_token: ::std::option::Option<::std::string::String>,
55}
56impl GetRecommendationsInputBuilder {
57 /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
58 /// This field is required.
59 pub fn assistant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.assistant_id = ::std::option::Option::Some(input.into());
61 self
62 }
63 /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
64 pub fn set_assistant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.assistant_id = input;
66 self
67 }
68 /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
69 pub fn get_assistant_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.assistant_id
71 }
72 /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
73 /// This field is required.
74 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.session_id = ::std::option::Option::Some(input.into());
76 self
77 }
78 /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
79 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.session_id = input;
81 self
82 }
83 /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
84 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
85 &self.session_id
86 }
87 /// <p>The maximum number of results to return per page.</p>
88 pub fn max_results(mut self, input: i32) -> Self {
89 self.max_results = ::std::option::Option::Some(input);
90 self
91 }
92 /// <p>The maximum number of results to return per page.</p>
93 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
94 self.max_results = input;
95 self
96 }
97 /// <p>The maximum number of results to return per page.</p>
98 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
99 &self.max_results
100 }
101 /// <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>
102 pub fn wait_time_seconds(mut self, input: i32) -> Self {
103 self.wait_time_seconds = ::std::option::Option::Some(input);
104 self
105 }
106 /// <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>
107 pub fn set_wait_time_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
108 self.wait_time_seconds = input;
109 self
110 }
111 /// <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>
112 pub fn get_wait_time_seconds(&self) -> &::std::option::Option<i32> {
113 &self.wait_time_seconds
114 }
115 /// <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>
116 pub fn next_chunk_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.next_chunk_token = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <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>
121 pub fn set_next_chunk_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.next_chunk_token = input;
123 self
124 }
125 /// <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>
126 pub fn get_next_chunk_token(&self) -> &::std::option::Option<::std::string::String> {
127 &self.next_chunk_token
128 }
129 /// Consumes the builder and constructs a [`GetRecommendationsInput`](crate::operation::get_recommendations::GetRecommendationsInput).
130 pub fn build(
131 self,
132 ) -> ::std::result::Result<crate::operation::get_recommendations::GetRecommendationsInput, ::aws_smithy_types::error::operation::BuildError> {
133 ::std::result::Result::Ok(crate::operation::get_recommendations::GetRecommendationsInput {
134 assistant_id: self.assistant_id,
135 session_id: self.session_id,
136 max_results: self.max_results,
137 wait_time_seconds: self.wait_time_seconds,
138 next_chunk_token: self.next_chunk_token,
139 })
140 }
141}