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 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
11 pub user_id: ::std::option::Option<::std::string::String>,
12 pub user_type: ::std::option::Option<crate::types::UserType>,
14}
15impl CreateChatInput {
16 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
18 self.agent_space_id.as_deref()
19 }
20 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
22 pub fn user_id(&self) -> ::std::option::Option<&str> {
23 self.user_id.as_deref()
24 }
25 pub fn user_type(&self) -> ::std::option::Option<&crate::types::UserType> {
27 self.user_type.as_ref()
28 }
29}
30impl CreateChatInput {
31 pub fn builder() -> crate::operation::create_chat::builders::CreateChatInputBuilder {
33 crate::operation::create_chat::builders::CreateChatInputBuilder::default()
34 }
35}
36
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct CreateChatInputBuilder {
41 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
42 pub(crate) user_id: ::std::option::Option<::std::string::String>,
43 pub(crate) user_type: ::std::option::Option<crate::types::UserType>,
44}
45impl CreateChatInputBuilder {
46 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49 self.agent_space_id = ::std::option::Option::Some(input.into());
50 self
51 }
52 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54 self.agent_space_id = input;
55 self
56 }
57 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
59 &self.agent_space_id
60 }
61 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
63 pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.user_id = ::std::option::Option::Some(input.into());
65 self
66 }
67 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
69 pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.user_id = input;
71 self
72 }
73 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
75 pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
76 &self.user_id
77 }
78 pub fn user_type(mut self, input: crate::types::UserType) -> Self {
80 self.user_type = ::std::option::Option::Some(input);
81 self
82 }
83 pub fn set_user_type(mut self, input: ::std::option::Option<crate::types::UserType>) -> Self {
85 self.user_type = input;
86 self
87 }
88 pub fn get_user_type(&self) -> &::std::option::Option<crate::types::UserType> {
90 &self.user_type
91 }
92 pub fn build(self) -> ::std::result::Result<crate::operation::create_chat::CreateChatInput, ::aws_smithy_types::error::operation::BuildError> {
94 ::std::result::Result::Ok(crate::operation::create_chat::CreateChatInput {
95 agent_space_id: self.agent_space_id,
96 user_id: self.user_id,
97 user_type: self.user_type,
98 })
99 }
100}