aws_sdk_qconnect/operation/create_session/
_create_session_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 CreateSessionInput {
6    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
9    pub assistant_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the session.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The tags used to organize, track, or control access for this resource.</p>
15    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16    /// <p>An object that can be used to specify Tag conditions.</p>
17    pub tag_filter: ::std::option::Option<crate::types::TagFilter>,
18    /// <p>The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.</p>
19    pub ai_agent_configuration: ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
20    /// <p>The Amazon Resource Name (ARN) of the email contact in Amazon Connect. Used to retrieve email content and establish session context for AI-powered email assistance.</p>
21    pub contact_arn: ::std::option::Option<::std::string::String>,
22    /// <p>The list of orchestrator configurations for the session being created.</p>
23    pub orchestrator_configuration_list: ::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>>,
24    /// <p>The list of orchestrator configurations to remove from the session.</p>
25    pub remove_orchestrator_configuration_list: ::std::option::Option<bool>,
26}
27impl CreateSessionInput {
28    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
29    pub fn client_token(&self) -> ::std::option::Option<&str> {
30        self.client_token.as_deref()
31    }
32    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
33    pub fn assistant_id(&self) -> ::std::option::Option<&str> {
34        self.assistant_id.as_deref()
35    }
36    /// <p>The name of the session.</p>
37    pub fn name(&self) -> ::std::option::Option<&str> {
38        self.name.as_deref()
39    }
40    /// <p>The description.</p>
41    pub fn description(&self) -> ::std::option::Option<&str> {
42        self.description.as_deref()
43    }
44    /// <p>The tags used to organize, track, or control access for this resource.</p>
45    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
46        self.tags.as_ref()
47    }
48    /// <p>An object that can be used to specify Tag conditions.</p>
49    pub fn tag_filter(&self) -> ::std::option::Option<&crate::types::TagFilter> {
50        self.tag_filter.as_ref()
51    }
52    /// <p>The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.</p>
53    pub fn ai_agent_configuration(
54        &self,
55    ) -> ::std::option::Option<&::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>> {
56        self.ai_agent_configuration.as_ref()
57    }
58    /// <p>The Amazon Resource Name (ARN) of the email contact in Amazon Connect. Used to retrieve email content and establish session context for AI-powered email assistance.</p>
59    pub fn contact_arn(&self) -> ::std::option::Option<&str> {
60        self.contact_arn.as_deref()
61    }
62    /// <p>The list of orchestrator configurations for the session being created.</p>
63    ///
64    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.orchestrator_configuration_list.is_none()`.
65    pub fn orchestrator_configuration_list(&self) -> &[crate::types::OrchestratorConfigurationEntry] {
66        self.orchestrator_configuration_list.as_deref().unwrap_or_default()
67    }
68    /// <p>The list of orchestrator configurations to remove from the session.</p>
69    pub fn remove_orchestrator_configuration_list(&self) -> ::std::option::Option<bool> {
70        self.remove_orchestrator_configuration_list
71    }
72}
73impl CreateSessionInput {
74    /// Creates a new builder-style object to manufacture [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
75    pub fn builder() -> crate::operation::create_session::builders::CreateSessionInputBuilder {
76        crate::operation::create_session::builders::CreateSessionInputBuilder::default()
77    }
78}
79
80/// A builder for [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct CreateSessionInputBuilder {
84    pub(crate) client_token: ::std::option::Option<::std::string::String>,
85    pub(crate) assistant_id: ::std::option::Option<::std::string::String>,
86    pub(crate) name: ::std::option::Option<::std::string::String>,
87    pub(crate) description: ::std::option::Option<::std::string::String>,
88    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
89    pub(crate) tag_filter: ::std::option::Option<crate::types::TagFilter>,
90    pub(crate) ai_agent_configuration:
91        ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
92    pub(crate) contact_arn: ::std::option::Option<::std::string::String>,
93    pub(crate) orchestrator_configuration_list: ::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>>,
94    pub(crate) remove_orchestrator_configuration_list: ::std::option::Option<bool>,
95}
96impl CreateSessionInputBuilder {
97    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
98    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.client_token = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
103    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.client_token = input;
105        self
106    }
107    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
108    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
109        &self.client_token
110    }
111    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
112    /// This field is required.
113    pub fn assistant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.assistant_id = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
118    pub fn set_assistant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.assistant_id = input;
120        self
121    }
122    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
123    pub fn get_assistant_id(&self) -> &::std::option::Option<::std::string::String> {
124        &self.assistant_id
125    }
126    /// <p>The name of the session.</p>
127    /// This field is required.
128    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.name = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The name of the session.</p>
133    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.name = input;
135        self
136    }
137    /// <p>The name of the session.</p>
138    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
139        &self.name
140    }
141    /// <p>The description.</p>
142    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.description = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The description.</p>
147    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.description = input;
149        self
150    }
151    /// <p>The description.</p>
152    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
153        &self.description
154    }
155    /// Adds a key-value pair to `tags`.
156    ///
157    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
158    ///
159    /// <p>The tags used to organize, track, or control access for this resource.</p>
160    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
161        let mut hash_map = self.tags.unwrap_or_default();
162        hash_map.insert(k.into(), v.into());
163        self.tags = ::std::option::Option::Some(hash_map);
164        self
165    }
166    /// <p>The tags used to organize, track, or control access for this resource.</p>
167    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
168        self.tags = input;
169        self
170    }
171    /// <p>The tags used to organize, track, or control access for this resource.</p>
172    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
173        &self.tags
174    }
175    /// <p>An object that can be used to specify Tag conditions.</p>
176    pub fn tag_filter(mut self, input: crate::types::TagFilter) -> Self {
177        self.tag_filter = ::std::option::Option::Some(input);
178        self
179    }
180    /// <p>An object that can be used to specify Tag conditions.</p>
181    pub fn set_tag_filter(mut self, input: ::std::option::Option<crate::types::TagFilter>) -> Self {
182        self.tag_filter = input;
183        self
184    }
185    /// <p>An object that can be used to specify Tag conditions.</p>
186    pub fn get_tag_filter(&self) -> &::std::option::Option<crate::types::TagFilter> {
187        &self.tag_filter
188    }
189    /// Adds a key-value pair to `ai_agent_configuration`.
190    ///
191    /// To override the contents of this collection use [`set_ai_agent_configuration`](Self::set_ai_agent_configuration).
192    ///
193    /// <p>The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.</p>
194    pub fn ai_agent_configuration(mut self, k: crate::types::AiAgentType, v: crate::types::AiAgentConfigurationData) -> Self {
195        let mut hash_map = self.ai_agent_configuration.unwrap_or_default();
196        hash_map.insert(k, v);
197        self.ai_agent_configuration = ::std::option::Option::Some(hash_map);
198        self
199    }
200    /// <p>The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.</p>
201    pub fn set_ai_agent_configuration(
202        mut self,
203        input: ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
204    ) -> Self {
205        self.ai_agent_configuration = input;
206        self
207    }
208    /// <p>The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.</p>
209    pub fn get_ai_agent_configuration(
210        &self,
211    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>> {
212        &self.ai_agent_configuration
213    }
214    /// <p>The Amazon Resource Name (ARN) of the email contact in Amazon Connect. Used to retrieve email content and establish session context for AI-powered email assistance.</p>
215    pub fn contact_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216        self.contact_arn = ::std::option::Option::Some(input.into());
217        self
218    }
219    /// <p>The Amazon Resource Name (ARN) of the email contact in Amazon Connect. Used to retrieve email content and establish session context for AI-powered email assistance.</p>
220    pub fn set_contact_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221        self.contact_arn = input;
222        self
223    }
224    /// <p>The Amazon Resource Name (ARN) of the email contact in Amazon Connect. Used to retrieve email content and establish session context for AI-powered email assistance.</p>
225    pub fn get_contact_arn(&self) -> &::std::option::Option<::std::string::String> {
226        &self.contact_arn
227    }
228    /// Appends an item to `orchestrator_configuration_list`.
229    ///
230    /// To override the contents of this collection use [`set_orchestrator_configuration_list`](Self::set_orchestrator_configuration_list).
231    ///
232    /// <p>The list of orchestrator configurations for the session being created.</p>
233    pub fn orchestrator_configuration_list(mut self, input: crate::types::OrchestratorConfigurationEntry) -> Self {
234        let mut v = self.orchestrator_configuration_list.unwrap_or_default();
235        v.push(input);
236        self.orchestrator_configuration_list = ::std::option::Option::Some(v);
237        self
238    }
239    /// <p>The list of orchestrator configurations for the session being created.</p>
240    pub fn set_orchestrator_configuration_list(
241        mut self,
242        input: ::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>>,
243    ) -> Self {
244        self.orchestrator_configuration_list = input;
245        self
246    }
247    /// <p>The list of orchestrator configurations for the session being created.</p>
248    pub fn get_orchestrator_configuration_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>> {
249        &self.orchestrator_configuration_list
250    }
251    /// <p>The list of orchestrator configurations to remove from the session.</p>
252    pub fn remove_orchestrator_configuration_list(mut self, input: bool) -> Self {
253        self.remove_orchestrator_configuration_list = ::std::option::Option::Some(input);
254        self
255    }
256    /// <p>The list of orchestrator configurations to remove from the session.</p>
257    pub fn set_remove_orchestrator_configuration_list(mut self, input: ::std::option::Option<bool>) -> Self {
258        self.remove_orchestrator_configuration_list = input;
259        self
260    }
261    /// <p>The list of orchestrator configurations to remove from the session.</p>
262    pub fn get_remove_orchestrator_configuration_list(&self) -> &::std::option::Option<bool> {
263        &self.remove_orchestrator_configuration_list
264    }
265    /// Consumes the builder and constructs a [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
266    pub fn build(
267        self,
268    ) -> ::std::result::Result<crate::operation::create_session::CreateSessionInput, ::aws_smithy_types::error::operation::BuildError> {
269        ::std::result::Result::Ok(crate::operation::create_session::CreateSessionInput {
270            client_token: self.client_token,
271            assistant_id: self.assistant_id,
272            name: self.name,
273            description: self.description,
274            tags: self.tags,
275            tag_filter: self.tag_filter,
276            ai_agent_configuration: self.ai_agent_configuration,
277            contact_arn: self.contact_arn,
278            orchestrator_configuration_list: self.orchestrator_configuration_list,
279            remove_orchestrator_configuration_list: self.remove_orchestrator_configuration_list,
280        })
281    }
282}