aws_sdk_devopsagent/operation/create_chat/
_create_chat_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateChatInput {
7 pub agent_space_id: ::std::option::Option<::std::string::String>,
9 pub user_id: ::std::option::Option<::std::string::String>,
11 pub user_type: ::std::option::Option<crate::types::UserType>,
13}
14impl CreateChatInput {
15 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
17 self.agent_space_id.as_deref()
18 }
19 pub fn user_id(&self) -> ::std::option::Option<&str> {
21 self.user_id.as_deref()
22 }
23 pub fn user_type(&self) -> ::std::option::Option<&crate::types::UserType> {
25 self.user_type.as_ref()
26 }
27}
28impl CreateChatInput {
29 pub fn builder() -> crate::operation::create_chat::builders::CreateChatInputBuilder {
31 crate::operation::create_chat::builders::CreateChatInputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CreateChatInputBuilder {
39 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
40 pub(crate) user_id: ::std::option::Option<::std::string::String>,
41 pub(crate) user_type: ::std::option::Option<crate::types::UserType>,
42}
43impl CreateChatInputBuilder {
44 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.agent_space_id = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.agent_space_id = input;
53 self
54 }
55 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
57 &self.agent_space_id
58 }
59 pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.user_id = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.user_id = input;
68 self
69 }
70 pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.user_id
73 }
74 pub fn user_type(mut self, input: crate::types::UserType) -> Self {
76 self.user_type = ::std::option::Option::Some(input);
77 self
78 }
79 pub fn set_user_type(mut self, input: ::std::option::Option<crate::types::UserType>) -> Self {
81 self.user_type = input;
82 self
83 }
84 pub fn get_user_type(&self) -> &::std::option::Option<crate::types::UserType> {
86 &self.user_type
87 }
88 pub fn build(self) -> ::std::result::Result<crate::operation::create_chat::CreateChatInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::create_chat::CreateChatInput {
91 agent_space_id: self.agent_space_id,
92 user_id: self.user_id,
93 user_type: self.user_type,
94 })
95 }
96}