1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_bucket_metadata_table_configuration::_get_bucket_metadata_table_configuration_output::GetBucketMetadataTableConfigurationOutputBuilder;
34pub use crate::operation::get_bucket_metadata_table_configuration::_get_bucket_metadata_table_configuration_input::GetBucketMetadataTableConfigurationInputBuilder;
56impl crate::operation::get_bucket_metadata_table_configuration::builders::GetBucketMetadataTableConfigurationInputBuilder {
7/// Sends a request with this input using the given client.
8pub async fn send_with(
9self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18let mut fluent_builder = client.get_bucket_metadata_table_configuration();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21}
22}
23/// Fluent builder constructing a request to `GetBucketMetadataTableConfiguration`.
24///
25/// <p>Retrieves the metadata table configuration for a general purpose bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html">Accelerating data discovery with S3 Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
26/// <dl>
27/// <dt>
28/// Permissions
29/// </dt>
30/// <dd>
31/// <p>To use this operation, you must have the <code>s3:GetBucketMetadataTableConfiguration</code> permission. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html">Setting up permissions for configuring metadata tables</a> in the <i>Amazon S3 User Guide</i>.</p>
32/// </dd>
33/// </dl>
34/// <p>The following operations are related to <code>GetBucketMetadataTableConfiguration</code>:</p>
35/// <ul>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataTableConfiguration.html">CreateBucketMetadataTableConfiguration</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataTableConfiguration.html">DeleteBucketMetadataTableConfiguration</a></p></li>
40/// </ul>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct GetBucketMetadataTableConfigurationFluentBuilder {
43 handle: ::std::sync::Arc<crate::client::Handle>,
44 inner: crate::operation::get_bucket_metadata_table_configuration::builders::GetBucketMetadataTableConfigurationInputBuilder,
45 config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48crate::client::customize::internal::CustomizableSend<
49crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
50crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
51 > for GetBucketMetadataTableConfigurationFluentBuilder
52{
53fn send(
54self,
55 config_override: crate::config::Builder,
56 ) -> crate::client::customize::internal::BoxFuture<
57crate::client::customize::internal::SendResult<
58crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
59crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
60 >,
61 > {
62 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63 }
64}
65impl GetBucketMetadataTableConfigurationFluentBuilder {
66/// Creates a new `GetBucketMetadataTableConfigurationFluentBuilder`.
67pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68Self {
69 handle,
70 inner: ::std::default::Default::default(),
71 config_override: ::std::option::Option::None,
72 }
73 }
74/// Access the GetBucketMetadataTableConfiguration as a reference.
75pub fn as_input(&self) -> &crate::operation::get_bucket_metadata_table_configuration::builders::GetBucketMetadataTableConfigurationInputBuilder {
76&self.inner
77 }
78/// Sends the request and returns the response.
79 ///
80 /// If an error occurs, an `SdkError` will be returned with additional details that
81 /// can be matched against.
82 ///
83 /// By default, any retryable failures will be retried twice. Retry behavior
84 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
85 /// set when configuring the client.
86pub async fn send(
87self,
88 ) -> ::std::result::Result<
89crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
90 ::aws_smithy_runtime_api::client::result::SdkError<
91crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
92 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93 >,
94 > {
95let input = self
96.inner
97 .build()
98 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99let runtime_plugins =
100crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfiguration::operation_runtime_plugins(
101self.handle.runtime_plugins.clone(),
102&self.handle.conf,
103self.config_override,
104 );
105crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfiguration::orchestrate(&runtime_plugins, input).await
106}
107108/// Consumes this builder, creating a customizable operation that can be modified before being sent.
109pub fn customize(
110self,
111 ) -> crate::client::customize::CustomizableOperation<
112crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
113crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
114Self,
115 > {
116crate::client::customize::CustomizableOperation::new(self)
117 }
118pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
119self.set_config_override(::std::option::Option::Some(config_override.into()));
120self
121}
122123pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
124self.config_override = config_override;
125self
126}
127/// <p>The general purpose bucket that contains the metadata table configuration that you want to retrieve.</p>
128pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129self.inner = self.inner.bucket(input.into());
130self
131}
132/// <p>The general purpose bucket that contains the metadata table configuration that you want to retrieve.</p>
133pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134self.inner = self.inner.set_bucket(input);
135self
136}
137/// <p>The general purpose bucket that contains the metadata table configuration that you want to retrieve.</p>
138pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
139self.inner.get_bucket()
140 }
141/// <p>The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.</p>
142pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143self.inner = self.inner.expected_bucket_owner(input.into());
144self
145}
146/// <p>The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.</p>
147pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148self.inner = self.inner.set_expected_bucket_owner(input);
149self
150}
151/// <p>The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.</p>
152pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
153self.inner.get_expected_bucket_owner()
154 }
155}