aws_sdk_s3tables/operation/get_table_bucket_maintenance_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_table_bucket_maintenance_configuration::_get_table_bucket_maintenance_configuration_output::GetTableBucketMaintenanceConfigurationOutputBuilder;
3
4pub use crate::operation::get_table_bucket_maintenance_configuration::_get_table_bucket_maintenance_configuration_input::GetTableBucketMaintenanceConfigurationInputBuilder;
5
6impl crate::operation::get_table_bucket_maintenance_configuration::builders::GetTableBucketMaintenanceConfigurationInputBuilder {
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::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_table_bucket_maintenance_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetTableBucketMaintenanceConfiguration`.
24///
25/// <p>Gets details about a maintenance configuration for a given table bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-table-buckets-maintenance.html">Amazon S3 table bucket maintenance</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p>
26/// <dl>
27/// <dt>
28/// Permissions
29/// </dt>
30/// <dd>
31/// <p>You must have the <code>s3tables:GetTableBucketMaintenanceConfiguration</code> permission to use this operation.</p>
32/// </dd>
33/// </dl>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct GetTableBucketMaintenanceConfigurationFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::get_table_bucket_maintenance_configuration::builders::GetTableBucketMaintenanceConfigurationInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationOutput,
43        crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationError,
44    > for GetTableBucketMaintenanceConfigurationFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationOutput,
52            crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl GetTableBucketMaintenanceConfigurationFluentBuilder {
59    /// Creates a new `GetTableBucketMaintenanceConfigurationFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the GetTableBucketMaintenanceConfiguration as a reference.
68    pub fn as_input(
69        &self,
70    ) -> &crate::operation::get_table_bucket_maintenance_configuration::builders::GetTableBucketMaintenanceConfigurationInputBuilder {
71        &self.inner
72    }
73    /// Sends the request and returns the response.
74    ///
75    /// If an error occurs, an `SdkError` will be returned with additional details that
76    /// can be matched against.
77    ///
78    /// By default, any retryable failures will be retried twice. Retry behavior
79    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
80    /// set when configuring the client.
81    pub async fn send(
82        self,
83    ) -> ::std::result::Result<
84        crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationOutput,
85        ::aws_smithy_runtime_api::client::result::SdkError<
86            crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationError,
87            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
88        >,
89    > {
90        let input = self
91            .inner
92            .build()
93            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
94        let runtime_plugins =
95            crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfiguration::operation_runtime_plugins(
96                self.handle.runtime_plugins.clone(),
97                &self.handle.conf,
98                self.config_override,
99            );
100        crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfiguration::orchestrate(&runtime_plugins, input)
101            .await
102    }
103
104    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
105    pub fn customize(
106        self,
107    ) -> crate::client::customize::CustomizableOperation<
108        crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationOutput,
109        crate::operation::get_table_bucket_maintenance_configuration::GetTableBucketMaintenanceConfigurationError,
110        Self,
111    > {
112        crate::client::customize::CustomizableOperation::new(self)
113    }
114    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
115        self.set_config_override(::std::option::Option::Some(config_override.into()));
116        self
117    }
118
119    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
120        self.config_override = config_override;
121        self
122    }
123    /// <p>The Amazon Resource Name (ARN) of the table bucket associated with the maintenance configuration.</p>
124    pub fn table_bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.inner = self.inner.table_bucket_arn(input.into());
126        self
127    }
128    /// <p>The Amazon Resource Name (ARN) of the table bucket associated with the maintenance configuration.</p>
129    pub fn set_table_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.inner = self.inner.set_table_bucket_arn(input);
131        self
132    }
133    /// <p>The Amazon Resource Name (ARN) of the table bucket associated with the maintenance configuration.</p>
134    pub fn get_table_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
135        self.inner.get_table_bucket_arn()
136    }
137}