aws_sdk_qconnect/operation/create_content_association/
builders.rs1pub use crate::operation::create_content_association::_create_content_association_output::CreateContentAssociationOutputBuilder;
3
4pub use crate::operation::create_content_association::_create_content_association_input::CreateContentAssociationInputBuilder;
5
6impl crate::operation::create_content_association::builders::CreateContentAssociationInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_content_association::CreateContentAssociationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_content_association::CreateContentAssociationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_content_association();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
36pub struct CreateContentAssociationFluentBuilder {
37 handle: ::std::sync::Arc<crate::client::Handle>,
38 inner: crate::operation::create_content_association::builders::CreateContentAssociationInputBuilder,
39 config_override: ::std::option::Option<crate::config::Builder>,
40}
41impl
42 crate::client::customize::internal::CustomizableSend<
43 crate::operation::create_content_association::CreateContentAssociationOutput,
44 crate::operation::create_content_association::CreateContentAssociationError,
45 > for CreateContentAssociationFluentBuilder
46{
47 fn send(
48 self,
49 config_override: crate::config::Builder,
50 ) -> crate::client::customize::internal::BoxFuture<
51 crate::client::customize::internal::SendResult<
52 crate::operation::create_content_association::CreateContentAssociationOutput,
53 crate::operation::create_content_association::CreateContentAssociationError,
54 >,
55 > {
56 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57 }
58}
59impl CreateContentAssociationFluentBuilder {
60 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62 Self {
63 handle,
64 inner: ::std::default::Default::default(),
65 config_override: ::std::option::Option::None,
66 }
67 }
68 pub fn as_input(&self) -> &crate::operation::create_content_association::builders::CreateContentAssociationInputBuilder {
70 &self.inner
71 }
72 pub async fn send(
81 self,
82 ) -> ::std::result::Result<
83 crate::operation::create_content_association::CreateContentAssociationOutput,
84 ::aws_smithy_runtime_api::client::result::SdkError<
85 crate::operation::create_content_association::CreateContentAssociationError,
86 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
87 >,
88 > {
89 let input = self
90 .inner
91 .build()
92 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
93 let runtime_plugins = crate::operation::create_content_association::CreateContentAssociation::operation_runtime_plugins(
94 self.handle.runtime_plugins.clone(),
95 &self.handle.conf,
96 self.config_override,
97 );
98 crate::operation::create_content_association::CreateContentAssociation::orchestrate(&runtime_plugins, input).await
99 }
100
101 pub fn customize(
103 self,
104 ) -> crate::client::customize::CustomizableOperation<
105 crate::operation::create_content_association::CreateContentAssociationOutput,
106 crate::operation::create_content_association::CreateContentAssociationError,
107 Self,
108 > {
109 crate::client::customize::CustomizableOperation::new(self)
110 }
111 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
112 self.set_config_override(::std::option::Option::Some(config_override.into()));
113 self
114 }
115
116 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
117 self.config_override = config_override;
118 self
119 }
120 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.inner = self.inner.client_token(input.into());
123 self
124 }
125 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.inner = self.inner.set_client_token(input);
128 self
129 }
130 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
132 self.inner.get_client_token()
133 }
134 pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136 self.inner = self.inner.knowledge_base_id(input.into());
137 self
138 }
139 pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.inner = self.inner.set_knowledge_base_id(input);
142 self
143 }
144 pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
146 self.inner.get_knowledge_base_id()
147 }
148 pub fn content_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.content_id(input.into());
151 self
152 }
153 pub fn set_content_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.inner = self.inner.set_content_id(input);
156 self
157 }
158 pub fn get_content_id(&self) -> &::std::option::Option<::std::string::String> {
160 self.inner.get_content_id()
161 }
162 pub fn association_type(mut self, input: crate::types::ContentAssociationType) -> Self {
164 self.inner = self.inner.association_type(input);
165 self
166 }
167 pub fn set_association_type(mut self, input: ::std::option::Option<crate::types::ContentAssociationType>) -> Self {
169 self.inner = self.inner.set_association_type(input);
170 self
171 }
172 pub fn get_association_type(&self) -> &::std::option::Option<crate::types::ContentAssociationType> {
174 self.inner.get_association_type()
175 }
176 pub fn association(mut self, input: crate::types::ContentAssociationContents) -> Self {
178 self.inner = self.inner.association(input);
179 self
180 }
181 pub fn set_association(mut self, input: ::std::option::Option<crate::types::ContentAssociationContents>) -> Self {
183 self.inner = self.inner.set_association(input);
184 self
185 }
186 pub fn get_association(&self) -> &::std::option::Option<crate::types::ContentAssociationContents> {
188 self.inner.get_association()
189 }
190 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
197 self.inner = self.inner.tags(k.into(), v.into());
198 self
199 }
200 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
202 self.inner = self.inner.set_tags(input);
203 self
204 }
205 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
207 self.inner.get_tags()
208 }
209}