#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateGlobalTableInput {
pub global_table_name: ::std::option::Option<::std::string::String>,
pub replica_updates: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>>,
}
impl UpdateGlobalTableInput {
pub fn global_table_name(&self) -> ::std::option::Option<&str> {
self.global_table_name.as_deref()
}
pub fn replica_updates(&self) -> &[crate::types::ReplicaUpdate] {
self.replica_updates.as_deref().unwrap_or_default()
}
}
impl UpdateGlobalTableInput {
pub fn builder() -> crate::operation::update_global_table::builders::UpdateGlobalTableInputBuilder {
crate::operation::update_global_table::builders::UpdateGlobalTableInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateGlobalTableInputBuilder {
pub(crate) global_table_name: ::std::option::Option<::std::string::String>,
pub(crate) replica_updates: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>>,
}
impl UpdateGlobalTableInputBuilder {
pub fn global_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.global_table_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_global_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.global_table_name = input;
self
}
pub fn get_global_table_name(&self) -> &::std::option::Option<::std::string::String> {
&self.global_table_name
}
pub fn replica_updates(mut self, input: crate::types::ReplicaUpdate) -> Self {
let mut v = self.replica_updates.unwrap_or_default();
v.push(input);
self.replica_updates = ::std::option::Option::Some(v);
self
}
pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>>) -> Self {
self.replica_updates = input;
self
}
pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicaUpdate>> {
&self.replica_updates
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_global_table::UpdateGlobalTableInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_global_table::UpdateGlobalTableInput {
global_table_name: self.global_table_name,
replica_updates: self.replica_updates,
})
}
}