#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ReplicaGlobalSecondaryIndexDescription {
pub index_name: ::std::option::Option<::std::string::String>,
pub provisioned_throughput_override: ::std::option::Option<crate::types::ProvisionedThroughputOverride>,
pub on_demand_throughput_override: ::std::option::Option<crate::types::OnDemandThroughputOverride>,
}
impl ReplicaGlobalSecondaryIndexDescription {
pub fn index_name(&self) -> ::std::option::Option<&str> {
self.index_name.as_deref()
}
pub fn provisioned_throughput_override(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughputOverride> {
self.provisioned_throughput_override.as_ref()
}
pub fn on_demand_throughput_override(&self) -> ::std::option::Option<&crate::types::OnDemandThroughputOverride> {
self.on_demand_throughput_override.as_ref()
}
}
impl ReplicaGlobalSecondaryIndexDescription {
pub fn builder() -> crate::types::builders::ReplicaGlobalSecondaryIndexDescriptionBuilder {
crate::types::builders::ReplicaGlobalSecondaryIndexDescriptionBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ReplicaGlobalSecondaryIndexDescriptionBuilder {
pub(crate) index_name: ::std::option::Option<::std::string::String>,
pub(crate) provisioned_throughput_override: ::std::option::Option<crate::types::ProvisionedThroughputOverride>,
pub(crate) on_demand_throughput_override: ::std::option::Option<crate::types::OnDemandThroughputOverride>,
}
impl ReplicaGlobalSecondaryIndexDescriptionBuilder {
pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.index_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.index_name = input;
self
}
pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
&self.index_name
}
pub fn provisioned_throughput_override(mut self, input: crate::types::ProvisionedThroughputOverride) -> Self {
self.provisioned_throughput_override = ::std::option::Option::Some(input);
self
}
pub fn set_provisioned_throughput_override(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughputOverride>) -> Self {
self.provisioned_throughput_override = input;
self
}
pub fn get_provisioned_throughput_override(&self) -> &::std::option::Option<crate::types::ProvisionedThroughputOverride> {
&self.provisioned_throughput_override
}
pub fn on_demand_throughput_override(mut self, input: crate::types::OnDemandThroughputOverride) -> Self {
self.on_demand_throughput_override = ::std::option::Option::Some(input);
self
}
pub fn set_on_demand_throughput_override(mut self, input: ::std::option::Option<crate::types::OnDemandThroughputOverride>) -> Self {
self.on_demand_throughput_override = input;
self
}
pub fn get_on_demand_throughput_override(&self) -> &::std::option::Option<crate::types::OnDemandThroughputOverride> {
&self.on_demand_throughput_override
}
pub fn build(self) -> crate::types::ReplicaGlobalSecondaryIndexDescription {
crate::types::ReplicaGlobalSecondaryIndexDescription {
index_name: self.index_name,
provisioned_throughput_override: self.provisioned_throughput_override,
on_demand_throughput_override: self.on_demand_throughput_override,
}
}
}