aws_sdk_databasemigration/operation/delete_connection/
_delete_connection_input.rs

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