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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>This data type represents the information you need to connect to an Amazon RDS DB instance. This data type is used as a response element in the following actions:</p>
/// <ul>
/// <li>
/// <p><code>CreateDBInstance</code></p></li>
/// <li>
/// <p><code>DescribeDBInstances</code></p></li>
/// <li>
/// <p><code>DeleteDBInstance</code></p></li>
/// </ul>
/// <p>For the data structure that represents Amazon Aurora DB cluster endpoints, see <code>DBClusterEndpoint</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Endpoint {
/// <p>Specifies the DNS address of the DB instance.</p>
pub address: ::std::option::Option<::std::string::String>,
/// <p>Specifies the port that the database engine is listening on.</p>
pub port: ::std::option::Option<i32>,
/// <p>Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.</p>
pub hosted_zone_id: ::std::option::Option<::std::string::String>,
}
impl Endpoint {
/// <p>Specifies the DNS address of the DB instance.</p>
pub fn address(&self) -> ::std::option::Option<&str> {
self.address.as_deref()
}
/// <p>Specifies the port that the database engine is listening on.</p>
pub fn port(&self) -> ::std::option::Option<i32> {
self.port
}
/// <p>Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.</p>
pub fn hosted_zone_id(&self) -> ::std::option::Option<&str> {
self.hosted_zone_id.as_deref()
}
}
impl Endpoint {
/// Creates a new builder-style object to manufacture [`Endpoint`](crate::types::Endpoint).
pub fn builder() -> crate::types::builders::EndpointBuilder {
crate::types::builders::EndpointBuilder::default()
}
}
/// A builder for [`Endpoint`](crate::types::Endpoint).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EndpointBuilder {
pub(crate) address: ::std::option::Option<::std::string::String>,
pub(crate) port: ::std::option::Option<i32>,
pub(crate) hosted_zone_id: ::std::option::Option<::std::string::String>,
}
impl EndpointBuilder {
/// <p>Specifies the DNS address of the DB instance.</p>
pub fn address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.address = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the DNS address of the DB instance.</p>
pub fn set_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.address = input;
self
}
/// <p>Specifies the DNS address of the DB instance.</p>
pub fn get_address(&self) -> &::std::option::Option<::std::string::String> {
&self.address
}
/// <p>Specifies the port that the database engine is listening on.</p>
pub fn port(mut self, input: i32) -> Self {
self.port = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the port that the database engine is listening on.</p>
pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
self.port = input;
self
}
/// <p>Specifies the port that the database engine is listening on.</p>
pub fn get_port(&self) -> &::std::option::Option<i32> {
&self.port
}
/// <p>Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.</p>
pub fn hosted_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hosted_zone_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.</p>
pub fn set_hosted_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hosted_zone_id = input;
self
}
/// <p>Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.</p>
pub fn get_hosted_zone_id(&self) -> &::std::option::Option<::std::string::String> {
&self.hosted_zone_id
}
/// Consumes the builder and constructs a [`Endpoint`](crate::types::Endpoint).
pub fn build(self) -> crate::types::Endpoint {
crate::types::Endpoint {
address: self.address,
port: self.port,
hosted_zone_id: self.hosted_zone_id,
}
}
}