aws_sdk_dynamodb/types/
_delete_replication_group_member_action.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a replica to be deleted.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteReplicationGroupMemberAction {
7    /// <p>The Region where the replica exists.</p>
8    pub region_name: ::std::string::String,
9}
10impl DeleteReplicationGroupMemberAction {
11    /// <p>The Region where the replica exists.</p>
12    pub fn region_name(&self) -> &str {
13        use std::ops::Deref;
14        self.region_name.deref()
15    }
16}
17impl DeleteReplicationGroupMemberAction {
18    /// Creates a new builder-style object to manufacture [`DeleteReplicationGroupMemberAction`](crate::types::DeleteReplicationGroupMemberAction).
19    pub fn builder() -> crate::types::builders::DeleteReplicationGroupMemberActionBuilder {
20        crate::types::builders::DeleteReplicationGroupMemberActionBuilder::default()
21    }
22}
23
24/// A builder for [`DeleteReplicationGroupMemberAction`](crate::types::DeleteReplicationGroupMemberAction).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct DeleteReplicationGroupMemberActionBuilder {
28    pub(crate) region_name: ::std::option::Option<::std::string::String>,
29}
30impl DeleteReplicationGroupMemberActionBuilder {
31    /// <p>The Region where the replica exists.</p>
32    /// This field is required.
33    pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
34        self.region_name = ::std::option::Option::Some(input.into());
35        self
36    }
37    /// <p>The Region where the replica exists.</p>
38    pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
39        self.region_name = input;
40        self
41    }
42    /// <p>The Region where the replica exists.</p>
43    pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
44        &self.region_name
45    }
46    /// Consumes the builder and constructs a [`DeleteReplicationGroupMemberAction`](crate::types::DeleteReplicationGroupMemberAction).
47    /// This method will fail if any of the following fields are not set:
48    /// - [`region_name`](crate::types::builders::DeleteReplicationGroupMemberActionBuilder::region_name)
49    pub fn build(self) -> ::std::result::Result<crate::types::DeleteReplicationGroupMemberAction, ::aws_smithy_types::error::operation::BuildError> {
50        ::std::result::Result::Ok(crate::types::DeleteReplicationGroupMemberAction {
51            region_name: self.region_name.ok_or_else(|| {
52                ::aws_smithy_types::error::operation::BuildError::missing_field(
53                    "region_name",
54                    "region_name was not specified but it is required when building DeleteReplicationGroupMemberAction",
55                )
56            })?,
57        })
58    }
59}