aws_sdk_notifications/operation/list_notification_configurations/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_notification_configurations::_list_notification_configurations_output::ListNotificationConfigurationsOutputBuilder;
3
4pub use crate::operation::list_notification_configurations::_list_notification_configurations_input::ListNotificationConfigurationsInputBuilder;
5
6impl crate::operation::list_notification_configurations::builders::ListNotificationConfigurationsInputBuilder {
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_notification_configurations::ListNotificationConfigurationsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.list_notification_configurations();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ListNotificationConfigurations`.
24///
25/// <p>Returns a list of abbreviated <code>NotificationConfigurations</code> according to specified filters, in reverse chronological order (newest first).</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListNotificationConfigurationsFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::list_notification_configurations::builders::ListNotificationConfigurationsInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::list_notification_configurations::ListNotificationConfigurationsOutput,
35 crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
36 > for ListNotificationConfigurationsFluentBuilder
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_notification_configurations::ListNotificationConfigurationsOutput,
44 crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl ListNotificationConfigurationsFluentBuilder {
51 /// Creates a new `ListNotificationConfigurationsFluentBuilder`.
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 ListNotificationConfigurations as a reference.
60 pub fn as_input(&self) -> &crate::operation::list_notification_configurations::builders::ListNotificationConfigurationsInputBuilder {
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_notification_configurations::ListNotificationConfigurationsOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
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_notification_configurations::ListNotificationConfigurations::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::list_notification_configurations::ListNotificationConfigurations::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_notification_configurations::ListNotificationConfigurationsOutput,
97 crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
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_notification_configurations::paginator::ListNotificationConfigurationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114 pub fn into_paginator(self) -> crate::operation::list_notification_configurations::paginator::ListNotificationConfigurationsPaginator {
115 crate::operation::list_notification_configurations::paginator::ListNotificationConfigurationsPaginator::new(self.handle, self.inner)
116 }
117 /// <p>The matched event source.</p>
118 /// <p>Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, <code>aws.ec2</code> and <code>aws.cloudwatch</code>. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level">Event delivery from Amazon Web Services services</a> in the <i>Amazon EventBridge User Guide</i>.</p>
119 pub fn event_rule_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.inner = self.inner.event_rule_source(input.into());
121 self
122 }
123 /// <p>The matched event source.</p>
124 /// <p>Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, <code>aws.ec2</code> and <code>aws.cloudwatch</code>. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level">Event delivery from Amazon Web Services services</a> in the <i>Amazon EventBridge User Guide</i>.</p>
125 pub fn set_event_rule_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.inner = self.inner.set_event_rule_source(input);
127 self
128 }
129 /// <p>The matched event source.</p>
130 /// <p>Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, <code>aws.ec2</code> and <code>aws.cloudwatch</code>. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level">Event delivery from Amazon Web Services services</a> in the <i>Amazon EventBridge User Guide</i>.</p>
131 pub fn get_event_rule_source(&self) -> &::std::option::Option<::std::string::String> {
132 self.inner.get_event_rule_source()
133 }
134 /// <p>The Amazon Resource Name (ARN) of the Channel to match.</p>
135 pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136 self.inner = self.inner.channel_arn(input.into());
137 self
138 }
139 /// <p>The Amazon Resource Name (ARN) of the Channel to match.</p>
140 pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.inner = self.inner.set_channel_arn(input);
142 self
143 }
144 /// <p>The Amazon Resource Name (ARN) of the Channel to match.</p>
145 pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
146 self.inner.get_channel_arn()
147 }
148 /// <p>The <code>NotificationConfiguration</code> status to match.</p>
149 /// <ul>
150 /// <li>
151 /// <p>Values:</p>
152 /// <ul>
153 /// <li>
154 /// <p><code>ACTIVE</code></p>
155 /// <ul>
156 /// <li>
157 /// <p>All <code>EventRules</code> are <code>ACTIVE</code> and any call can be run.</p></li>
158 /// </ul></li>
159 /// <li>
160 /// <p><code>PARTIALLY_ACTIVE</code></p>
161 /// <ul>
162 /// <li>
163 /// <p>Some <code>EventRules</code> are <code>ACTIVE</code> and some are <code>INACTIVE</code>. Any call can be run.</p></li>
164 /// <li>
165 /// <p>Any call can be run.</p></li>
166 /// </ul></li>
167 /// <li>
168 /// <p><code>INACTIVE</code></p>
169 /// <ul>
170 /// <li>
171 /// <p>All <code>EventRules</code> are <code>INACTIVE</code> and any call can be run.</p></li>
172 /// </ul></li>
173 /// <li>
174 /// <p><code>DELETING</code></p>
175 /// <ul>
176 /// <li>
177 /// <p>This <code>NotificationConfiguration</code> is being deleted.</p></li>
178 /// <li>
179 /// <p>Only <code>GET</code> and <code>LIST</code> calls can be run.</p></li>
180 /// </ul></li>
181 /// </ul></li>
182 /// </ul>
183 pub fn status(mut self, input: crate::types::NotificationConfigurationStatus) -> Self {
184 self.inner = self.inner.status(input);
185 self
186 }
187 /// <p>The <code>NotificationConfiguration</code> status to match.</p>
188 /// <ul>
189 /// <li>
190 /// <p>Values:</p>
191 /// <ul>
192 /// <li>
193 /// <p><code>ACTIVE</code></p>
194 /// <ul>
195 /// <li>
196 /// <p>All <code>EventRules</code> are <code>ACTIVE</code> and any call can be run.</p></li>
197 /// </ul></li>
198 /// <li>
199 /// <p><code>PARTIALLY_ACTIVE</code></p>
200 /// <ul>
201 /// <li>
202 /// <p>Some <code>EventRules</code> are <code>ACTIVE</code> and some are <code>INACTIVE</code>. Any call can be run.</p></li>
203 /// <li>
204 /// <p>Any call can be run.</p></li>
205 /// </ul></li>
206 /// <li>
207 /// <p><code>INACTIVE</code></p>
208 /// <ul>
209 /// <li>
210 /// <p>All <code>EventRules</code> are <code>INACTIVE</code> and any call can be run.</p></li>
211 /// </ul></li>
212 /// <li>
213 /// <p><code>DELETING</code></p>
214 /// <ul>
215 /// <li>
216 /// <p>This <code>NotificationConfiguration</code> is being deleted.</p></li>
217 /// <li>
218 /// <p>Only <code>GET</code> and <code>LIST</code> calls can be run.</p></li>
219 /// </ul></li>
220 /// </ul></li>
221 /// </ul>
222 pub fn set_status(mut self, input: ::std::option::Option<crate::types::NotificationConfigurationStatus>) -> Self {
223 self.inner = self.inner.set_status(input);
224 self
225 }
226 /// <p>The <code>NotificationConfiguration</code> status to match.</p>
227 /// <ul>
228 /// <li>
229 /// <p>Values:</p>
230 /// <ul>
231 /// <li>
232 /// <p><code>ACTIVE</code></p>
233 /// <ul>
234 /// <li>
235 /// <p>All <code>EventRules</code> are <code>ACTIVE</code> and any call can be run.</p></li>
236 /// </ul></li>
237 /// <li>
238 /// <p><code>PARTIALLY_ACTIVE</code></p>
239 /// <ul>
240 /// <li>
241 /// <p>Some <code>EventRules</code> are <code>ACTIVE</code> and some are <code>INACTIVE</code>. Any call can be run.</p></li>
242 /// <li>
243 /// <p>Any call can be run.</p></li>
244 /// </ul></li>
245 /// <li>
246 /// <p><code>INACTIVE</code></p>
247 /// <ul>
248 /// <li>
249 /// <p>All <code>EventRules</code> are <code>INACTIVE</code> and any call can be run.</p></li>
250 /// </ul></li>
251 /// <li>
252 /// <p><code>DELETING</code></p>
253 /// <ul>
254 /// <li>
255 /// <p>This <code>NotificationConfiguration</code> is being deleted.</p></li>
256 /// <li>
257 /// <p>Only <code>GET</code> and <code>LIST</code> calls can be run.</p></li>
258 /// </ul></li>
259 /// </ul></li>
260 /// </ul>
261 pub fn get_status(&self) -> &::std::option::Option<crate::types::NotificationConfigurationStatus> {
262 self.inner.get_status()
263 }
264 /// <p>The subtype used to filter the notification configurations in the request.</p>
265 pub fn subtype(mut self, input: crate::types::NotificationConfigurationSubtype) -> Self {
266 self.inner = self.inner.subtype(input);
267 self
268 }
269 /// <p>The subtype used to filter the notification configurations in the request.</p>
270 pub fn set_subtype(mut self, input: ::std::option::Option<crate::types::NotificationConfigurationSubtype>) -> Self {
271 self.inner = self.inner.set_subtype(input);
272 self
273 }
274 /// <p>The subtype used to filter the notification configurations in the request.</p>
275 pub fn get_subtype(&self) -> &::std::option::Option<crate::types::NotificationConfigurationSubtype> {
276 self.inner.get_subtype()
277 }
278 /// <p>The maximum number of results to be returned in this call. Defaults to 20.</p>
279 pub fn max_results(mut self, input: i32) -> Self {
280 self.inner = self.inner.max_results(input);
281 self
282 }
283 /// <p>The maximum number of results to be returned in this call. Defaults to 20.</p>
284 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
285 self.inner = self.inner.set_max_results(input);
286 self
287 }
288 /// <p>The maximum number of results to be returned in this call. Defaults to 20.</p>
289 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
290 self.inner.get_max_results()
291 }
292 /// <p>The start token for paginated calls. Retrieved from the response of a previous <code>ListEventRules</code> call. Next token uses Base64 encoding.</p>
293 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
294 self.inner = self.inner.next_token(input.into());
295 self
296 }
297 /// <p>The start token for paginated calls. Retrieved from the response of a previous <code>ListEventRules</code> call. Next token uses Base64 encoding.</p>
298 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
299 self.inner = self.inner.set_next_token(input);
300 self
301 }
302 /// <p>The start token for paginated calls. Retrieved from the response of a previous <code>ListEventRules</code> call. Next token uses Base64 encoding.</p>
303 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
304 self.inner.get_next_token()
305 }
306}