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 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
17 pub user_id: ::std::option::Option<::std::string::String>,
18 pub asset_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20}
21impl SendMessageInput {
22 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
24 self.agent_space_id.as_deref()
25 }
26 pub fn execution_id(&self) -> ::std::option::Option<&str> {
28 self.execution_id.as_deref()
29 }
30 pub fn content(&self) -> ::std::option::Option<&str> {
32 self.content.as_deref()
33 }
34 pub fn context(&self) -> ::std::option::Option<&crate::types::SendMessageContext> {
36 self.context.as_ref()
37 }
38 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
40 pub fn user_id(&self) -> ::std::option::Option<&str> {
41 self.user_id.as_deref()
42 }
43 pub fn asset_ids(&self) -> &[::std::string::String] {
47 self.asset_ids.as_deref().unwrap_or_default()
48 }
49}
50impl SendMessageInput {
51 pub fn builder() -> crate::operation::send_message::builders::SendMessageInputBuilder {
53 crate::operation::send_message::builders::SendMessageInputBuilder::default()
54 }
55}
56
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
59#[non_exhaustive]
60pub struct SendMessageInputBuilder {
61 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
62 pub(crate) execution_id: ::std::option::Option<::std::string::String>,
63 pub(crate) content: ::std::option::Option<::std::string::String>,
64 pub(crate) context: ::std::option::Option<crate::types::SendMessageContext>,
65 pub(crate) user_id: ::std::option::Option<::std::string::String>,
66 pub(crate) asset_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
67}
68impl SendMessageInputBuilder {
69 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 self.agent_space_id = ::std::option::Option::Some(input.into());
73 self
74 }
75 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77 self.agent_space_id = input;
78 self
79 }
80 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
82 &self.agent_space_id
83 }
84 pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.execution_id = ::std::option::Option::Some(input.into());
88 self
89 }
90 pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.execution_id = input;
93 self
94 }
95 pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
97 &self.execution_id
98 }
99 pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.content = ::std::option::Option::Some(input.into());
103 self
104 }
105 pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.content = input;
108 self
109 }
110 pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
112 &self.content
113 }
114 pub fn context(mut self, input: crate::types::SendMessageContext) -> Self {
116 self.context = ::std::option::Option::Some(input);
117 self
118 }
119 pub fn set_context(mut self, input: ::std::option::Option<crate::types::SendMessageContext>) -> Self {
121 self.context = input;
122 self
123 }
124 pub fn get_context(&self) -> &::std::option::Option<crate::types::SendMessageContext> {
126 &self.context
127 }
128 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
130 pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.user_id = ::std::option::Option::Some(input.into());
132 self
133 }
134 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
136 pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.user_id = input;
138 self
139 }
140 #[deprecated(note = "userId is managed by the service and should not be provided by the caller", since = "2026-04-15")]
142 pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
143 &self.user_id
144 }
145 pub fn asset_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 let mut v = self.asset_ids.unwrap_or_default();
152 v.push(input.into());
153 self.asset_ids = ::std::option::Option::Some(v);
154 self
155 }
156 pub fn set_asset_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
158 self.asset_ids = input;
159 self
160 }
161 pub fn get_asset_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
163 &self.asset_ids
164 }
165 pub fn build(self) -> ::std::result::Result<crate::operation::send_message::SendMessageInput, ::aws_smithy_types::error::operation::BuildError> {
167 ::std::result::Result::Ok(crate::operation::send_message::SendMessageInput {
168 agent_space_id: self.agent_space_id,
169 execution_id: self.execution_id,
170 content: self.content,
171 context: self.context,
172 user_id: self.user_id,
173 asset_ids: self.asset_ids,
174 })
175 }
176}