1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the properties of a replica global secondary index.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ReplicaGlobalSecondaryIndexDescription {
    /// <p>The name of the global secondary index.</p>
    pub index_name: ::std::option::Option<::std::string::String>,
    /// <p>If not described, uses the source table GSI's read capacity settings.</p>
    pub provisioned_throughput_override: ::std::option::Option<crate::types::ProvisionedThroughputOverride>,
    /// <p>Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.</p>
    pub on_demand_throughput_override: ::std::option::Option<crate::types::OnDemandThroughputOverride>,
}
impl ReplicaGlobalSecondaryIndexDescription {
    /// <p>The name of the global secondary index.</p>
    pub fn index_name(&self) -> ::std::option::Option<&str> {
        self.index_name.as_deref()
    }
    /// <p>If not described, uses the source table GSI's read capacity settings.</p>
    pub fn provisioned_throughput_override(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughputOverride> {
        self.provisioned_throughput_override.as_ref()
    }
    /// <p>Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.</p>
    pub fn on_demand_throughput_override(&self) -> ::std::option::Option<&crate::types::OnDemandThroughputOverride> {
        self.on_demand_throughput_override.as_ref()
    }
}
impl ReplicaGlobalSecondaryIndexDescription {
    /// Creates a new builder-style object to manufacture [`ReplicaGlobalSecondaryIndexDescription`](crate::types::ReplicaGlobalSecondaryIndexDescription).
    pub fn builder() -> crate::types::builders::ReplicaGlobalSecondaryIndexDescriptionBuilder {
        crate::types::builders::ReplicaGlobalSecondaryIndexDescriptionBuilder::default()
    }
}

/// A builder for [`ReplicaGlobalSecondaryIndexDescription`](crate::types::ReplicaGlobalSecondaryIndexDescription).
#[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 {
    /// <p>The name of the global secondary index.</p>
    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
    }
    /// <p>The name of the global secondary index.</p>
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.index_name = input;
        self
    }
    /// <p>The name of the global secondary index.</p>
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.index_name
    }
    /// <p>If not described, uses the source table GSI's read capacity settings.</p>
    pub fn provisioned_throughput_override(mut self, input: crate::types::ProvisionedThroughputOverride) -> Self {
        self.provisioned_throughput_override = ::std::option::Option::Some(input);
        self
    }
    /// <p>If not described, uses the source table GSI's read capacity settings.</p>
    pub fn set_provisioned_throughput_override(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughputOverride>) -> Self {
        self.provisioned_throughput_override = input;
        self
    }
    /// <p>If not described, uses the source table GSI's read capacity settings.</p>
    pub fn get_provisioned_throughput_override(&self) -> &::std::option::Option<crate::types::ProvisionedThroughputOverride> {
        &self.provisioned_throughput_override
    }
    /// <p>Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.</p>
    pub fn on_demand_throughput_override(mut self, input: crate::types::OnDemandThroughputOverride) -> Self {
        self.on_demand_throughput_override = ::std::option::Option::Some(input);
        self
    }
    /// <p>Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.</p>
    pub fn set_on_demand_throughput_override(mut self, input: ::std::option::Option<crate::types::OnDemandThroughputOverride>) -> Self {
        self.on_demand_throughput_override = input;
        self
    }
    /// <p>Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.</p>
    pub fn get_on_demand_throughput_override(&self) -> &::std::option::Option<crate::types::OnDemandThroughputOverride> {
        &self.on_demand_throughput_override
    }
    /// Consumes the builder and constructs a [`ReplicaGlobalSecondaryIndexDescription`](crate::types::ReplicaGlobalSecondaryIndexDescription).
    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,
        }
    }
}