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
// 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 CompleteMigrationInput {
    /// <p>The ID of the replication group to which data is being migrated.</p>
    pub replication_group_id: ::std::option::Option<::std::string::String>,
    /// <p>Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.</p>
    pub force: ::std::option::Option<bool>,
}
impl CompleteMigrationInput {
    /// <p>The ID of the replication group to which data is being migrated.</p>
    pub fn replication_group_id(&self) -> ::std::option::Option<&str> {
        self.replication_group_id.as_deref()
    }
    /// <p>Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.</p>
    pub fn force(&self) -> ::std::option::Option<bool> {
        self.force
    }
}
impl CompleteMigrationInput {
    /// Creates a new builder-style object to manufacture [`CompleteMigrationInput`](crate::operation::complete_migration::CompleteMigrationInput).
    pub fn builder() -> crate::operation::complete_migration::builders::CompleteMigrationInputBuilder {
        crate::operation::complete_migration::builders::CompleteMigrationInputBuilder::default()
    }
}

/// A builder for [`CompleteMigrationInput`](crate::operation::complete_migration::CompleteMigrationInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CompleteMigrationInputBuilder {
    pub(crate) replication_group_id: ::std::option::Option<::std::string::String>,
    pub(crate) force: ::std::option::Option<bool>,
}
impl CompleteMigrationInputBuilder {
    /// <p>The ID of the replication group to which data is being migrated.</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 ID of the replication group to which data is being migrated.</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 ID of the replication group to which data is being migrated.</p>
    pub fn get_replication_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.replication_group_id
    }
    /// <p>Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.</p>
    pub fn force(mut self, input: bool) -> Self {
        self.force = ::std::option::Option::Some(input);
        self
    }
    /// <p>Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.</p>
    pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
        self.force = input;
        self
    }
    /// <p>Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.</p>
    pub fn get_force(&self) -> &::std::option::Option<bool> {
        &self.force
    }
    /// Consumes the builder and constructs a [`CompleteMigrationInput`](crate::operation::complete_migration::CompleteMigrationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::complete_migration::CompleteMigrationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::complete_migration::CompleteMigrationInput {
            replication_group_id: self.replication_group_id,
            force: self.force,
        })
    }
}