Skip to main content

aws_sdk_cloudfront/operation/list_distributions_by_realtime_log_config/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_distributions_by_realtime_log_config::_list_distributions_by_realtime_log_config_input::ListDistributionsByRealtimeLogConfigInputBuilder;
3
4pub use crate::operation::list_distributions_by_realtime_log_config::_list_distributions_by_realtime_log_config_output::ListDistributionsByRealtimeLogConfigOutputBuilder;
5
6impl crate::operation::list_distributions_by_realtime_log_config::builders::ListDistributionsByRealtimeLogConfigInputBuilder {
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_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_distributions_by_realtime_log_config();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListDistributionsByRealtimeLogConfig`.
24///
25/// <p>Gets a list of distributions that have a cache behavior that's associated with the specified real-time log configuration.</p>
26/// <p>You can specify the real-time log configuration by its name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to list distributions for.</p>
27/// <p>You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the <code>NextMarker</code> value from the current response as the <code>Marker</code> value in the subsequent request.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct ListDistributionsByRealtimeLogConfigFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::list_distributions_by_realtime_log_config::builders::ListDistributionsByRealtimeLogConfigInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigOutput,
37        crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigError,
38    > for ListDistributionsByRealtimeLogConfigFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigOutput,
46            crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl ListDistributionsByRealtimeLogConfigFluentBuilder {
53    /// Creates a new `ListDistributionsByRealtimeLogConfigFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the ListDistributionsByRealtimeLogConfig as a reference.
62    pub fn as_input(
63        &self,
64    ) -> &crate::operation::list_distributions_by_realtime_log_config::builders::ListDistributionsByRealtimeLogConfigInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins =
89            crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfig::operation_runtime_plugins(
90                self.handle.runtime_plugins.clone(),
91                &self.handle.conf,
92                self.config_override,
93            );
94        crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfig::orchestrate(&runtime_plugins, input).await
95    }
96
97    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
98    pub fn customize(
99        self,
100    ) -> crate::client::customize::CustomizableOperation<
101        crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigOutput,
102        crate::operation::list_distributions_by_realtime_log_config::ListDistributionsByRealtimeLogConfigError,
103        Self,
104    > {
105        crate::client::customize::CustomizableOperation::new(self)
106    }
107    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108        self.set_config_override(::std::option::Option::Some(config_override.into()));
109        self
110    }
111
112    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113        self.config_override = config_override;
114        self
115    }
116    /// <p>Use this field when paginating results to indicate where to begin in your list of distributions. The response includes distributions in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
117    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.inner = self.inner.marker(input.into());
119        self
120    }
121    /// <p>Use this field when paginating results to indicate where to begin in your list of distributions. The response includes distributions in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
122    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.inner = self.inner.set_marker(input);
124        self
125    }
126    /// <p>Use this field when paginating results to indicate where to begin in your list of distributions. The response includes distributions in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
127    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
128        self.inner.get_marker()
129    }
130    /// <p>The maximum number of distributions that you want in the response.</p>
131    pub fn max_items(mut self, input: i32) -> Self {
132        self.inner = self.inner.max_items(input);
133        self
134    }
135    /// <p>The maximum number of distributions that you want in the response.</p>
136    pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
137        self.inner = self.inner.set_max_items(input);
138        self
139    }
140    /// <p>The maximum number of distributions that you want in the response.</p>
141    pub fn get_max_items(&self) -> &::std::option::Option<i32> {
142        self.inner.get_max_items()
143    }
144    /// <p>The name of the real-time log configuration whose associated distributions you want to list.</p>
145    pub fn realtime_log_config_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.realtime_log_config_name(input.into());
147        self
148    }
149    /// <p>The name of the real-time log configuration whose associated distributions you want to list.</p>
150    pub fn set_realtime_log_config_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_realtime_log_config_name(input);
152        self
153    }
154    /// <p>The name of the real-time log configuration whose associated distributions you want to list.</p>
155    pub fn get_realtime_log_config_name(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_realtime_log_config_name()
157    }
158    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration whose associated distributions you want to list.</p>
159    pub fn realtime_log_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.inner = self.inner.realtime_log_config_arn(input.into());
161        self
162    }
163    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration whose associated distributions you want to list.</p>
164    pub fn set_realtime_log_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.inner = self.inner.set_realtime_log_config_arn(input);
166        self
167    }
168    /// <p>The Amazon Resource Name (ARN) of the real-time log configuration whose associated distributions you want to list.</p>
169    pub fn get_realtime_log_config_arn(&self) -> &::std::option::Option<::std::string::String> {
170        self.inner.get_realtime_log_config_arn()
171    }
172}