aws_sdk_dynamodb/operation/update_global_table/
_update_global_table_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateGlobalTableInput {
6 pub global_table_name: ::std::option::Option<::std::string::String>,
8 pub replica_updates: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>>,
10}
11impl UpdateGlobalTableInput {
12 pub fn global_table_name(&self) -> ::std::option::Option<&str> {
14 self.global_table_name.as_deref()
15 }
16 pub fn replica_updates(&self) -> &[crate::types::ReplicaUpdate] {
20 self.replica_updates.as_deref().unwrap_or_default()
21 }
22}
23impl UpdateGlobalTableInput {
24 pub fn builder() -> crate::operation::update_global_table::builders::UpdateGlobalTableInputBuilder {
26 crate::operation::update_global_table::builders::UpdateGlobalTableInputBuilder::default()
27 }
28}
29
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct UpdateGlobalTableInputBuilder {
34 pub(crate) global_table_name: ::std::option::Option<::std::string::String>,
35 pub(crate) replica_updates: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>>,
36}
37impl UpdateGlobalTableInputBuilder {
38 pub fn global_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.global_table_name = ::std::option::Option::Some(input.into());
42 self
43 }
44 pub fn set_global_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.global_table_name = input;
47 self
48 }
49 pub fn get_global_table_name(&self) -> &::std::option::Option<::std::string::String> {
51 &self.global_table_name
52 }
53 pub fn replica_updates(mut self, input: crate::types::ReplicaUpdate) -> Self {
59 let mut v = self.replica_updates.unwrap_or_default();
60 v.push(input);
61 self.replica_updates = ::std::option::Option::Some(v);
62 self
63 }
64 pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>>) -> Self {
66 self.replica_updates = input;
67 self
68 }
69 pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>> {
71 &self.replica_updates
72 }
73 pub fn build(
75 self,
76 ) -> ::std::result::Result<crate::operation::update_global_table::UpdateGlobalTableInput, ::aws_smithy_types::error::operation::BuildError> {
77 ::std::result::Result::Ok(crate::operation::update_global_table::UpdateGlobalTableInput {
78 global_table_name: self.global_table_name,
79 replica_updates: self.replica_updates,
80 })
81 }
82}