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><important>
23/// <p>For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version).</p>
24/// </important>
25#[derive(::std::clone::Clone, ::std::fmt::Debug)]
26pub struct UpdateTableReplicaAutoScalingFluentBuilder {
27                handle: ::std::sync::Arc<crate::client::Handle>,
28                inner: crate::operation::update_table_replica_auto_scaling::builders::UpdateTableReplicaAutoScalingInputBuilder,
29config_override: ::std::option::Option<crate::config::Builder>,
30            }
31impl
32                crate::client::customize::internal::CustomizableSend<
33                    crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput,
34                    crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError,
35                > for UpdateTableReplicaAutoScalingFluentBuilder
36            {
37                fn send(
38                    self,
39                    config_override: crate::config::Builder,
40                ) -> crate::client::customize::internal::BoxFuture<
41                    crate::client::customize::internal::SendResult<
42                        crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput,
43                        crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError,
44                    >,
45                > {
46                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
47                }
48            }
49impl UpdateTableReplicaAutoScalingFluentBuilder {
50    /// Creates a new `UpdateTableReplicaAutoScalingFluentBuilder`.
51                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
52                        Self {
53                            handle,
54                            inner: ::std::default::Default::default(),
55    config_override: ::std::option::Option::None,
56                        }
57                    }
58    /// Access the UpdateTableReplicaAutoScaling as a reference.
59                    pub fn as_input(&self) -> &crate::operation::update_table_replica_auto_scaling::builders::UpdateTableReplicaAutoScalingInputBuilder {
60                        &self.inner
61                    }
62    /// Sends the request and returns the response.
63                    ///
64                    /// If an error occurs, an `SdkError` will be returned with additional details that
65                    /// can be matched against.
66                    ///
67                    /// By default, any retryable failures will be retried twice. Retry behavior
68                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
69                    /// set when configuring the client.
70                    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>> {
71                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
72                        let runtime_plugins = crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScaling::operation_runtime_plugins(
73                            self.handle.runtime_plugins.clone(),
74                            &self.handle.conf,
75                            self.config_override,
76                        );
77                        crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScaling::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::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingOutput, crate::operation::update_table_replica_auto_scaling::UpdateTableReplicaAutoScalingError, 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    /// 
102    /// Appends an item to `GlobalSecondaryIndexUpdates`.
103    /// 
104    /// To override the contents of this collection use [`set_global_secondary_index_updates`](Self::set_global_secondary_index_updates).
105    /// 
106    /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
107    pub fn global_secondary_index_updates(mut self, input: crate::types::GlobalSecondaryIndexAutoScalingUpdate) -> Self {
108                        self.inner = self.inner.global_secondary_index_updates(input);
109                        self
110                    }
111    /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
112    pub fn set_global_secondary_index_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexAutoScalingUpdate>>) -> Self {
113                    self.inner = self.inner.set_global_secondary_index_updates(input);
114                    self
115                }
116    /// <p>Represents the auto scaling settings of the global secondary indexes of the replica to be updated.</p>
117    pub fn get_global_secondary_index_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexAutoScalingUpdate>> {
118                    self.inner.get_global_secondary_index_updates()
119                }
120    /// <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>
121    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122                    self.inner = self.inner.table_name(input.into());
123                    self
124                }
125    /// <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>
126    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127                    self.inner = self.inner.set_table_name(input);
128                    self
129                }
130    /// <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>
131    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
132                    self.inner.get_table_name()
133                }
134    /// <p>Represents the auto scaling settings to be modified for a global table or global secondary index.</p>
135    pub fn provisioned_write_capacity_auto_scaling_update(mut self, input: crate::types::AutoScalingSettingsUpdate) -> Self {
136                    self.inner = self.inner.provisioned_write_capacity_auto_scaling_update(input);
137                    self
138                }
139    /// <p>Represents the auto scaling settings to be modified for a global table or global secondary index.</p>
140    pub fn set_provisioned_write_capacity_auto_scaling_update(mut self, input: ::std::option::Option<crate::types::AutoScalingSettingsUpdate>) -> Self {
141                    self.inner = self.inner.set_provisioned_write_capacity_auto_scaling_update(input);
142                    self
143                }
144    /// <p>Represents the auto scaling settings to be modified for a global table or global secondary index.</p>
145    pub fn get_provisioned_write_capacity_auto_scaling_update(&self) -> &::std::option::Option<crate::types::AutoScalingSettingsUpdate> {
146                    self.inner.get_provisioned_write_capacity_auto_scaling_update()
147                }
148    /// 
149    /// Appends an item to `ReplicaUpdates`.
150    /// 
151    /// To override the contents of this collection use [`set_replica_updates`](Self::set_replica_updates).
152    /// 
153    /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
154    pub fn replica_updates(mut self, input: crate::types::ReplicaAutoScalingUpdate) -> Self {
155                        self.inner = self.inner.replica_updates(input);
156                        self
157                    }
158    /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
159    pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicaAutoScalingUpdate>>) -> Self {
160                    self.inner = self.inner.set_replica_updates(input);
161                    self
162                }
163    /// <p>Represents the auto scaling settings of replicas of the table that will be modified.</p>
164    pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::ReplicaAutoScalingUpdate>> {
165                    self.inner.get_replica_updates()
166                }
167}
168