aws_sdk_lexruntime/operation/delete_session/
_delete_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 DeleteSessionInput {
6    /// <p>The name of the bot that contains the session data.</p>
7    pub bot_name: ::std::option::Option<::std::string::String>,
8    /// <p>The alias in use for the bot that contains the session data.</p>
9    pub bot_alias: ::std::option::Option<::std::string::String>,
10    /// <p>The identifier of the user associated with the session data.</p>
11    pub user_id: ::std::option::Option<::std::string::String>,
12}
13impl DeleteSessionInput {
14    /// <p>The name of the bot that contains the session data.</p>
15    pub fn bot_name(&self) -> ::std::option::Option<&str> {
16        self.bot_name.as_deref()
17    }
18    /// <p>The alias in use for the bot that contains the session data.</p>
19    pub fn bot_alias(&self) -> ::std::option::Option<&str> {
20        self.bot_alias.as_deref()
21    }
22    /// <p>The identifier of the user associated with the session data.</p>
23    pub fn user_id(&self) -> ::std::option::Option<&str> {
24        self.user_id.as_deref()
25    }
26}
27impl DeleteSessionInput {
28    /// Creates a new builder-style object to manufacture [`DeleteSessionInput`](crate::operation::delete_session::DeleteSessionInput).
29    pub fn builder() -> crate::operation::delete_session::builders::DeleteSessionInputBuilder {
30        crate::operation::delete_session::builders::DeleteSessionInputBuilder::default()
31    }
32}
33
34/// A builder for [`DeleteSessionInput`](crate::operation::delete_session::DeleteSessionInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteSessionInputBuilder {
38    pub(crate) bot_name: ::std::option::Option<::std::string::String>,
39    pub(crate) bot_alias: ::std::option::Option<::std::string::String>,
40    pub(crate) user_id: ::std::option::Option<::std::string::String>,
41}
42impl DeleteSessionInputBuilder {
43    /// <p>The name of the bot that contains the session data.</p>
44    /// This field is required.
45    pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.bot_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of the bot that contains the session data.</p>
50    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.bot_name = input;
52        self
53    }
54    /// <p>The name of the bot that contains the session data.</p>
55    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.bot_name
57    }
58    /// <p>The alias in use for the bot that contains the session data.</p>
59    /// This field is required.
60    pub fn bot_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.bot_alias = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The alias in use for the bot that contains the session data.</p>
65    pub fn set_bot_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.bot_alias = input;
67        self
68    }
69    /// <p>The alias in use for the bot that contains the session data.</p>
70    pub fn get_bot_alias(&self) -> &::std::option::Option<::std::string::String> {
71        &self.bot_alias
72    }
73    /// <p>The identifier of the user associated with the session data.</p>
74    /// This field is required.
75    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.user_id = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The identifier of the user associated with the session data.</p>
80    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.user_id = input;
82        self
83    }
84    /// <p>The identifier of the user associated with the session data.</p>
85    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.user_id
87    }
88    /// Consumes the builder and constructs a [`DeleteSessionInput`](crate::operation::delete_session::DeleteSessionInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::delete_session::DeleteSessionInput, ::aws_smithy_types::error::operation::BuildError> {
92        ::std::result::Result::Ok(crate::operation::delete_session::DeleteSessionInput {
93            bot_name: self.bot_name,
94            bot_alias: self.bot_alias,
95            user_id: self.user_id,
96        })
97    }
98}