Skip to main content

aws_sdk_memorydb/types/
_resharding_status.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The status of the online resharding</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ReshardingStatus {
7    /// <p>The status of the online resharding slot migration</p>
8    pub slot_migration: ::std::option::Option<crate::types::SlotMigration>,
9}
10impl ReshardingStatus {
11    /// <p>The status of the online resharding slot migration</p>
12    pub fn slot_migration(&self) -> ::std::option::Option<&crate::types::SlotMigration> {
13        self.slot_migration.as_ref()
14    }
15}
16impl ReshardingStatus {
17    /// Creates a new builder-style object to manufacture [`ReshardingStatus`](crate::types::ReshardingStatus).
18    pub fn builder() -> crate::types::builders::ReshardingStatusBuilder {
19        crate::types::builders::ReshardingStatusBuilder::default()
20    }
21}
22
23/// A builder for [`ReshardingStatus`](crate::types::ReshardingStatus).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct ReshardingStatusBuilder {
27    pub(crate) slot_migration: ::std::option::Option<crate::types::SlotMigration>,
28}
29impl ReshardingStatusBuilder {
30    /// <p>The status of the online resharding slot migration</p>
31    pub fn slot_migration(mut self, input: crate::types::SlotMigration) -> Self {
32        self.slot_migration = ::std::option::Option::Some(input);
33        self
34    }
35    /// <p>The status of the online resharding slot migration</p>
36    pub fn set_slot_migration(mut self, input: ::std::option::Option<crate::types::SlotMigration>) -> Self {
37        self.slot_migration = input;
38        self
39    }
40    /// <p>The status of the online resharding slot migration</p>
41    pub fn get_slot_migration(&self) -> &::std::option::Option<crate::types::SlotMigration> {
42        &self.slot_migration
43    }
44    /// Consumes the builder and constructs a [`ReshardingStatus`](crate::types::ReshardingStatus).
45    pub fn build(self) -> crate::types::ReshardingStatus {
46        crate::types::ReshardingStatus {
47            slot_migration: self.slot_migration,
48        }
49    }
50}