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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TestFailoverInput {
/// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
pub replication_group_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the node group (called shard in the console) in this replication group on which automatic failover is to be tested. You may test automatic failover on up to 15 node groups in any rolling 24-hour period.</p>
pub node_group_id: ::std::option::Option<::std::string::String>,
}
impl TestFailoverInput {
/// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
pub fn replication_group_id(&self) -> ::std::option::Option<&str> {
self.replication_group_id.as_deref()
}
/// <p>The name of the node group (called shard in the console) in this replication group on which automatic failover is to be tested. You may test automatic failover on up to 15 node groups in any rolling 24-hour period.</p>
pub fn node_group_id(&self) -> ::std::option::Option<&str> {
self.node_group_id.as_deref()
}
}
impl TestFailoverInput {
/// Creates a new builder-style object to manufacture [`TestFailoverInput`](crate::operation::test_failover::TestFailoverInput).
pub fn builder() -> crate::operation::test_failover::builders::TestFailoverInputBuilder {
crate::operation::test_failover::builders::TestFailoverInputBuilder::default()
}
}
/// A builder for [`TestFailoverInput`](crate::operation::test_failover::TestFailoverInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TestFailoverInputBuilder {
pub(crate) replication_group_id: ::std::option::Option<::std::string::String>,
pub(crate) node_group_id: ::std::option::Option<::std::string::String>,
}
impl TestFailoverInputBuilder {
/// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
/// This field is required.
pub fn replication_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.replication_group_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
pub fn set_replication_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.replication_group_id = input;
self
}
/// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
pub fn get_replication_group_id(&self) -> &::std::option::Option<::std::string::String> {
&self.replication_group_id
}
/// <p>The name of the node group (called shard in the console) in this replication group on which automatic failover is to be tested. You may test automatic failover on up to 15 node groups in any rolling 24-hour period.</p>
/// This field is required.
pub fn node_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.node_group_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the node group (called shard in the console) in this replication group on which automatic failover is to be tested. You may test automatic failover on up to 15 node groups in any rolling 24-hour period.</p>
pub fn set_node_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.node_group_id = input;
self
}
/// <p>The name of the node group (called shard in the console) in this replication group on which automatic failover is to be tested. You may test automatic failover on up to 15 node groups in any rolling 24-hour period.</p>
pub fn get_node_group_id(&self) -> &::std::option::Option<::std::string::String> {
&self.node_group_id
}
/// Consumes the builder and constructs a [`TestFailoverInput`](crate::operation::test_failover::TestFailoverInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::test_failover::TestFailoverInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::test_failover::TestFailoverInput {
replication_group_id: self.replication_group_id,
node_group_id: self.node_group_id,
})
}
}