aws_sdk_elasticache/operation/complete_migration/
_complete_migration_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 CompleteMigrationInput {
6    /// <p>The ID of the replication group to which data is being migrated.</p>
7    pub replication_group_id: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub force: ::std::option::Option<bool>,
10}
11impl CompleteMigrationInput {
12    /// <p>The ID of the replication group to which data is being migrated.</p>
13    pub fn replication_group_id(&self) -> ::std::option::Option<&str> {
14        self.replication_group_id.as_deref()
15    }
16    /// <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>
17    pub fn force(&self) -> ::std::option::Option<bool> {
18        self.force
19    }
20}
21impl CompleteMigrationInput {
22    /// Creates a new builder-style object to manufacture [`CompleteMigrationInput`](crate::operation::complete_migration::CompleteMigrationInput).
23    pub fn builder() -> crate::operation::complete_migration::builders::CompleteMigrationInputBuilder {
24        crate::operation::complete_migration::builders::CompleteMigrationInputBuilder::default()
25    }
26}
27
28/// A builder for [`CompleteMigrationInput`](crate::operation::complete_migration::CompleteMigrationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct CompleteMigrationInputBuilder {
32    pub(crate) replication_group_id: ::std::option::Option<::std::string::String>,
33    pub(crate) force: ::std::option::Option<bool>,
34}
35impl CompleteMigrationInputBuilder {
36    /// <p>The ID of the replication group to which data is being migrated.</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 ID of the replication group to which data is being migrated.</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 ID of the replication group to which data is being migrated.</p>
48    pub fn get_replication_group_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.replication_group_id
50    }
51    /// <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>
52    pub fn force(mut self, input: bool) -> Self {
53        self.force = ::std::option::Option::Some(input);
54        self
55    }
56    /// <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>
57    pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
58        self.force = input;
59        self
60    }
61    /// <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>
62    pub fn get_force(&self) -> &::std::option::Option<bool> {
63        &self.force
64    }
65    /// Consumes the builder and constructs a [`CompleteMigrationInput`](crate::operation::complete_migration::CompleteMigrationInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::complete_migration::CompleteMigrationInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::complete_migration::CompleteMigrationInput {
70            replication_group_id: self.replication_group_id,
71            force: self.force,
72        })
73    }
74}