aws_sdk_keyspaces/operation/update_keyspace/
_update_keyspace_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateKeyspaceInput {
6    /// <p>The name of the keyspace.</p>
7    pub keyspace_name: ::std::option::Option<::std::string::String>,
8    /// <p>The replication specification of the keyspace includes:</p>
9    /// <ul>
10    /// <li>
11    /// <p><code>regionList</code> - the Amazon Web Services Regions where the keyspace is replicated in.</p></li>
12    /// <li>
13    /// <p><code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.</p></li>
14    /// </ul>
15    pub replication_specification: ::std::option::Option<crate::types::ReplicationSpecification>,
16    /// <p>The client-side timestamp setting of the table.</p>
17    /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps-how-it-works.html">How it works: Amazon Keyspaces client-side timestamps</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
18    pub client_side_timestamps: ::std::option::Option<crate::types::ClientSideTimestamps>,
19}
20impl UpdateKeyspaceInput {
21    /// <p>The name of the keyspace.</p>
22    pub fn keyspace_name(&self) -> ::std::option::Option<&str> {
23        self.keyspace_name.as_deref()
24    }
25    /// <p>The replication specification of the keyspace includes:</p>
26    /// <ul>
27    /// <li>
28    /// <p><code>regionList</code> - the Amazon Web Services Regions where the keyspace is replicated in.</p></li>
29    /// <li>
30    /// <p><code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.</p></li>
31    /// </ul>
32    pub fn replication_specification(&self) -> ::std::option::Option<&crate::types::ReplicationSpecification> {
33        self.replication_specification.as_ref()
34    }
35    /// <p>The client-side timestamp setting of the table.</p>
36    /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps-how-it-works.html">How it works: Amazon Keyspaces client-side timestamps</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
37    pub fn client_side_timestamps(&self) -> ::std::option::Option<&crate::types::ClientSideTimestamps> {
38        self.client_side_timestamps.as_ref()
39    }
40}
41impl UpdateKeyspaceInput {
42    /// Creates a new builder-style object to manufacture [`UpdateKeyspaceInput`](crate::operation::update_keyspace::UpdateKeyspaceInput).
43    pub fn builder() -> crate::operation::update_keyspace::builders::UpdateKeyspaceInputBuilder {
44        crate::operation::update_keyspace::builders::UpdateKeyspaceInputBuilder::default()
45    }
46}
47
48/// A builder for [`UpdateKeyspaceInput`](crate::operation::update_keyspace::UpdateKeyspaceInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateKeyspaceInputBuilder {
52    pub(crate) keyspace_name: ::std::option::Option<::std::string::String>,
53    pub(crate) replication_specification: ::std::option::Option<crate::types::ReplicationSpecification>,
54    pub(crate) client_side_timestamps: ::std::option::Option<crate::types::ClientSideTimestamps>,
55}
56impl UpdateKeyspaceInputBuilder {
57    /// <p>The name of the keyspace.</p>
58    /// This field is required.
59    pub fn keyspace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.keyspace_name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The name of the keyspace.</p>
64    pub fn set_keyspace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.keyspace_name = input;
66        self
67    }
68    /// <p>The name of the keyspace.</p>
69    pub fn get_keyspace_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.keyspace_name
71    }
72    /// <p>The replication specification of the keyspace includes:</p>
73    /// <ul>
74    /// <li>
75    /// <p><code>regionList</code> - the Amazon Web Services Regions where the keyspace is replicated in.</p></li>
76    /// <li>
77    /// <p><code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.</p></li>
78    /// </ul>
79    /// This field is required.
80    pub fn replication_specification(mut self, input: crate::types::ReplicationSpecification) -> Self {
81        self.replication_specification = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The replication specification of the keyspace includes:</p>
85    /// <ul>
86    /// <li>
87    /// <p><code>regionList</code> - the Amazon Web Services Regions where the keyspace is replicated in.</p></li>
88    /// <li>
89    /// <p><code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.</p></li>
90    /// </ul>
91    pub fn set_replication_specification(mut self, input: ::std::option::Option<crate::types::ReplicationSpecification>) -> Self {
92        self.replication_specification = input;
93        self
94    }
95    /// <p>The replication specification of the keyspace includes:</p>
96    /// <ul>
97    /// <li>
98    /// <p><code>regionList</code> - the Amazon Web Services Regions where the keyspace is replicated in.</p></li>
99    /// <li>
100    /// <p><code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.</p></li>
101    /// </ul>
102    pub fn get_replication_specification(&self) -> &::std::option::Option<crate::types::ReplicationSpecification> {
103        &self.replication_specification
104    }
105    /// <p>The client-side timestamp setting of the table.</p>
106    /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps-how-it-works.html">How it works: Amazon Keyspaces client-side timestamps</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
107    pub fn client_side_timestamps(mut self, input: crate::types::ClientSideTimestamps) -> Self {
108        self.client_side_timestamps = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>The client-side timestamp setting of the table.</p>
112    /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps-how-it-works.html">How it works: Amazon Keyspaces client-side timestamps</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
113    pub fn set_client_side_timestamps(mut self, input: ::std::option::Option<crate::types::ClientSideTimestamps>) -> Self {
114        self.client_side_timestamps = input;
115        self
116    }
117    /// <p>The client-side timestamp setting of the table.</p>
118    /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps-how-it-works.html">How it works: Amazon Keyspaces client-side timestamps</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
119    pub fn get_client_side_timestamps(&self) -> &::std::option::Option<crate::types::ClientSideTimestamps> {
120        &self.client_side_timestamps
121    }
122    /// Consumes the builder and constructs a [`UpdateKeyspaceInput`](crate::operation::update_keyspace::UpdateKeyspaceInput).
123    pub fn build(
124        self,
125    ) -> ::std::result::Result<crate::operation::update_keyspace::UpdateKeyspaceInput, ::aws_smithy_types::error::operation::BuildError> {
126        ::std::result::Result::Ok(crate::operation::update_keyspace::UpdateKeyspaceInput {
127            keyspace_name: self.keyspace_name,
128            replication_specification: self.replication_specification,
129            client_side_timestamps: self.client_side_timestamps,
130        })
131    }
132}