1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Status of the connection between an endpoint and a replication instance, including Amazon Resource Names (ARNs) and the last error message issued.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Connection {
/// <p>The ARN of the replication instance.</p>
pub replication_instance_arn: ::std::option::Option<::std::string::String>,
/// <p>The ARN string that uniquely identifies the endpoint.</p>
pub endpoint_arn: ::std::option::Option<::std::string::String>,
/// <p>The connection status. This parameter can return one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>"successful"</code></p></li>
/// <li>
/// <p><code>"testing"</code></p></li>
/// <li>
/// <p><code>"failed"</code></p></li>
/// <li>
/// <p><code>"deleting"</code></p></li>
/// </ul>
pub status: ::std::option::Option<::std::string::String>,
/// <p>The error message when the connection last failed.</p>
pub last_failure_message: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the endpoint. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
pub endpoint_identifier: ::std::option::Option<::std::string::String>,
/// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
pub replication_instance_identifier: ::std::option::Option<::std::string::String>,
}
impl Connection {
/// <p>The ARN of the replication instance.</p>
pub fn replication_instance_arn(&self) -> ::std::option::Option<&str> {
self.replication_instance_arn.as_deref()
}
/// <p>The ARN string that uniquely identifies the endpoint.</p>
pub fn endpoint_arn(&self) -> ::std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
/// <p>The connection status. This parameter can return one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>"successful"</code></p></li>
/// <li>
/// <p><code>"testing"</code></p></li>
/// <li>
/// <p><code>"failed"</code></p></li>
/// <li>
/// <p><code>"deleting"</code></p></li>
/// </ul>
pub fn status(&self) -> ::std::option::Option<&str> {
self.status.as_deref()
}
/// <p>The error message when the connection last failed.</p>
pub fn last_failure_message(&self) -> ::std::option::Option<&str> {
self.last_failure_message.as_deref()
}
/// <p>The identifier of the endpoint. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
pub fn endpoint_identifier(&self) -> ::std::option::Option<&str> {
self.endpoint_identifier.as_deref()
}
/// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
pub fn replication_instance_identifier(&self) -> ::std::option::Option<&str> {
self.replication_instance_identifier.as_deref()
}
}
impl Connection {
/// Creates a new builder-style object to manufacture [`Connection`](crate::types::Connection).
pub fn builder() -> crate::types::builders::ConnectionBuilder {
crate::types::builders::ConnectionBuilder::default()
}
}
/// A builder for [`Connection`](crate::types::Connection).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ConnectionBuilder {
pub(crate) replication_instance_arn: ::std::option::Option<::std::string::String>,
pub(crate) endpoint_arn: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<::std::string::String>,
pub(crate) last_failure_message: ::std::option::Option<::std::string::String>,
pub(crate) endpoint_identifier: ::std::option::Option<::std::string::String>,
pub(crate) replication_instance_identifier: ::std::option::Option<::std::string::String>,
}
impl ConnectionBuilder {
/// <p>The ARN of the replication instance.</p>
pub fn replication_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.replication_instance_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the replication instance.</p>
pub fn set_replication_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.replication_instance_arn = input;
self
}
/// <p>The ARN of the replication instance.</p>
pub fn get_replication_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.replication_instance_arn
}
/// <p>The ARN string that uniquely identifies the endpoint.</p>
pub fn endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.endpoint_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN string that uniquely identifies the endpoint.</p>
pub fn set_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
/// <p>The ARN string that uniquely identifies the endpoint.</p>
pub fn get_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.endpoint_arn
}
/// <p>The connection status. This parameter can return one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>"successful"</code></p></li>
/// <li>
/// <p><code>"testing"</code></p></li>
/// <li>
/// <p><code>"failed"</code></p></li>
/// <li>
/// <p><code>"deleting"</code></p></li>
/// </ul>
pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status = ::std::option::Option::Some(input.into());
self
}
/// <p>The connection status. This parameter can return one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>"successful"</code></p></li>
/// <li>
/// <p><code>"testing"</code></p></li>
/// <li>
/// <p><code>"failed"</code></p></li>
/// <li>
/// <p><code>"deleting"</code></p></li>
/// </ul>
pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status = input;
self
}
/// <p>The connection status. This parameter can return one of the following values:</p>
/// <ul>
/// <li>
/// <p><code>"successful"</code></p></li>
/// <li>
/// <p><code>"testing"</code></p></li>
/// <li>
/// <p><code>"failed"</code></p></li>
/// <li>
/// <p><code>"deleting"</code></p></li>
/// </ul>
pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
&self.status
}
/// <p>The error message when the connection last failed.</p>
pub fn last_failure_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_failure_message = ::std::option::Option::Some(input.into());
self
}
/// <p>The error message when the connection last failed.</p>
pub fn set_last_failure_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_failure_message = input;
self
}
/// <p>The error message when the connection last failed.</p>
pub fn get_last_failure_message(&self) -> &::std::option::Option<::std::string::String> {
&self.last_failure_message
}
/// <p>The identifier of the endpoint. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
pub fn endpoint_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.endpoint_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the endpoint. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
pub fn set_endpoint_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.endpoint_identifier = input;
self
}
/// <p>The identifier of the endpoint. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or contain two consecutive hyphens.</p>
pub fn get_endpoint_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.endpoint_identifier
}
/// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
pub fn replication_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.replication_instance_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
pub fn set_replication_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.replication_instance_identifier = input;
self
}
/// <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
pub fn get_replication_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.replication_instance_identifier
}
/// Consumes the builder and constructs a [`Connection`](crate::types::Connection).
pub fn build(self) -> crate::types::Connection {
crate::types::Connection {
replication_instance_arn: self.replication_instance_arn,
endpoint_arn: self.endpoint_arn,
status: self.status,
last_failure_message: self.last_failure_message,
endpoint_identifier: self.endpoint_identifier,
replication_instance_identifier: self.replication_instance_identifier,
}
}
}