aws_sdk_dynamodb/operation/update_table_replica_auto_scaling/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_table_replica_auto_scaling::_update_table_replica_auto_scaling_output::UpdateTableReplicaAutoScalingOutputBuilder;
3
4pub use crate::operation::update_table_replica_auto_scaling::_update_table_replica_auto_scaling_input::UpdateTableReplicaAutoScalingInputBuilder;
5
6impl crate::operation::update_table_replica_auto_scaling::builders::UpdateTableReplicaAutoScalingInputBuilder {
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::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.update_table_replica_auto_scaling();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `UpdateTableReplicaAutoScaling`.
21/// 
22/// <p>Updates auto scaling settings on your global tables at once.</p>
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
24pub struct UpdateTableReplicaAutoScalingFluentBuilder {
25                handle: ::std::sync::Arc<crate::client::Handle>,
26                inner: crate::operation::update_table_replica_auto_scaling::builders::UpdateTableReplicaAutoScalingInputBuilder,
27config_override: ::std::option::Option<crate::config::Builder>,
28            }
29impl
30                crate::client::customize::internal::CustomizableSend<
31                    crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput,
32                    crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError,
33                > for UpdateTableReplicaAutoScalingFluentBuilder
34            {
35                fn send(
36                    self,
37                    config_override: crate::config::Builder,
38                ) -> crate::client::customize::internal::BoxFuture<
39                    crate::client::customize::internal::SendResult<
40                        crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput,
41                        crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError,
42                    >,
43                > {
44                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
45                }
46            }
47impl UpdateTableReplicaAutoScalingFluentBuilder {
48    /// Creates a new `UpdateTableReplicaAutoScalingFluentBuilder`.
49                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
50                        Self {
51                            handle,
52                            inner: ::std::default::Default::default(),
53    config_override: ::std::option::Option::None,
54                        }
55                    }
56    /// Access the UpdateTableReplicaAutoScaling as a reference.
57                    pub fn as_input(&self) -> &crate::operation::update_table_replica_auto_scaling::builders::UpdateTableReplicaAutoScalingInputBuilder {
58                        &self.inner
59                    }
60    /// Sends the request and returns the response.
61                    ///
62                    /// If an error occurs, an `SdkError` will be returned with additional details that
63                    /// can be matched against.
64                    ///
65                    /// By default, any retryable failures will be retried twice. Retry behavior
66                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
67                    /// set when configuring the client. Note: retries are enabled by default when using
68                    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
69                    pub async fn send(self) -> ::std::result::Result<crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError, ::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::update_table_replica_auto_scaling::UpdateTableReplicaAutoScaling::operation_runtime_plugins(
72                            self.handle.runtime_plugins.clone(),
73                            &self.handle.conf,
74                            self.config_override,
75                        );
76                        crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScaling::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::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput, crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError, 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    /// 
101    /// Appends an item to `GlobalSecondaryIndexUpdates`.
102    /// 
103    /// To override the contents of this collection use [`set_global_secondary_index_updates`](Self::set_global_secondary_index_updates).
104    /// 
105    /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
106    pub fn global_secondary_index_updates(mut self, input: crate::types::GlobalSecondaryIndexAutoScalingUpdate) -> Self {
107                        self.inner = self.inner.global_secondary_index_updates(input);
108                        self
109                    }
110    /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
111    pub fn set_global_secondary_index_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexAutoScalingUpdate>>) -> Self {
112                    self.inner = self.inner.set_global_secondary_index_updates(input);
113                    self
114                }
115    /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
116    pub fn get_global_secondary_index_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexAutoScalingUpdate>> {
117                    self.inner.get_global_secondary_index_updates()
118                }
119    /// <p>The name of the global table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
120    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121                    self.inner = self.inner.table_name(input.into());
122                    self
123                }
124    /// <p>The name of the global table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
125    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126                    self.inner = self.inner.set_table_name(input);
127                    self
128                }
129    /// <p>The name of the global table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
130    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
131                    self.inner.get_table_name()
132                }
133    /// <p>Represents the auto scaling settings to be modified for a global table or global secondary index.</p>
134    pub fn provisioned_write_capacity_auto_scaling_update(mut self, input: crate::types::AutoScalingSettingsUpdate) -> Self {
135                    self.inner = self.inner.provisioned_write_capacity_auto_scaling_update(input);
136                    self
137                }
138    /// <p>Represents the auto scaling settings to be modified for a global table or global secondary index.</p>
139    pub fn set_provisioned_write_capacity_auto_scaling_update(mut self, input: ::std::option::Option<crate::types::AutoScalingSettingsUpdate>) -> Self {
140                    self.inner = self.inner.set_provisioned_write_capacity_auto_scaling_update(input);
141                    self
142                }
143    /// <p>Represents the auto scaling settings to be modified for a global table or global secondary index.</p>
144    pub fn get_provisioned_write_capacity_auto_scaling_update(&self) -> &::std::option::Option<crate::types::AutoScalingSettingsUpdate> {
145                    self.inner.get_provisioned_write_capacity_auto_scaling_update()
146                }
147    /// 
148    /// Appends an item to `ReplicaUpdates`.
149    /// 
150    /// To override the contents of this collection use [`set_replica_updates`](Self::set_replica_updates).
151    /// 
152    /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
153    pub fn replica_updates(mut self, input: crate::types::ReplicaAutoScalingUpdate) -> Self {
154                        self.inner = self.inner.replica_updates(input);
155                        self
156                    }
157    /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
158    pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicaAutoScalingUpdate>>) -> Self {
159                    self.inner = self.inner.set_replica_updates(input);
160                    self
161                }
162    /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
163    pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::ReplicaAutoScalingUpdate>> {
164                    self.inner.get_replica_updates()
165                }
166}
167