aws_sdk_appfabric/operation/create_ingestion/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_ingestion::_create_ingestion_output::CreateIngestionOutputBuilder;
3
4pub use crate::operation::create_ingestion::_create_ingestion_input::CreateIngestionInputBuilder;
5
6impl crate::operation::create_ingestion::builders::CreateIngestionInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_ingestion::CreateIngestionOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_ingestion::CreateIngestionError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_ingestion();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateIngestion`.
24///
25/// <p>Creates a data ingestion for an application.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateIngestionFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_ingestion::builders::CreateIngestionInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_ingestion::CreateIngestionOutput,
35 crate::operation::create_ingestion::CreateIngestionError,
36 > for CreateIngestionFluentBuilder
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::create_ingestion::CreateIngestionOutput,
44 crate::operation::create_ingestion::CreateIngestionError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateIngestionFluentBuilder {
51 /// Creates a new `CreateIngestionFluentBuilder`.
52 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 /// Access the CreateIngestion as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_ingestion::builders::CreateIngestionInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::create_ingestion::CreateIngestionOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_ingestion::CreateIngestionError,
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::create_ingestion::CreateIngestion::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_ingestion::CreateIngestion::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::create_ingestion::CreateIngestionOutput,
97 crate::operation::create_ingestion::CreateIngestionError,
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 /// <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle to use for the request.</p>
112 pub fn app_bundle_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.app_bundle_identifier(input.into());
114 self
115 }
116 /// <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle to use for the request.</p>
117 pub fn set_app_bundle_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_app_bundle_identifier(input);
119 self
120 }
121 /// <p>The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle to use for the request.</p>
122 pub fn get_app_bundle_identifier(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_app_bundle_identifier()
124 }
125 /// <p>The name of the application.</p>
126 /// <p>Valid values are:</p>
127 /// <ul>
128 /// <li>
129 /// <p><code>SLACK</code></p></li>
130 /// <li>
131 /// <p><code>ASANA</code></p></li>
132 /// <li>
133 /// <p><code>JIRA</code></p></li>
134 /// <li>
135 /// <p><code>M365</code></p></li>
136 /// <li>
137 /// <p><code>M365AUDITLOGS</code></p></li>
138 /// <li>
139 /// <p><code>ZOOM</code></p></li>
140 /// <li>
141 /// <p><code>ZENDESK</code></p></li>
142 /// <li>
143 /// <p><code>OKTA</code></p></li>
144 /// <li>
145 /// <p><code>GOOGLE</code></p></li>
146 /// <li>
147 /// <p><code>DROPBOX</code></p></li>
148 /// <li>
149 /// <p><code>SMARTSHEET</code></p></li>
150 /// <li>
151 /// <p><code>CISCO</code></p></li>
152 /// </ul>
153 pub fn app(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.inner = self.inner.app(input.into());
155 self
156 }
157 /// <p>The name of the application.</p>
158 /// <p>Valid values are:</p>
159 /// <ul>
160 /// <li>
161 /// <p><code>SLACK</code></p></li>
162 /// <li>
163 /// <p><code>ASANA</code></p></li>
164 /// <li>
165 /// <p><code>JIRA</code></p></li>
166 /// <li>
167 /// <p><code>M365</code></p></li>
168 /// <li>
169 /// <p><code>M365AUDITLOGS</code></p></li>
170 /// <li>
171 /// <p><code>ZOOM</code></p></li>
172 /// <li>
173 /// <p><code>ZENDESK</code></p></li>
174 /// <li>
175 /// <p><code>OKTA</code></p></li>
176 /// <li>
177 /// <p><code>GOOGLE</code></p></li>
178 /// <li>
179 /// <p><code>DROPBOX</code></p></li>
180 /// <li>
181 /// <p><code>SMARTSHEET</code></p></li>
182 /// <li>
183 /// <p><code>CISCO</code></p></li>
184 /// </ul>
185 pub fn set_app(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.inner = self.inner.set_app(input);
187 self
188 }
189 /// <p>The name of the application.</p>
190 /// <p>Valid values are:</p>
191 /// <ul>
192 /// <li>
193 /// <p><code>SLACK</code></p></li>
194 /// <li>
195 /// <p><code>ASANA</code></p></li>
196 /// <li>
197 /// <p><code>JIRA</code></p></li>
198 /// <li>
199 /// <p><code>M365</code></p></li>
200 /// <li>
201 /// <p><code>M365AUDITLOGS</code></p></li>
202 /// <li>
203 /// <p><code>ZOOM</code></p></li>
204 /// <li>
205 /// <p><code>ZENDESK</code></p></li>
206 /// <li>
207 /// <p><code>OKTA</code></p></li>
208 /// <li>
209 /// <p><code>GOOGLE</code></p></li>
210 /// <li>
211 /// <p><code>DROPBOX</code></p></li>
212 /// <li>
213 /// <p><code>SMARTSHEET</code></p></li>
214 /// <li>
215 /// <p><code>CISCO</code></p></li>
216 /// </ul>
217 pub fn get_app(&self) -> &::std::option::Option<::std::string::String> {
218 self.inner.get_app()
219 }
220 /// <p>The ID of the application tenant.</p>
221 pub fn tenant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 self.inner = self.inner.tenant_id(input.into());
223 self
224 }
225 /// <p>The ID of the application tenant.</p>
226 pub fn set_tenant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227 self.inner = self.inner.set_tenant_id(input);
228 self
229 }
230 /// <p>The ID of the application tenant.</p>
231 pub fn get_tenant_id(&self) -> &::std::option::Option<::std::string::String> {
232 self.inner.get_tenant_id()
233 }
234 /// <p>The ingestion type.</p>
235 pub fn ingestion_type(mut self, input: crate::types::IngestionType) -> Self {
236 self.inner = self.inner.ingestion_type(input);
237 self
238 }
239 /// <p>The ingestion type.</p>
240 pub fn set_ingestion_type(mut self, input: ::std::option::Option<crate::types::IngestionType>) -> Self {
241 self.inner = self.inner.set_ingestion_type(input);
242 self
243 }
244 /// <p>The ingestion type.</p>
245 pub fn get_ingestion_type(&self) -> &::std::option::Option<crate::types::IngestionType> {
246 self.inner.get_ingestion_type()
247 }
248 /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
249 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
250 /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
251 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252 self.inner = self.inner.client_token(input.into());
253 self
254 }
255 /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
256 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
257 /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
258 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.inner = self.inner.set_client_token(input);
260 self
261 }
262 /// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p>
263 /// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
264 /// <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
265 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
266 self.inner.get_client_token()
267 }
268 ///
269 /// Appends an item to `tags`.
270 ///
271 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
272 ///
273 /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
274 pub fn tags(mut self, input: crate::types::Tag) -> Self {
275 self.inner = self.inner.tags(input);
276 self
277 }
278 /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
279 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
280 self.inner = self.inner.set_tags(input);
281 self
282 }
283 /// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
284 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
285 self.inner.get_tags()
286 }
287}