aws_sdk_s3tables/operation/delete_table_bucket_metrics_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_table_bucket_metrics_configuration::_delete_table_bucket_metrics_configuration_output::DeleteTableBucketMetricsConfigurationOutputBuilder;
3
4pub use crate::operation::delete_table_bucket_metrics_configuration::_delete_table_bucket_metrics_configuration_input::DeleteTableBucketMetricsConfigurationInputBuilder;
5
6impl crate::operation::delete_table_bucket_metrics_configuration::builders::DeleteTableBucketMetricsConfigurationInputBuilder {
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::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_table_bucket_metrics_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteTableBucketMetricsConfiguration`.
24///
25/// <p>Deletes the metrics configuration for a table bucket.</p>
26/// <dl>
27/// <dt>
28/// Permissions
29/// </dt>
30/// <dd>
31/// <p>You must have the <code>s3tables:DeleteTableBucketMetricsConfiguration</code> permission to use this operation.</p>
32/// </dd>
33/// </dl>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct DeleteTableBucketMetricsConfigurationFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::delete_table_bucket_metrics_configuration::builders::DeleteTableBucketMetricsConfigurationInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationOutput,
43        crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationError,
44    > for DeleteTableBucketMetricsConfigurationFluentBuilder
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::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationOutput,
52            crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl DeleteTableBucketMetricsConfigurationFluentBuilder {
59    /// Creates a new `DeleteTableBucketMetricsConfigurationFluentBuilder`.
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 DeleteTableBucketMetricsConfiguration as a reference.
68    pub fn as_input(
69        &self,
70    ) -> &crate::operation::delete_table_bucket_metrics_configuration::builders::DeleteTableBucketMetricsConfigurationInputBuilder {
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::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationOutput,
85        ::aws_smithy_runtime_api::client::result::SdkError<
86            crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationError,
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::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfiguration::operation_runtime_plugins(
96                self.handle.runtime_plugins.clone(),
97                &self.handle.conf,
98                self.config_override,
99            );
100        crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfiguration::orchestrate(&runtime_plugins, input).await
101    }
102
103    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
104    pub fn customize(
105        self,
106    ) -> crate::client::customize::CustomizableOperation<
107        crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationOutput,
108        crate::operation::delete_table_bucket_metrics_configuration::DeleteTableBucketMetricsConfigurationError,
109        Self,
110    > {
111        crate::client::customize::CustomizableOperation::new(self)
112    }
113    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
114        self.set_config_override(::std::option::Option::Some(config_override.into()));
115        self
116    }
117
118    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
119        self.config_override = config_override;
120        self
121    }
122    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
123    pub fn table_bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.inner = self.inner.table_bucket_arn(input.into());
125        self
126    }
127    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
128    pub fn set_table_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.inner = self.inner.set_table_bucket_arn(input);
130        self
131    }
132    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
133    pub fn get_table_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
134        self.inner.get_table_bucket_arn()
135    }
136}