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
// 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 StartMigrationInput {
    /// <p>The ID of the replication group to which data should be migrated.</p>
    #[doc(hidden)]
    pub replication_group_id: std::option::Option<std::string::String>,
    /// <p>List of endpoints from which data should be migrated. For Redis (cluster mode disabled), list should have only one element.</p>
    #[doc(hidden)]
    pub customer_node_endpoint_list:
        std::option::Option<std::vec::Vec<crate::types::CustomerNodeEndpoint>>,
}
impl StartMigrationInput {
    /// <p>The ID of the replication group to which data should be migrated.</p>
    pub fn replication_group_id(&self) -> std::option::Option<&str> {
        self.replication_group_id.as_deref()
    }
    /// <p>List of endpoints from which data should be migrated. For Redis (cluster mode disabled), list should have only one element.</p>
    pub fn customer_node_endpoint_list(
        &self,
    ) -> std::option::Option<&[crate::types::CustomerNodeEndpoint]> {
        self.customer_node_endpoint_list.as_deref()
    }
}
impl StartMigrationInput {
    /// Creates a new builder-style object to manufacture [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
    pub fn builder() -> crate::operation::start_migration::builders::StartMigrationInputBuilder {
        crate::operation::start_migration::builders::StartMigrationInputBuilder::default()
    }
}

/// A builder for [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct StartMigrationInputBuilder {
    pub(crate) replication_group_id: std::option::Option<std::string::String>,
    pub(crate) customer_node_endpoint_list:
        std::option::Option<std::vec::Vec<crate::types::CustomerNodeEndpoint>>,
}
impl StartMigrationInputBuilder {
    /// <p>The ID of the replication group to which data should be migrated.</p>
    pub fn replication_group_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.replication_group_id = Some(input.into());
        self
    }
    /// <p>The ID of the replication group to which data should be migrated.</p>
    pub fn set_replication_group_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.replication_group_id = input;
        self
    }
    /// Appends an item to `customer_node_endpoint_list`.
    ///
    /// To override the contents of this collection use [`set_customer_node_endpoint_list`](Self::set_customer_node_endpoint_list).
    ///
    /// <p>List of endpoints from which data should be migrated. For Redis (cluster mode disabled), list should have only one element.</p>
    pub fn customer_node_endpoint_list(
        mut self,
        input: crate::types::CustomerNodeEndpoint,
    ) -> Self {
        let mut v = self.customer_node_endpoint_list.unwrap_or_default();
        v.push(input);
        self.customer_node_endpoint_list = Some(v);
        self
    }
    /// <p>List of endpoints from which data should be migrated. For Redis (cluster mode disabled), list should have only one element.</p>
    pub fn set_customer_node_endpoint_list(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::CustomerNodeEndpoint>>,
    ) -> Self {
        self.customer_node_endpoint_list = input;
        self
    }
    /// Consumes the builder and constructs a [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::start_migration::StartMigrationInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::start_migration::StartMigrationInput {
            replication_group_id: self.replication_group_id,
            customer_node_endpoint_list: self.customer_node_endpoint_list,
        })
    }
}