aws_sdk_dynamodb/types/
_replica.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the properties of a replica.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Replica {
7    /// <p>The Region where the replica needs to be created.</p>
8    pub region_name: ::std::option::Option<::std::string::String>,
9}
10impl Replica {
11    /// <p>The Region where the replica needs to be created.</p>
12    pub fn region_name(&self) -> ::std::option::Option<&str> {
13        self.region_name.as_deref()
14    }
15}
16impl Replica {
17    /// Creates a new builder-style object to manufacture [`Replica`](crate::types::Replica).
18    pub fn builder() -> crate::types::builders::ReplicaBuilder {
19        crate::types::builders::ReplicaBuilder::default()
20    }
21}
22
23/// A builder for [`Replica`](crate::types::Replica).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct ReplicaBuilder {
27    pub(crate) region_name: ::std::option::Option<::std::string::String>,
28}
29impl ReplicaBuilder {
30    /// <p>The Region where the replica needs to be created.</p>
31    pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.region_name = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>The Region where the replica needs to be created.</p>
36    pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.region_name = input;
38        self
39    }
40    /// <p>The Region where the replica needs to be created.</p>
41    pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
42        &self.region_name
43    }
44    /// Consumes the builder and constructs a [`Replica`](crate::types::Replica).
45    pub fn build(self) -> crate::types::Replica {
46        crate::types::Replica {
47            region_name: self.region_name,
48        }
49    }
50}