aws_sdk_devopsagent/operation/send_message/
_send_message_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SendMessageInput {
7 pub agent_space_id: ::std::option::Option<::std::string::String>,
9 pub execution_id: ::std::option::Option<::std::string::String>,
11 pub content: ::std::option::Option<::std::string::String>,
13 pub context: ::std::option::Option<crate::types::SendMessageContext>,
15 pub user_id: ::std::option::Option<::std::string::String>,
17}
18impl SendMessageInput {
19 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
21 self.agent_space_id.as_deref()
22 }
23 pub fn execution_id(&self) -> ::std::option::Option<&str> {
25 self.execution_id.as_deref()
26 }
27 pub fn content(&self) -> ::std::option::Option<&str> {
29 self.content.as_deref()
30 }
31 pub fn context(&self) -> ::std::option::Option<&crate::types::SendMessageContext> {
33 self.context.as_ref()
34 }
35 pub fn user_id(&self) -> ::std::option::Option<&str> {
37 self.user_id.as_deref()
38 }
39}
40impl SendMessageInput {
41 pub fn builder() -> crate::operation::send_message::builders::SendMessageInputBuilder {
43 crate::operation::send_message::builders::SendMessageInputBuilder::default()
44 }
45}
46
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct SendMessageInputBuilder {
51 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
52 pub(crate) execution_id: ::std::option::Option<::std::string::String>,
53 pub(crate) content: ::std::option::Option<::std::string::String>,
54 pub(crate) context: ::std::option::Option<crate::types::SendMessageContext>,
55 pub(crate) user_id: ::std::option::Option<::std::string::String>,
56}
57impl SendMessageInputBuilder {
58 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.agent_space_id = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.agent_space_id = input;
67 self
68 }
69 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
71 &self.agent_space_id
72 }
73 pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.execution_id = ::std::option::Option::Some(input.into());
77 self
78 }
79 pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.execution_id = input;
82 self
83 }
84 pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
86 &self.execution_id
87 }
88 pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.content = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.content = input;
97 self
98 }
99 pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
101 &self.content
102 }
103 pub fn context(mut self, input: crate::types::SendMessageContext) -> Self {
105 self.context = ::std::option::Option::Some(input);
106 self
107 }
108 pub fn set_context(mut self, input: ::std::option::Option<crate::types::SendMessageContext>) -> Self {
110 self.context = input;
111 self
112 }
113 pub fn get_context(&self) -> &::std::option::Option<crate::types::SendMessageContext> {
115 &self.context
116 }
117 pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.user_id = ::std::option::Option::Some(input.into());
121 self
122 }
123 pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.user_id = input;
126 self
127 }
128 pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
130 &self.user_id
131 }
132 pub fn build(self) -> ::std::result::Result<crate::operation::send_message::SendMessageInput, ::aws_smithy_types::error::operation::BuildError> {
134 ::std::result::Result::Ok(crate::operation::send_message::SendMessageInput {
135 agent_space_id: self.agent_space_id,
136 execution_id: self.execution_id,
137 content: self.content,
138 context: self.context,
139 user_id: self.user_id,
140 })
141 }
142}