aws_sdk_codedeploy/operation/list_application_revisions/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_application_revisions::_list_application_revisions_output::ListApplicationRevisionsOutputBuilder;
3
4pub use crate::operation::list_application_revisions::_list_application_revisions_input::ListApplicationRevisionsInputBuilder;
5
6impl crate::operation::list_application_revisions::builders::ListApplicationRevisionsInputBuilder {
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::list_application_revisions::ListApplicationRevisionsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::list_application_revisions::ListApplicationRevisionsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.list_application_revisions();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ListApplicationRevisions`.
24///
25/// <p>Lists information about revisions for an application.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListApplicationRevisionsFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::list_application_revisions::builders::ListApplicationRevisionsInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::list_application_revisions::ListApplicationRevisionsOutput,
35 crate::operation::list_application_revisions::ListApplicationRevisionsError,
36 > for ListApplicationRevisionsFluentBuilder
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::list_application_revisions::ListApplicationRevisionsOutput,
44 crate::operation::list_application_revisions::ListApplicationRevisionsError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl ListApplicationRevisionsFluentBuilder {
51 /// Creates a new `ListApplicationRevisionsFluentBuilder`.
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 ListApplicationRevisions as a reference.
60 pub fn as_input(&self) -> &crate::operation::list_application_revisions::builders::ListApplicationRevisionsInputBuilder {
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::list_application_revisions::ListApplicationRevisionsOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::list_application_revisions::ListApplicationRevisionsError,
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::list_application_revisions::ListApplicationRevisions::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::list_application_revisions::ListApplicationRevisions::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::list_application_revisions::ListApplicationRevisionsOutput,
97 crate::operation::list_application_revisions::ListApplicationRevisionsError,
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 /// Create a paginator for this request
112 ///
113 /// Paginators are used by calling [`send().await`](crate::operation::list_application_revisions::paginator::ListApplicationRevisionsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114 pub fn into_paginator(self) -> crate::operation::list_application_revisions::paginator::ListApplicationRevisionsPaginator {
115 crate::operation::list_application_revisions::paginator::ListApplicationRevisionsPaginator::new(self.handle, self.inner)
116 }
117 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
118 pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.application_name(input.into());
120 self
121 }
122 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
123 pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_application_name(input);
125 self
126 }
127 /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p>
128 pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
129 self.inner.get_application_name()
130 }
131 /// <p>The column name to use to sort the list results:</p>
132 /// <ul>
133 /// <li>
134 /// <p><code>registerTime</code>: Sort by the time the revisions were registered with CodeDeploy.</p></li>
135 /// <li>
136 /// <p><code>firstUsedTime</code>: Sort by the time the revisions were first used in a deployment.</p></li>
137 /// <li>
138 /// <p><code>lastUsedTime</code>: Sort by the time the revisions were last used in a deployment.</p></li>
139 /// </ul>
140 /// <p>If not specified or set to null, the results are returned in an arbitrary order.</p>
141 pub fn sort_by(mut self, input: crate::types::ApplicationRevisionSortBy) -> Self {
142 self.inner = self.inner.sort_by(input);
143 self
144 }
145 /// <p>The column name to use to sort the list results:</p>
146 /// <ul>
147 /// <li>
148 /// <p><code>registerTime</code>: Sort by the time the revisions were registered with CodeDeploy.</p></li>
149 /// <li>
150 /// <p><code>firstUsedTime</code>: Sort by the time the revisions were first used in a deployment.</p></li>
151 /// <li>
152 /// <p><code>lastUsedTime</code>: Sort by the time the revisions were last used in a deployment.</p></li>
153 /// </ul>
154 /// <p>If not specified or set to null, the results are returned in an arbitrary order.</p>
155 pub fn set_sort_by(mut self, input: ::std::option::Option<crate::types::ApplicationRevisionSortBy>) -> Self {
156 self.inner = self.inner.set_sort_by(input);
157 self
158 }
159 /// <p>The column name to use to sort the list results:</p>
160 /// <ul>
161 /// <li>
162 /// <p><code>registerTime</code>: Sort by the time the revisions were registered with CodeDeploy.</p></li>
163 /// <li>
164 /// <p><code>firstUsedTime</code>: Sort by the time the revisions were first used in a deployment.</p></li>
165 /// <li>
166 /// <p><code>lastUsedTime</code>: Sort by the time the revisions were last used in a deployment.</p></li>
167 /// </ul>
168 /// <p>If not specified or set to null, the results are returned in an arbitrary order.</p>
169 pub fn get_sort_by(&self) -> &::std::option::Option<crate::types::ApplicationRevisionSortBy> {
170 self.inner.get_sort_by()
171 }
172 /// <p>The order in which to sort the list results:</p>
173 /// <ul>
174 /// <li>
175 /// <p><code>ascending</code>: ascending order.</p></li>
176 /// <li>
177 /// <p><code>descending</code>: descending order.</p></li>
178 /// </ul>
179 /// <p>If not specified, the results are sorted in ascending order.</p>
180 /// <p>If set to null, the results are sorted in an arbitrary order.</p>
181 pub fn sort_order(mut self, input: crate::types::SortOrder) -> Self {
182 self.inner = self.inner.sort_order(input);
183 self
184 }
185 /// <p>The order in which to sort the list results:</p>
186 /// <ul>
187 /// <li>
188 /// <p><code>ascending</code>: ascending order.</p></li>
189 /// <li>
190 /// <p><code>descending</code>: descending order.</p></li>
191 /// </ul>
192 /// <p>If not specified, the results are sorted in ascending order.</p>
193 /// <p>If set to null, the results are sorted in an arbitrary order.</p>
194 pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
195 self.inner = self.inner.set_sort_order(input);
196 self
197 }
198 /// <p>The order in which to sort the list results:</p>
199 /// <ul>
200 /// <li>
201 /// <p><code>ascending</code>: ascending order.</p></li>
202 /// <li>
203 /// <p><code>descending</code>: descending order.</p></li>
204 /// </ul>
205 /// <p>If not specified, the results are sorted in ascending order.</p>
206 /// <p>If set to null, the results are sorted in an arbitrary order.</p>
207 pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
208 self.inner.get_sort_order()
209 }
210 /// <p>An Amazon S3 bucket name to limit the search for revisions.</p>
211 /// <p>If set to null, all of the user's buckets are searched.</p>
212 pub fn s3_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213 self.inner = self.inner.s3_bucket(input.into());
214 self
215 }
216 /// <p>An Amazon S3 bucket name to limit the search for revisions.</p>
217 /// <p>If set to null, all of the user's buckets are searched.</p>
218 pub fn set_s3_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.inner = self.inner.set_s3_bucket(input);
220 self
221 }
222 /// <p>An Amazon S3 bucket name to limit the search for revisions.</p>
223 /// <p>If set to null, all of the user's buckets are searched.</p>
224 pub fn get_s3_bucket(&self) -> &::std::option::Option<::std::string::String> {
225 self.inner.get_s3_bucket()
226 }
227 /// <p>A key prefix for the set of Amazon S3 objects to limit the search for revisions.</p>
228 pub fn s3_key_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229 self.inner = self.inner.s3_key_prefix(input.into());
230 self
231 }
232 /// <p>A key prefix for the set of Amazon S3 objects to limit the search for revisions.</p>
233 pub fn set_s3_key_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
234 self.inner = self.inner.set_s3_key_prefix(input);
235 self
236 }
237 /// <p>A key prefix for the set of Amazon S3 objects to limit the search for revisions.</p>
238 pub fn get_s3_key_prefix(&self) -> &::std::option::Option<::std::string::String> {
239 self.inner.get_s3_key_prefix()
240 }
241 /// <p>Whether to list revisions based on whether the revision is the target revision of a deployment group:</p>
242 /// <ul>
243 /// <li>
244 /// <p><code>include</code>: List revisions that are target revisions of a deployment group.</p></li>
245 /// <li>
246 /// <p><code>exclude</code>: Do not list revisions that are target revisions of a deployment group.</p></li>
247 /// <li>
248 /// <p><code>ignore</code>: List all revisions.</p></li>
249 /// </ul>
250 pub fn deployed(mut self, input: crate::types::ListStateFilterAction) -> Self {
251 self.inner = self.inner.deployed(input);
252 self
253 }
254 /// <p>Whether to list revisions based on whether the revision is the target revision of a deployment group:</p>
255 /// <ul>
256 /// <li>
257 /// <p><code>include</code>: List revisions that are target revisions of a deployment group.</p></li>
258 /// <li>
259 /// <p><code>exclude</code>: Do not list revisions that are target revisions of a deployment group.</p></li>
260 /// <li>
261 /// <p><code>ignore</code>: List all revisions.</p></li>
262 /// </ul>
263 pub fn set_deployed(mut self, input: ::std::option::Option<crate::types::ListStateFilterAction>) -> Self {
264 self.inner = self.inner.set_deployed(input);
265 self
266 }
267 /// <p>Whether to list revisions based on whether the revision is the target revision of a deployment group:</p>
268 /// <ul>
269 /// <li>
270 /// <p><code>include</code>: List revisions that are target revisions of a deployment group.</p></li>
271 /// <li>
272 /// <p><code>exclude</code>: Do not list revisions that are target revisions of a deployment group.</p></li>
273 /// <li>
274 /// <p><code>ignore</code>: List all revisions.</p></li>
275 /// </ul>
276 pub fn get_deployed(&self) -> &::std::option::Option<crate::types::ListStateFilterAction> {
277 self.inner.get_deployed()
278 }
279 /// <p>An identifier returned from the previous <code>ListApplicationRevisions</code> call. It can be used to return the next set of applications in the list.</p>
280 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281 self.inner = self.inner.next_token(input.into());
282 self
283 }
284 /// <p>An identifier returned from the previous <code>ListApplicationRevisions</code> call. It can be used to return the next set of applications in the list.</p>
285 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286 self.inner = self.inner.set_next_token(input);
287 self
288 }
289 /// <p>An identifier returned from the previous <code>ListApplicationRevisions</code> call. It can be used to return the next set of applications in the list.</p>
290 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
291 self.inner.get_next_token()
292 }
293}