Skip to main content

aws_sdk_cloudfront/operation/list_distributions_by_response_headers_policy_id/
builders.rs

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