aws_sdk_connect/operation/send_chat_integration_event/
builders.rs1pub use crate::operation::send_chat_integration_event::_send_chat_integration_event_output::SendChatIntegrationEventOutputBuilder;
3
4pub use crate::operation::send_chat_integration_event::_send_chat_integration_event_input::SendChatIntegrationEventInputBuilder;
5
6impl crate::operation::send_chat_integration_event::builders::SendChatIntegrationEventInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::send_chat_integration_event::SendChatIntegrationEventOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::send_chat_integration_event::SendChatIntegrationEventError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.send_chat_integration_event();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct SendChatIntegrationEventFluentBuilder {
36 handle: ::std::sync::Arc<crate::client::Handle>,
37 inner: crate::operation::send_chat_integration_event::builders::SendChatIntegrationEventInputBuilder,
38 config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41 crate::client::customize::internal::CustomizableSend<
42 crate::operation::send_chat_integration_event::SendChatIntegrationEventOutput,
43 crate::operation::send_chat_integration_event::SendChatIntegrationEventError,
44 > for SendChatIntegrationEventFluentBuilder
45{
46 fn send(
47 self,
48 config_override: crate::config::Builder,
49 ) -> crate::client::customize::internal::BoxFuture<
50 crate::client::customize::internal::SendResult<
51 crate::operation::send_chat_integration_event::SendChatIntegrationEventOutput,
52 crate::operation::send_chat_integration_event::SendChatIntegrationEventError,
53 >,
54 > {
55 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56 }
57}
58impl SendChatIntegrationEventFluentBuilder {
59 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61 Self {
62 handle,
63 inner: ::std::default::Default::default(),
64 config_override: ::std::option::Option::None,
65 }
66 }
67 pub fn as_input(&self) -> &crate::operation::send_chat_integration_event::builders::SendChatIntegrationEventInputBuilder {
69 &self.inner
70 }
71 pub async fn send(
80 self,
81 ) -> ::std::result::Result<
82 crate::operation::send_chat_integration_event::SendChatIntegrationEventOutput,
83 ::aws_smithy_runtime_api::client::result::SdkError<
84 crate::operation::send_chat_integration_event::SendChatIntegrationEventError,
85 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86 >,
87 > {
88 let input = self
89 .inner
90 .build()
91 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92 let runtime_plugins = crate::operation::send_chat_integration_event::SendChatIntegrationEvent::operation_runtime_plugins(
93 self.handle.runtime_plugins.clone(),
94 &self.handle.conf,
95 self.config_override,
96 );
97 crate::operation::send_chat_integration_event::SendChatIntegrationEvent::orchestrate(&runtime_plugins, input).await
98 }
99
100 pub fn customize(
102 self,
103 ) -> crate::client::customize::CustomizableOperation<
104 crate::operation::send_chat_integration_event::SendChatIntegrationEventOutput,
105 crate::operation::send_chat_integration_event::SendChatIntegrationEventError,
106 Self,
107 > {
108 crate::client::customize::CustomizableOperation::new(self)
109 }
110 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111 self.set_config_override(::std::option::Option::Some(config_override.into()));
112 self
113 }
114
115 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116 self.config_override = config_override;
117 self
118 }
119 pub fn source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.inner = self.inner.source_id(input.into());
122 self
123 }
124 pub fn set_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.inner = self.inner.set_source_id(input);
127 self
128 }
129 pub fn get_source_id(&self) -> &::std::option::Option<::std::string::String> {
131 self.inner.get_source_id()
132 }
133 pub fn destination_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 self.inner = self.inner.destination_id(input.into());
136 self
137 }
138 pub fn set_destination_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_destination_id(input);
141 self
142 }
143 pub fn get_destination_id(&self) -> &::std::option::Option<::std::string::String> {
145 self.inner.get_destination_id()
146 }
147 pub fn subtype(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.subtype(input.into());
151 self
152 }
153 pub fn set_subtype(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.inner = self.inner.set_subtype(input);
157 self
158 }
159 pub fn get_subtype(&self) -> &::std::option::Option<::std::string::String> {
162 self.inner.get_subtype()
163 }
164 pub fn event(mut self, input: crate::types::ChatEvent) -> Self {
166 self.inner = self.inner.event(input);
167 self
168 }
169 pub fn set_event(mut self, input: ::std::option::Option<crate::types::ChatEvent>) -> Self {
171 self.inner = self.inner.set_event(input);
172 self
173 }
174 pub fn get_event(&self) -> &::std::option::Option<crate::types::ChatEvent> {
176 self.inner.get_event()
177 }
178 pub fn new_session_details(mut self, input: crate::types::NewSessionDetails) -> Self {
180 self.inner = self.inner.new_session_details(input);
181 self
182 }
183 pub fn set_new_session_details(mut self, input: ::std::option::Option<crate::types::NewSessionDetails>) -> Self {
185 self.inner = self.inner.set_new_session_details(input);
186 self
187 }
188 pub fn get_new_session_details(&self) -> &::std::option::Option<crate::types::NewSessionDetails> {
190 self.inner.get_new_session_details()
191 }
192}