aws_sdk_serverlessapplicationrepository/operation/create_application/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_application::_create_application_output::CreateApplicationOutputBuilder;
3
4pub use crate::operation::create_application::_create_application_input::CreateApplicationInputBuilder;
5
6impl crate::operation::create_application::builders::CreateApplicationInputBuilder {
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_application::CreateApplicationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_application::CreateApplicationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_application();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateApplication`.
24///
25/// <p>Creates an application, optionally including an AWS SAM file to create the first application version in the same call.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateApplicationFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_application::builders::CreateApplicationInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_application::CreateApplicationOutput,
35 crate::operation::create_application::CreateApplicationError,
36 > for CreateApplicationFluentBuilder
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_application::CreateApplicationOutput,
44 crate::operation::create_application::CreateApplicationError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateApplicationFluentBuilder {
51 /// Creates a new `CreateApplicationFluentBuilder`.
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 CreateApplication as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_application::builders::CreateApplicationInputBuilder {
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_application::CreateApplicationOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_application::CreateApplicationError,
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_application::CreateApplication::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_application::CreateApplication::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_application::CreateApplicationOutput,
97 crate::operation::create_application::CreateApplicationError,
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 name of the author publishing the app.</p>
112 /// <p>Minimum length=1. Maximum length=127.</p>
113 /// <p>Pattern "^\[a-z0-9\]((\[a-z0-9\]|-(?!-))*\[a-z0-9\])?$";</p>
114 pub fn author(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.author(input.into());
116 self
117 }
118 /// <p>The name of the author publishing the app.</p>
119 /// <p>Minimum length=1. Maximum length=127.</p>
120 /// <p>Pattern "^\[a-z0-9\]((\[a-z0-9\]|-(?!-))*\[a-z0-9\])?$";</p>
121 pub fn set_author(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.inner = self.inner.set_author(input);
123 self
124 }
125 /// <p>The name of the author publishing the app.</p>
126 /// <p>Minimum length=1. Maximum length=127.</p>
127 /// <p>Pattern "^\[a-z0-9\]((\[a-z0-9\]|-(?!-))*\[a-z0-9\])?$";</p>
128 pub fn get_author(&self) -> &::std::option::Option<::std::string::String> {
129 self.inner.get_author()
130 }
131 /// <p>The description of the application.</p>
132 /// <p>Minimum length=1. Maximum length=256</p>
133 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.description(input.into());
135 self
136 }
137 /// <p>The description of the application.</p>
138 /// <p>Minimum length=1. Maximum length=256</p>
139 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.inner = self.inner.set_description(input);
141 self
142 }
143 /// <p>The description of the application.</p>
144 /// <p>Minimum length=1. Maximum length=256</p>
145 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
146 self.inner.get_description()
147 }
148 /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
149 pub fn home_page_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.inner = self.inner.home_page_url(input.into());
151 self
152 }
153 /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
154 pub fn set_home_page_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.inner = self.inner.set_home_page_url(input);
156 self
157 }
158 /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
159 pub fn get_home_page_url(&self) -> &::std::option::Option<::std::string::String> {
160 self.inner.get_home_page_url()
161 }
162 ///
163 /// Appends an item to `Labels`.
164 ///
165 /// To override the contents of this collection use [`set_labels`](Self::set_labels).
166 ///
167 /// <p>Labels to improve discovery of apps in search results.</p>
168 /// <p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p>
169 /// <p>Pattern: "^\[a-zA-Z0-9+\\-_:\\/@\]+$";</p>
170 pub fn labels(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171 self.inner = self.inner.labels(input.into());
172 self
173 }
174 /// <p>Labels to improve discovery of apps in search results.</p>
175 /// <p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p>
176 /// <p>Pattern: "^\[a-zA-Z0-9+\\-_:\\/@\]+$";</p>
177 pub fn set_labels(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
178 self.inner = self.inner.set_labels(input);
179 self
180 }
181 /// <p>Labels to improve discovery of apps in search results.</p>
182 /// <p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p>
183 /// <p>Pattern: "^\[a-zA-Z0-9+\\-_:\\/@\]+$";</p>
184 pub fn get_labels(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
185 self.inner.get_labels()
186 }
187 /// <p>A local text file that contains the license of the app that matches the spdxLicenseID value of your application. The file has the format file://<path>/<filename>.</p>
188 /// <p>Maximum size 5 MB</p>
189 /// <p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
190 pub fn license_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191 self.inner = self.inner.license_body(input.into());
192 self
193 }
194 /// <p>A local text file that contains the license of the app that matches the spdxLicenseID value of your application. The file has the format file://<path>/<filename>.</p>
195 /// <p>Maximum size 5 MB</p>
196 /// <p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
197 pub fn set_license_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.inner = self.inner.set_license_body(input);
199 self
200 }
201 /// <p>A local text file that contains the license of the app that matches the spdxLicenseID value of your application. The file has the format file://<path>/<filename>.</p>
202 /// <p>Maximum size 5 MB</p>
203 /// <p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
204 pub fn get_license_body(&self) -> &::std::option::Option<::std::string::String> {
205 self.inner.get_license_body()
206 }
207 /// <p>A link to the S3 object that contains the license of the app that matches the spdxLicenseID value of your application.</p>
208 /// <p>Maximum size 5 MB</p>
209 /// <p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
210 pub fn license_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211 self.inner = self.inner.license_url(input.into());
212 self
213 }
214 /// <p>A link to the S3 object that contains the license of the app that matches the spdxLicenseID value of your application.</p>
215 /// <p>Maximum size 5 MB</p>
216 /// <p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
217 pub fn set_license_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218 self.inner = self.inner.set_license_url(input);
219 self
220 }
221 /// <p>A link to the S3 object that contains the license of the app that matches the spdxLicenseID value of your application.</p>
222 /// <p>Maximum size 5 MB</p>
223 /// <p>You can specify only one of licenseBody and licenseUrl; otherwise, an error results.</p>
224 pub fn get_license_url(&self) -> &::std::option::Option<::std::string::String> {
225 self.inner.get_license_url()
226 }
227 /// <p>The name of the application that you want to publish.</p>
228 /// <p>Minimum length=1. Maximum length=140</p>
229 /// <p>Pattern: "\[a-zA-Z0-9\\-\]+";</p>
230 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.inner = self.inner.name(input.into());
232 self
233 }
234 /// <p>The name of the application that you want to publish.</p>
235 /// <p>Minimum length=1. Maximum length=140</p>
236 /// <p>Pattern: "\[a-zA-Z0-9\\-\]+";</p>
237 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238 self.inner = self.inner.set_name(input);
239 self
240 }
241 /// <p>The name of the application that you want to publish.</p>
242 /// <p>Minimum length=1. Maximum length=140</p>
243 /// <p>Pattern: "\[a-zA-Z0-9\\-\]+";</p>
244 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
245 self.inner.get_name()
246 }
247 /// <p>A local text readme file in Markdown language that contains a more detailed description of the application and how it works. The file has the format file://<path>/<filename>.</p>
248 /// <p>Maximum size 5 MB</p>
249 /// <p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
250 pub fn readme_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251 self.inner = self.inner.readme_body(input.into());
252 self
253 }
254 /// <p>A local text readme file in Markdown language that contains a more detailed description of the application and how it works. The file has the format file://<path>/<filename>.</p>
255 /// <p>Maximum size 5 MB</p>
256 /// <p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
257 pub fn set_readme_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.inner = self.inner.set_readme_body(input);
259 self
260 }
261 /// <p>A local text readme file in Markdown language that contains a more detailed description of the application and how it works. The file has the format file://<path>/<filename>.</p>
262 /// <p>Maximum size 5 MB</p>
263 /// <p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
264 pub fn get_readme_body(&self) -> &::std::option::Option<::std::string::String> {
265 self.inner.get_readme_body()
266 }
267 /// <p>A link to the S3 object in Markdown language that contains a more detailed description of the application and how it works.</p>
268 /// <p>Maximum size 5 MB</p>
269 /// <p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
270 pub fn readme_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271 self.inner = self.inner.readme_url(input.into());
272 self
273 }
274 /// <p>A link to the S3 object in Markdown language that contains a more detailed description of the application and how it works.</p>
275 /// <p>Maximum size 5 MB</p>
276 /// <p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
277 pub fn set_readme_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278 self.inner = self.inner.set_readme_url(input);
279 self
280 }
281 /// <p>A link to the S3 object in Markdown language that contains a more detailed description of the application and how it works.</p>
282 /// <p>Maximum size 5 MB</p>
283 /// <p>You can specify only one of readmeBody and readmeUrl; otherwise, an error results.</p>
284 pub fn get_readme_url(&self) -> &::std::option::Option<::std::string::String> {
285 self.inner.get_readme_url()
286 }
287 /// <p>The semantic version of the application:</p>
288 /// <p><a href="https://semver.org/">https://semver.org/</a></p>
289 pub fn semantic_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290 self.inner = self.inner.semantic_version(input.into());
291 self
292 }
293 /// <p>The semantic version of the application:</p>
294 /// <p><a href="https://semver.org/">https://semver.org/</a></p>
295 pub fn set_semantic_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296 self.inner = self.inner.set_semantic_version(input);
297 self
298 }
299 /// <p>The semantic version of the application:</p>
300 /// <p><a href="https://semver.org/">https://semver.org/</a></p>
301 pub fn get_semantic_version(&self) -> &::std::option::Option<::std::string::String> {
302 self.inner.get_semantic_version()
303 }
304 /// <p>A link to the S3 object that contains the ZIP archive of the source code for this version of your application.</p>
305 /// <p>Maximum size 50 MB</p>
306 pub fn source_code_archive_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
307 self.inner = self.inner.source_code_archive_url(input.into());
308 self
309 }
310 /// <p>A link to the S3 object that contains the ZIP archive of the source code for this version of your application.</p>
311 /// <p>Maximum size 50 MB</p>
312 pub fn set_source_code_archive_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313 self.inner = self.inner.set_source_code_archive_url(input);
314 self
315 }
316 /// <p>A link to the S3 object that contains the ZIP archive of the source code for this version of your application.</p>
317 /// <p>Maximum size 50 MB</p>
318 pub fn get_source_code_archive_url(&self) -> &::std::option::Option<::std::string::String> {
319 self.inner.get_source_code_archive_url()
320 }
321 /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
322 pub fn source_code_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
323 self.inner = self.inner.source_code_url(input.into());
324 self
325 }
326 /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
327 pub fn set_source_code_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
328 self.inner = self.inner.set_source_code_url(input);
329 self
330 }
331 /// <p>A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.</p>
332 pub fn get_source_code_url(&self) -> &::std::option::Option<::std::string::String> {
333 self.inner.get_source_code_url()
334 }
335 /// <p>A valid identifier from <a href="https://spdx.org/licenses/">https://spdx.org/licenses/</a>.</p>
336 pub fn spdx_license_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
337 self.inner = self.inner.spdx_license_id(input.into());
338 self
339 }
340 /// <p>A valid identifier from <a href="https://spdx.org/licenses/">https://spdx.org/licenses/</a>.</p>
341 pub fn set_spdx_license_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
342 self.inner = self.inner.set_spdx_license_id(input);
343 self
344 }
345 /// <p>A valid identifier from <a href="https://spdx.org/licenses/">https://spdx.org/licenses/</a>.</p>
346 pub fn get_spdx_license_id(&self) -> &::std::option::Option<::std::string::String> {
347 self.inner.get_spdx_license_id()
348 }
349 /// <p>The local raw packaged AWS SAM template file of your application. The file has the format file://<path>/<filename>.</p>
350 /// <p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
351 pub fn template_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
352 self.inner = self.inner.template_body(input.into());
353 self
354 }
355 /// <p>The local raw packaged AWS SAM template file of your application. The file has the format file://<path>/<filename>.</p>
356 /// <p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
357 pub fn set_template_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
358 self.inner = self.inner.set_template_body(input);
359 self
360 }
361 /// <p>The local raw packaged AWS SAM template file of your application. The file has the format file://<path>/<filename>.</p>
362 /// <p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
363 pub fn get_template_body(&self) -> &::std::option::Option<::std::string::String> {
364 self.inner.get_template_body()
365 }
366 /// <p>A link to the S3 object containing the packaged AWS SAM template of your application.</p>
367 /// <p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
368 pub fn template_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
369 self.inner = self.inner.template_url(input.into());
370 self
371 }
372 /// <p>A link to the S3 object containing the packaged AWS SAM template of your application.</p>
373 /// <p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
374 pub fn set_template_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
375 self.inner = self.inner.set_template_url(input);
376 self
377 }
378 /// <p>A link to the S3 object containing the packaged AWS SAM template of your application.</p>
379 /// <p>You can specify only one of templateBody and templateUrl; otherwise an error results.</p>
380 pub fn get_template_url(&self) -> &::std::option::Option<::std::string::String> {
381 self.inner.get_template_url()
382 }
383}