aws_sdk_serverlessapplicationrepository/operation/update_application/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_application::_update_application_output::UpdateApplicationOutputBuilder;
3
4pub use crate::operation::update_application::_update_application_input::UpdateApplicationInputBuilder;
5
6impl crate::operation::update_application::builders::UpdateApplicationInputBuilder {
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::update_application::UpdateApplicationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_application::UpdateApplicationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_application();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateApplication`.
24///
25/// <p>Updates the specified application.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateApplicationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_application::builders::UpdateApplicationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_application::UpdateApplicationOutput,
35        crate::operation::update_application::UpdateApplicationError,
36    > for UpdateApplicationFluentBuilder
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::update_application::UpdateApplicationOutput,
44            crate::operation::update_application::UpdateApplicationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateApplicationFluentBuilder {
51    /// Creates a new `UpdateApplicationFluentBuilder`.
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 UpdateApplication as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_application::builders::UpdateApplicationInputBuilder {
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::update_application::UpdateApplicationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_application::UpdateApplicationError,
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::update_application::UpdateApplication::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_application::UpdateApplication::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::update_application::UpdateApplicationOutput,
97        crate::operation::update_application::UpdateApplicationError,
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) of the application.</p>
112    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.application_id(input.into());
114        self
115    }
116    /// <p>The Amazon Resource Name (ARN) of the application.</p>
117    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_application_id(input);
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) of the application.</p>
122    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_application_id()
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 author(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.author(input.into());
130        self
131    }
132    /// <p>The name of the author publishing the app.</p>
133    /// <p>Minimum length=1. Maximum length=127.</p>
134    /// <p>Pattern "^\[a-z0-9\]((\[a-z0-9\]|-(?!-))*\[a-z0-9\])?$";</p>
135    pub fn set_author(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.inner = self.inner.set_author(input);
137        self
138    }
139    /// <p>The name of the author publishing the app.</p>
140    /// <p>Minimum length=1. Maximum length=127.</p>
141    /// <p>Pattern "^\[a-z0-9\]((\[a-z0-9\]|-(?!-))*\[a-z0-9\])?$";</p>
142    pub fn get_author(&self) -> &::std::option::Option<::std::string::String> {
143        self.inner.get_author()
144    }
145    /// <p>The description of the application.</p>
146    /// <p>Minimum length=1. Maximum length=256</p>
147    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.inner = self.inner.description(input.into());
149        self
150    }
151    /// <p>The description of the application.</p>
152    /// <p>Minimum length=1. Maximum length=256</p>
153    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.inner = self.inner.set_description(input);
155        self
156    }
157    /// <p>The description of the application.</p>
158    /// <p>Minimum length=1. Maximum length=256</p>
159    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
160        self.inner.get_description()
161    }
162    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
163    pub fn home_page_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.inner = self.inner.home_page_url(input.into());
165        self
166    }
167    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
168    pub fn set_home_page_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.inner = self.inner.set_home_page_url(input);
170        self
171    }
172    /// <p>A URL with more information about the application, for example the location of your GitHub repository for the application.</p>
173    pub fn get_home_page_url(&self) -> &::std::option::Option<::std::string::String> {
174        self.inner.get_home_page_url()
175    }
176    ///
177    /// Appends an item to `Labels`.
178    ///
179    /// To override the contents of this collection use [`set_labels`](Self::set_labels).
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 labels(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.inner = self.inner.labels(input.into());
186        self
187    }
188    /// <p>Labels to improve discovery of apps in search results.</p>
189    /// <p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p>
190    /// <p>Pattern: "^\[a-zA-Z0-9+\\-_:\\/@\]+$";</p>
191    pub fn set_labels(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
192        self.inner = self.inner.set_labels(input);
193        self
194    }
195    /// <p>Labels to improve discovery of apps in search results.</p>
196    /// <p>Minimum length=1. Maximum length=127. Maximum number of labels: 10</p>
197    /// <p>Pattern: "^\[a-zA-Z0-9+\\-_:\\/@\]+$";</p>
198    pub fn get_labels(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
199        self.inner.get_labels()
200    }
201    /// <p>A text readme file in Markdown language that contains a more detailed description of the application and how it works.</p>
202    /// <p>Maximum size 5 MB</p>
203    pub fn readme_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204        self.inner = self.inner.readme_body(input.into());
205        self
206    }
207    /// <p>A text readme file in Markdown language that contains a more detailed description of the application and how it works.</p>
208    /// <p>Maximum size 5 MB</p>
209    pub fn set_readme_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.inner = self.inner.set_readme_body(input);
211        self
212    }
213    /// <p>A text readme file in Markdown language that contains a more detailed description of the application and how it works.</p>
214    /// <p>Maximum size 5 MB</p>
215    pub fn get_readme_body(&self) -> &::std::option::Option<::std::string::String> {
216        self.inner.get_readme_body()
217    }
218    /// <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p>
219    /// <p>Maximum size 5 MB</p>
220    pub fn readme_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221        self.inner = self.inner.readme_url(input.into());
222        self
223    }
224    /// <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p>
225    /// <p>Maximum size 5 MB</p>
226    pub fn set_readme_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.inner = self.inner.set_readme_url(input);
228        self
229    }
230    /// <p>A link to the readme file in Markdown language that contains a more detailed description of the application and how it works.</p>
231    /// <p>Maximum size 5 MB</p>
232    pub fn get_readme_url(&self) -> &::std::option::Option<::std::string::String> {
233        self.inner.get_readme_url()
234    }
235}