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.
69                    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>> {
70                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
71                        let runtime_plugins = crate::operation::delete_backup::DeleteBackup::operation_runtime_plugins(
72                            self.handle.runtime_plugins.clone(),
73                            &self.handle.conf,
74                            self.config_override,
75                        );
76                        crate::operation::delete_backup::DeleteBackup::orchestrate(&runtime_plugins, input).await
77                    }
78    
79                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
80                    pub fn customize(
81                        self,
82                    ) -> crate::client::customize::CustomizableOperation<crate::operation::delete_backup::DeleteBackupOutput, crate::operation::delete_backup::DeleteBackupError, Self> {
83                        crate::client::customize::CustomizableOperation::new(self)
84                    }
85    pub(crate) fn config_override(
86                            mut self,
87                            config_override: impl ::std::convert::Into<crate::config::Builder>,
88                        ) -> Self {
89                            self.set_config_override(::std::option::Option::Some(config_override.into()));
90                            self
91                        }
92    
93                        pub(crate) fn set_config_override(
94                            &mut self,
95                            config_override: ::std::option::Option<crate::config::Builder>,
96                        ) -> &mut Self {
97                            self.config_override = config_override;
98                            self
99                        }
100    /// <p>The ARN associated with the backup.</p>
101    pub fn backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102                    self.inner = self.inner.backup_arn(input.into());
103                    self
104                }
105    /// <p>The ARN associated with the backup.</p>
106    pub fn set_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107                    self.inner = self.inner.set_backup_arn(input);
108                    self
109                }
110    /// <p>The ARN associated with the backup.</p>
111    pub fn get_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
112                    self.inner.get_backup_arn()
113                }
114}
115