aws_sdk_iotmanagedintegrations/operation/send_connector_event/
builders.rs1pub use crate::operation::send_connector_event::_send_connector_event_output::SendConnectorEventOutputBuilder;
3
4pub use crate::operation::send_connector_event::_send_connector_event_input::SendConnectorEventInputBuilder;
5
6impl crate::operation::send_connector_event::builders::SendConnectorEventInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::send_connector_event::SendConnectorEventOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::send_connector_event::SendConnectorEventError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.send_connector_event();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct SendConnectorEventFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::send_connector_event::builders::SendConnectorEventInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::send_connector_event::SendConnectorEventOutput,
35 crate::operation::send_connector_event::SendConnectorEventError,
36 > for SendConnectorEventFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::send_connector_event::SendConnectorEventOutput,
44 crate::operation::send_connector_event::SendConnectorEventError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl SendConnectorEventFluentBuilder {
51 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 pub fn as_input(&self) -> &crate::operation::send_connector_event::builders::SendConnectorEventInputBuilder {
61 &self.inner
62 }
63 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::send_connector_event::SendConnectorEventOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::send_connector_event::SendConnectorEventError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::send_connector_event::SendConnectorEvent::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::send_connector_event::SendConnectorEvent::orchestrate(&runtime_plugins, input).await
90 }
91
92 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::send_connector_event::SendConnectorEventOutput,
97 crate::operation::send_connector_event::SendConnectorEventError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 pub fn connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.connector_id(input.into());
114 self
115 }
116 pub fn set_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_connector_id(input);
119 self
120 }
121 pub fn get_connector_id(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_connector_id()
124 }
125 pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.user_id(input.into());
128 self
129 }
130 pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_user_id(input);
133 self
134 }
135 pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_user_id()
138 }
139 pub fn operation(mut self, input: crate::types::ConnectorEventOperation) -> Self {
143 self.inner = self.inner.operation(input);
144 self
145 }
146 pub fn set_operation(mut self, input: ::std::option::Option<crate::types::ConnectorEventOperation>) -> Self {
150 self.inner = self.inner.set_operation(input);
151 self
152 }
153 pub fn get_operation(&self) -> &::std::option::Option<crate::types::ConnectorEventOperation> {
157 self.inner.get_operation()
158 }
159 pub fn operation_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.inner = self.inner.operation_version(input.into());
162 self
163 }
164 pub fn set_operation_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.inner = self.inner.set_operation_version(input);
167 self
168 }
169 pub fn get_operation_version(&self) -> &::std::option::Option<::std::string::String> {
171 self.inner.get_operation_version()
172 }
173 pub fn status_code(mut self, input: i32) -> Self {
175 self.inner = self.inner.status_code(input);
176 self
177 }
178 pub fn set_status_code(mut self, input: ::std::option::Option<i32>) -> Self {
180 self.inner = self.inner.set_status_code(input);
181 self
182 }
183 pub fn get_status_code(&self) -> &::std::option::Option<i32> {
185 self.inner.get_status_code()
186 }
187 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198 self.inner = self.inner.message(input.into());
199 self
200 }
201 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.inner = self.inner.set_message(input);
213 self
214 }
215 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
226 self.inner.get_message()
227 }
228 pub fn device_discovery_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230 self.inner = self.inner.device_discovery_id(input.into());
231 self
232 }
233 pub fn set_device_discovery_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235 self.inner = self.inner.set_device_discovery_id(input);
236 self
237 }
238 pub fn get_device_discovery_id(&self) -> &::std::option::Option<::std::string::String> {
240 self.inner.get_device_discovery_id()
241 }
242 pub fn connector_device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246 self.inner = self.inner.connector_device_id(input.into());
247 self
248 }
249 pub fn set_connector_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253 self.inner = self.inner.set_connector_device_id(input);
254 self
255 }
256 pub fn get_connector_device_id(&self) -> &::std::option::Option<::std::string::String> {
260 self.inner.get_connector_device_id()
261 }
262 pub fn trace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264 self.inner = self.inner.trace_id(input.into());
265 self
266 }
267 pub fn set_trace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.inner = self.inner.set_trace_id(input);
270 self
271 }
272 pub fn get_trace_id(&self) -> &::std::option::Option<::std::string::String> {
274 self.inner.get_trace_id()
275 }
276 pub fn devices(mut self, input: crate::types::Device) -> Self {
283 self.inner = self.inner.devices(input);
284 self
285 }
286 pub fn set_devices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Device>>) -> Self {
288 self.inner = self.inner.set_devices(input);
289 self
290 }
291 pub fn get_devices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Device>> {
293 self.inner.get_devices()
294 }
295 pub fn matter_endpoint(mut self, input: crate::types::MatterEndpoint) -> Self {
297 self.inner = self.inner.matter_endpoint(input);
298 self
299 }
300 pub fn set_matter_endpoint(mut self, input: ::std::option::Option<crate::types::MatterEndpoint>) -> Self {
302 self.inner = self.inner.set_matter_endpoint(input);
303 self
304 }
305 pub fn get_matter_endpoint(&self) -> &::std::option::Option<crate::types::MatterEndpoint> {
307 self.inner.get_matter_endpoint()
308 }
309}