aws_sdk_dynamodb/operation/delete_backup/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_backup::_delete_backup_output::DeleteBackupOutputBuilder;
3
4pub use crate::operation::delete_backup::_delete_backup_input::DeleteBackupInputBuilder;
5
6impl crate::operation::delete_backup::builders::DeleteBackupInputBuilder {
7                    /// Sends a request with this input using the given client.
8                    pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9                        crate::operation::delete_backup::DeleteBackupOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::delete_backup::DeleteBackupError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.delete_backup();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `DeleteBackup`.
21/// 
22/// <p>Deletes an existing backup of a table.</p>
23/// <p>You can call <code>DeleteBackup</code> at a maximum rate of 10 times per second.</p>
24#[derive(::std::clone::Clone, ::std::fmt::Debug)]
25pub struct DeleteBackupFluentBuilder {
26                handle: ::std::sync::Arc<crate::client::Handle>,
27                inner: crate::operation::delete_backup::builders::DeleteBackupInputBuilder,
28config_override: ::std::option::Option<crate::config::Builder>,
29            }
30impl
31                crate::client::customize::internal::CustomizableSend<
32                    crate::operation::delete_backup::DeleteBackupOutput,
33                    crate::operation::delete_backup::DeleteBackupError,
34                > for DeleteBackupFluentBuilder
35            {
36                fn send(
37                    self,
38                    config_override: crate::config::Builder,
39                ) -> crate::client::customize::internal::BoxFuture<
40                    crate::client::customize::internal::SendResult<
41                        crate::operation::delete_backup::DeleteBackupOutput,
42                        crate::operation::delete_backup::DeleteBackupError,
43                    >,
44                > {
45                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
46                }
47            }
48impl DeleteBackupFluentBuilder {
49    /// Creates a new `DeleteBackupFluentBuilder`.
50                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
51                        Self {
52                            handle,
53                            inner: ::std::default::Default::default(),
54    config_override: ::std::option::Option::None,
55                        }
56                    }
57    /// Access the DeleteBackup as a reference.
58                    pub fn as_input(&self) -> &crate::operation::delete_backup::builders::DeleteBackupInputBuilder {
59                        &self.inner
60                    }
61    /// Sends the request and returns the response.
62                    ///
63                    /// If an error occurs, an `SdkError` will be returned with additional details that
64                    /// can be matched against.
65                    ///
66                    /// By default, any retryable failures will be retried twice. Retry behavior
67                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
68                    /// set when configuring the client. Note: retries are enabled by default when using
69                    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
70                    pub async fn send(self) -> ::std::result::Result<crate::operation::delete_backup::DeleteBackupOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_backup::DeleteBackupError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
71                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
72                        let runtime_plugins = crate::operation::delete_backup::DeleteBackup::operation_runtime_plugins(
73                            self.handle.runtime_plugins.clone(),
74                            &self.handle.conf,
75                            self.config_override,
76                        );
77                        crate::operation::delete_backup::DeleteBackup::orchestrate(&runtime_plugins, input).await
78                    }
79    
80                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
81                    pub fn customize(
82                        self,
83                    ) -> crate::client::customize::CustomizableOperation<crate::operation::delete_backup::DeleteBackupOutput, crate::operation::delete_backup::DeleteBackupError, Self> {
84                        crate::client::customize::CustomizableOperation::new(self)
85                    }
86    pub(crate) fn config_override(
87                            mut self,
88                            config_override: impl ::std::convert::Into<crate::config::Builder>,
89                        ) -> Self {
90                            self.set_config_override(::std::option::Option::Some(config_override.into()));
91                            self
92                        }
93    
94                        pub(crate) fn set_config_override(
95                            &mut self,
96                            config_override: ::std::option::Option<crate::config::Builder>,
97                        ) -> &mut Self {
98                            self.config_override = config_override;
99                            self
100                        }
101    /// <p>The ARN associated with the backup.</p>
102    pub fn backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103                    self.inner = self.inner.backup_arn(input.into());
104                    self
105                }
106    /// <p>The ARN associated with the backup.</p>
107    pub fn set_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108                    self.inner = self.inner.set_backup_arn(input);
109                    self
110                }
111    /// <p>The ARN associated with the backup.</p>
112    pub fn get_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
113                    self.inner.get_backup_arn()
114                }
115}
116