Skip to main content

aws_sdk_docdb/operation/remove_from_global_cluster/
_remove_from_global_cluster_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input to <code>RemoveFromGlobalCluster</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RemoveFromGlobalClusterInput {
7    /// <p>The cluster identifier to detach from the Amazon DocumentDB global cluster.</p>
8    pub global_cluster_identifier: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) identifying the cluster that was detached from the Amazon DocumentDB global cluster.</p>
10    pub db_cluster_identifier: ::std::option::Option<::std::string::String>,
11}
12impl RemoveFromGlobalClusterInput {
13    /// <p>The cluster identifier to detach from the Amazon DocumentDB global cluster.</p>
14    pub fn global_cluster_identifier(&self) -> ::std::option::Option<&str> {
15        self.global_cluster_identifier.as_deref()
16    }
17    /// <p>The Amazon Resource Name (ARN) identifying the cluster that was detached from the Amazon DocumentDB global cluster.</p>
18    pub fn db_cluster_identifier(&self) -> ::std::option::Option<&str> {
19        self.db_cluster_identifier.as_deref()
20    }
21}
22impl RemoveFromGlobalClusterInput {
23    /// Creates a new builder-style object to manufacture [`RemoveFromGlobalClusterInput`](crate::operation::remove_from_global_cluster::RemoveFromGlobalClusterInput).
24    pub fn builder() -> crate::operation::remove_from_global_cluster::builders::RemoveFromGlobalClusterInputBuilder {
25        crate::operation::remove_from_global_cluster::builders::RemoveFromGlobalClusterInputBuilder::default()
26    }
27}
28
29/// A builder for [`RemoveFromGlobalClusterInput`](crate::operation::remove_from_global_cluster::RemoveFromGlobalClusterInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct RemoveFromGlobalClusterInputBuilder {
33    pub(crate) global_cluster_identifier: ::std::option::Option<::std::string::String>,
34    pub(crate) db_cluster_identifier: ::std::option::Option<::std::string::String>,
35}
36impl RemoveFromGlobalClusterInputBuilder {
37    /// <p>The cluster identifier to detach from the Amazon DocumentDB global cluster.</p>
38    /// This field is required.
39    pub fn global_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.global_cluster_identifier = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The cluster identifier to detach from the Amazon DocumentDB global cluster.</p>
44    pub fn set_global_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.global_cluster_identifier = input;
46        self
47    }
48    /// <p>The cluster identifier to detach from the Amazon DocumentDB global cluster.</p>
49    pub fn get_global_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
50        &self.global_cluster_identifier
51    }
52    /// <p>The Amazon Resource Name (ARN) identifying the cluster that was detached from the Amazon DocumentDB global cluster.</p>
53    /// This field is required.
54    pub fn db_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.db_cluster_identifier = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The Amazon Resource Name (ARN) identifying the cluster that was detached from the Amazon DocumentDB global cluster.</p>
59    pub fn set_db_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.db_cluster_identifier = input;
61        self
62    }
63    /// <p>The Amazon Resource Name (ARN) identifying the cluster that was detached from the Amazon DocumentDB global cluster.</p>
64    pub fn get_db_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
65        &self.db_cluster_identifier
66    }
67    /// Consumes the builder and constructs a [`RemoveFromGlobalClusterInput`](crate::operation::remove_from_global_cluster::RemoveFromGlobalClusterInput).
68    pub fn build(
69        self,
70    ) -> ::std::result::Result<
71        crate::operation::remove_from_global_cluster::RemoveFromGlobalClusterInput,
72        ::aws_smithy_types::error::operation::BuildError,
73    > {
74        ::std::result::Result::Ok(crate::operation::remove_from_global_cluster::RemoveFromGlobalClusterInput {
75            global_cluster_identifier: self.global_cluster_identifier,
76            db_cluster_identifier: self.db_cluster_identifier,
77        })
78    }
79}