aws_sdk_elasticache/operation/test_failover/_test_failover_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 TestFailoverInput {
6 /// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
7 pub replication_group_id: ::std::option::Option<::std::string::String>,
8 /// <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>
9 pub node_group_id: ::std::option::Option<::std::string::String>,
10}
11impl TestFailoverInput {
12 /// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
13 pub fn replication_group_id(&self) -> ::std::option::Option<&str> {
14 self.replication_group_id.as_deref()
15 }
16 /// <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>
17 pub fn node_group_id(&self) -> ::std::option::Option<&str> {
18 self.node_group_id.as_deref()
19 }
20}
21impl TestFailoverInput {
22 /// Creates a new builder-style object to manufacture [`TestFailoverInput`](crate::operation::test_failover::TestFailoverInput).
23 pub fn builder() -> crate::operation::test_failover::builders::TestFailoverInputBuilder {
24 crate::operation::test_failover::builders::TestFailoverInputBuilder::default()
25 }
26}
27
28/// A builder for [`TestFailoverInput`](crate::operation::test_failover::TestFailoverInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct TestFailoverInputBuilder {
32 pub(crate) replication_group_id: ::std::option::Option<::std::string::String>,
33 pub(crate) node_group_id: ::std::option::Option<::std::string::String>,
34}
35impl TestFailoverInputBuilder {
36 /// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
37 /// This field is required.
38 pub fn replication_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.replication_group_id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
43 pub fn set_replication_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.replication_group_id = input;
45 self
46 }
47 /// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
48 pub fn get_replication_group_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.replication_group_id
50 }
51 /// <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>
52 /// This field is required.
53 pub fn node_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.node_group_id = ::std::option::Option::Some(input.into());
55 self
56 }
57 /// <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>
58 pub fn set_node_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.node_group_id = input;
60 self
61 }
62 /// <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>
63 pub fn get_node_group_id(&self) -> &::std::option::Option<::std::string::String> {
64 &self.node_group_id
65 }
66 /// Consumes the builder and constructs a [`TestFailoverInput`](crate::operation::test_failover::TestFailoverInput).
67 pub fn build(
68 self,
69 ) -> ::std::result::Result<crate::operation::test_failover::TestFailoverInput, ::aws_smithy_types::error::operation::BuildError> {
70 ::std::result::Result::Ok(crate::operation::test_failover::TestFailoverInput {
71 replication_group_id: self.replication_group_id,
72 node_group_id: self.node_group_id,
73 })
74 }
75}