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}
17impl UpdateSessionInput {
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 description.</p>
27    pub fn description(&self) -> ::std::option::Option<&str> {
28        self.description.as_deref()
29    }
30    /// <p>An object that can be used to specify Tag conditions.</p>
31    pub fn tag_filter(&self) -> ::std::option::Option<&crate::types::TagFilter> {
32        self.tag_filter.as_ref()
33    }
34    /// <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>
35    pub fn ai_agent_configuration(
36        &self,
37    ) -> ::std::option::Option<&::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>> {
38        self.ai_agent_configuration.as_ref()
39    }
40}
41impl UpdateSessionInput {
42    /// Creates a new builder-style object to manufacture [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
43    pub fn builder() -> crate::operation::update_session::builders::UpdateSessionInputBuilder {
44        crate::operation::update_session::builders::UpdateSessionInputBuilder::default()
45    }
46}
47
48/// A builder for [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateSessionInputBuilder {
52    pub(crate) assistant_id: ::std::option::Option<::std::string::String>,
53    pub(crate) session_id: ::std::option::Option<::std::string::String>,
54    pub(crate) description: ::std::option::Option<::std::string::String>,
55    pub(crate) tag_filter: ::std::option::Option<crate::types::TagFilter>,
56    pub(crate) ai_agent_configuration:
57        ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
58}
59impl UpdateSessionInputBuilder {
60    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
61    /// This field is required.
62    pub fn assistant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.assistant_id = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
67    pub fn set_assistant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.assistant_id = input;
69        self
70    }
71    /// <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
72    pub fn get_assistant_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.assistant_id
74    }
75    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
76    /// This field is required.
77    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.session_id = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
82    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.session_id = input;
84        self
85    }
86    /// <p>The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
87    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
88        &self.session_id
89    }
90    /// <p>The description.</p>
91    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92        self.description = ::std::option::Option::Some(input.into());
93        self
94    }
95    /// <p>The description.</p>
96    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97        self.description = input;
98        self
99    }
100    /// <p>The description.</p>
101    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
102        &self.description
103    }
104    /// <p>An object that can be used to specify Tag conditions.</p>
105    pub fn tag_filter(mut self, input: crate::types::TagFilter) -> Self {
106        self.tag_filter = ::std::option::Option::Some(input);
107        self
108    }
109    /// <p>An object that can be used to specify Tag conditions.</p>
110    pub fn set_tag_filter(mut self, input: ::std::option::Option<crate::types::TagFilter>) -> Self {
111        self.tag_filter = input;
112        self
113    }
114    /// <p>An object that can be used to specify Tag conditions.</p>
115    pub fn get_tag_filter(&self) -> &::std::option::Option<crate::types::TagFilter> {
116        &self.tag_filter
117    }
118    /// Adds a key-value pair to `ai_agent_configuration`.
119    ///
120    /// To override the contents of this collection use [`set_ai_agent_configuration`](Self::set_ai_agent_configuration).
121    ///
122    /// <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>
123    pub fn ai_agent_configuration(mut self, k: crate::types::AiAgentType, v: crate::types::AiAgentConfigurationData) -> Self {
124        let mut hash_map = self.ai_agent_configuration.unwrap_or_default();
125        hash_map.insert(k, v);
126        self.ai_agent_configuration = ::std::option::Option::Some(hash_map);
127        self
128    }
129    /// <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>
130    pub fn set_ai_agent_configuration(
131        mut self,
132        input: ::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>>,
133    ) -> Self {
134        self.ai_agent_configuration = input;
135        self
136    }
137    /// <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>
138    pub fn get_ai_agent_configuration(
139        &self,
140    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::AiAgentType, crate::types::AiAgentConfigurationData>> {
141        &self.ai_agent_configuration
142    }
143    /// Consumes the builder and constructs a [`UpdateSessionInput`](crate::operation::update_session::UpdateSessionInput).
144    pub fn build(
145        self,
146    ) -> ::std::result::Result<crate::operation::update_session::UpdateSessionInput, ::aws_smithy_types::error::operation::BuildError> {
147        ::std::result::Result::Ok(crate::operation::update_session::UpdateSessionInput {
148            assistant_id: self.assistant_id,
149            session_id: self.session_id,
150            description: self.description,
151            tag_filter: self.tag_filter,
152            ai_agent_configuration: self.ai_agent_configuration,
153        })
154    }
155}