aws_sdk_qconnect/operation/update_session/
_update_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 UpdateSessionInput {
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 description.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>An object that can be used to specify Tag conditions.</p>
13    pub tag_filter: ::std::option::Option<crate::types::TagFilter>,
14    /// <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>
15    pub ai_agent_configuration: ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
16    /// <p>The updated list of orchestrator configurations for the session.</p>
17    pub orchestrator_configuration_list: ::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>>,
18    /// <p>The list of orchestrator configurations to remove from the session.</p>
19    pub remove_orchestrator_configuration_list: ::std::option::Option<bool>,
20}
21impl UpdateSessionInput {
22    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
23    pub fn assistant_id(&self) -> ::std::option::Option<&str> {
24        self.assistant_id.as_deref()
25    }
26    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
27    pub fn session_id(&self) -> ::std::option::Option<&str> {
28        self.session_id.as_deref()
29    }
30    /// <p>The description.</p>
31    pub fn description(&self) -> ::std::option::Option<&str> {
32        self.description.as_deref()
33    }
34    /// <p>An object that can be used to specify Tag conditions.</p>
35    pub fn tag_filter(&self) -> ::std::option::Option<&crate::types::TagFilter> {
36        self.tag_filter.as_ref()
37    }
38    /// <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>
39    pub fn ai_agent_configuration(
40        &self,
41    ) -> ::std::option::Option<&::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>> {
42        self.ai_agent_configuration.as_ref()
43    }
44    /// <p>The updated list of orchestrator configurations for the session.</p>
45    ///
46    /// 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()`.
47    pub fn orchestrator_configuration_list(&self) -> &[crate::types::OrchestratorConfigurationEntry] {
48        self.orchestrator_configuration_list.as_deref().unwrap_or_default()
49    }
50    /// <p>The list of orchestrator configurations to remove from the session.</p>
51    pub fn remove_orchestrator_configuration_list(&self) -> ::std::option::Option<bool> {
52        self.remove_orchestrator_configuration_list
53    }
54}
55impl UpdateSessionInput {
56    /// Creates a new builder-style object to manufacture [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
57    pub fn builder() -> crate::operation::update_session::builders::UpdateSessionInputBuilder {
58        crate::operation::update_session::builders::UpdateSessionInputBuilder::default()
59    }
60}
61
62/// A builder for [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct UpdateSessionInputBuilder {
66    pub(crate) assistant_id: ::std::option::Option<::std::string::String>,
67    pub(crate) session_id: ::std::option::Option<::std::string::String>,
68    pub(crate) description: ::std::option::Option<::std::string::String>,
69    pub(crate) tag_filter: ::std::option::Option<crate::types::TagFilter>,
70    pub(crate) ai_agent_configuration:
71        ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
72    pub(crate) orchestrator_configuration_list: ::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>>,
73    pub(crate) remove_orchestrator_configuration_list: ::std::option::Option<bool>,
74}
75impl UpdateSessionInputBuilder {
76    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
77    /// This field is required.
78    pub fn assistant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79        self.assistant_id = ::std::option::Option::Some(input.into());
80        self
81    }
82    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
83    pub fn set_assistant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.assistant_id = input;
85        self
86    }
87    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
88    pub fn get_assistant_id(&self) -> &::std::option::Option<::std::string::String> {
89        &self.assistant_id
90    }
91    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
92    /// This field is required.
93    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.session_id = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
98    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.session_id = input;
100        self
101    }
102    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
103    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
104        &self.session_id
105    }
106    /// <p>The description.</p>
107    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.description = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The description.</p>
112    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.description = input;
114        self
115    }
116    /// <p>The description.</p>
117    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
118        &self.description
119    }
120    /// <p>An object that can be used to specify Tag conditions.</p>
121    pub fn tag_filter(mut self, input: crate::types::TagFilter) -> Self {
122        self.tag_filter = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>An object that can be used to specify Tag conditions.</p>
126    pub fn set_tag_filter(mut self, input: ::std::option::Option<crate::types::TagFilter>) -> Self {
127        self.tag_filter = input;
128        self
129    }
130    /// <p>An object that can be used to specify Tag conditions.</p>
131    pub fn get_tag_filter(&self) -> &::std::option::Option<crate::types::TagFilter> {
132        &self.tag_filter
133    }
134    /// Adds a key-value pair to `ai_agent_configuration`.
135    ///
136    /// To override the contents of this collection use [`set_ai_agent_configuration`](Self::set_ai_agent_configuration).
137    ///
138    /// <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>
139    pub fn ai_agent_configuration(mut self, k: crate::types::AiAgentType, v: crate::types::AiAgentConfigurationData) -> Self {
140        let mut hash_map = self.ai_agent_configuration.unwrap_or_default();
141        hash_map.insert(k, v);
142        self.ai_agent_configuration = ::std::option::Option::Some(hash_map);
143        self
144    }
145    /// <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>
146    pub fn set_ai_agent_configuration(
147        mut self,
148        input: ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
149    ) -> Self {
150        self.ai_agent_configuration = input;
151        self
152    }
153    /// <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>
154    pub fn get_ai_agent_configuration(
155        &self,
156    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>> {
157        &self.ai_agent_configuration
158    }
159    /// Appends an item to `orchestrator_configuration_list`.
160    ///
161    /// To override the contents of this collection use [`set_orchestrator_configuration_list`](Self::set_orchestrator_configuration_list).
162    ///
163    /// <p>The updated list of orchestrator configurations for the session.</p>
164    pub fn orchestrator_configuration_list(mut self, input: crate::types::OrchestratorConfigurationEntry) -> Self {
165        let mut v = self.orchestrator_configuration_list.unwrap_or_default();
166        v.push(input);
167        self.orchestrator_configuration_list = ::std::option::Option::Some(v);
168        self
169    }
170    /// <p>The updated list of orchestrator configurations for the session.</p>
171    pub fn set_orchestrator_configuration_list(
172        mut self,
173        input: ::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>>,
174    ) -> Self {
175        self.orchestrator_configuration_list = input;
176        self
177    }
178    /// <p>The updated list of orchestrator configurations for the session.</p>
179    pub fn get_orchestrator_configuration_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OrchestratorConfigurationEntry>> {
180        &self.orchestrator_configuration_list
181    }
182    /// <p>The list of orchestrator configurations to remove from the session.</p>
183    pub fn remove_orchestrator_configuration_list(mut self, input: bool) -> Self {
184        self.remove_orchestrator_configuration_list = ::std::option::Option::Some(input);
185        self
186    }
187    /// <p>The list of orchestrator configurations to remove from the session.</p>
188    pub fn set_remove_orchestrator_configuration_list(mut self, input: ::std::option::Option<bool>) -> Self {
189        self.remove_orchestrator_configuration_list = input;
190        self
191    }
192    /// <p>The list of orchestrator configurations to remove from the session.</p>
193    pub fn get_remove_orchestrator_configuration_list(&self) -> &::std::option::Option<bool> {
194        &self.remove_orchestrator_configuration_list
195    }
196    /// Consumes the builder and constructs a [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
197    pub fn build(
198        self,
199    ) -> ::std::result::Result<crate::operation::update_session::UpdateSessionInput, ::aws_smithy_types::error::operation::BuildError> {
200        ::std::result::Result::Ok(crate::operation::update_session::UpdateSessionInput {
201            assistant_id: self.assistant_id,
202            session_id: self.session_id,
203            description: self.description,
204            tag_filter: self.tag_filter,
205            ai_agent_configuration: self.ai_agent_configuration,
206            orchestrator_configuration_list: self.orchestrator_configuration_list,
207            remove_orchestrator_configuration_list: self.remove_orchestrator_configuration_list,
208        })
209    }
210}