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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A complex type that contains the response to a <code>TestDNSAnswer</code> request. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TestDnsAnswerOutput {
/// <p>The Amazon Route 53 name server used to respond to the request.</p>
#[doc(hidden)]
pub nameserver: std::option::Option<std::string::String>,
/// <p>The name of the resource record set that you submitted a request for.</p>
#[doc(hidden)]
pub record_name: std::option::Option<std::string::String>,
/// <p>The type of the resource record set that you submitted a request for.</p>
#[doc(hidden)]
pub record_type: std::option::Option<crate::types::RrType>,
/// <p>A list that contains values that Amazon Route 53 returned for this resource record set.</p>
#[doc(hidden)]
pub record_data: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>A code that indicates whether the request is valid or not. The most common response code is <code>NOERROR</code>, meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that describes the error. For a list of possible response codes, see <a href="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6">DNS RCODES</a> on the IANA website. </p>
#[doc(hidden)]
pub response_code: std::option::Option<std::string::String>,
/// <p>The protocol that Amazon Route 53 used to respond to the request, either <code>UDP</code> or <code>TCP</code>. </p>
#[doc(hidden)]
pub protocol: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl TestDnsAnswerOutput {
/// <p>The Amazon Route 53 name server used to respond to the request.</p>
pub fn nameserver(&self) -> std::option::Option<&str> {
self.nameserver.as_deref()
}
/// <p>The name of the resource record set that you submitted a request for.</p>
pub fn record_name(&self) -> std::option::Option<&str> {
self.record_name.as_deref()
}
/// <p>The type of the resource record set that you submitted a request for.</p>
pub fn record_type(&self) -> std::option::Option<&crate::types::RrType> {
self.record_type.as_ref()
}
/// <p>A list that contains values that Amazon Route 53 returned for this resource record set.</p>
pub fn record_data(&self) -> std::option::Option<&[std::string::String]> {
self.record_data.as_deref()
}
/// <p>A code that indicates whether the request is valid or not. The most common response code is <code>NOERROR</code>, meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that describes the error. For a list of possible response codes, see <a href="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6">DNS RCODES</a> on the IANA website. </p>
pub fn response_code(&self) -> std::option::Option<&str> {
self.response_code.as_deref()
}
/// <p>The protocol that Amazon Route 53 used to respond to the request, either <code>UDP</code> or <code>TCP</code>. </p>
pub fn protocol(&self) -> std::option::Option<&str> {
self.protocol.as_deref()
}
}
impl aws_http::request_id::RequestId for TestDnsAnswerOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl TestDnsAnswerOutput {
/// Creates a new builder-style object to manufacture [`TestDnsAnswerOutput`](crate::operation::test_dns_answer::TestDnsAnswerOutput).
pub fn builder() -> crate::operation::test_dns_answer::builders::TestDnsAnswerOutputBuilder {
crate::operation::test_dns_answer::builders::TestDnsAnswerOutputBuilder::default()
}
}
/// A builder for [`TestDnsAnswerOutput`](crate::operation::test_dns_answer::TestDnsAnswerOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct TestDnsAnswerOutputBuilder {
pub(crate) nameserver: std::option::Option<std::string::String>,
pub(crate) record_name: std::option::Option<std::string::String>,
pub(crate) record_type: std::option::Option<crate::types::RrType>,
pub(crate) record_data: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) response_code: std::option::Option<std::string::String>,
pub(crate) protocol: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl TestDnsAnswerOutputBuilder {
/// <p>The Amazon Route 53 name server used to respond to the request.</p>
pub fn nameserver(mut self, input: impl Into<std::string::String>) -> Self {
self.nameserver = Some(input.into());
self
}
/// <p>The Amazon Route 53 name server used to respond to the request.</p>
pub fn set_nameserver(mut self, input: std::option::Option<std::string::String>) -> Self {
self.nameserver = input;
self
}
/// <p>The name of the resource record set that you submitted a request for.</p>
pub fn record_name(mut self, input: impl Into<std::string::String>) -> Self {
self.record_name = Some(input.into());
self
}
/// <p>The name of the resource record set that you submitted a request for.</p>
pub fn set_record_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.record_name = input;
self
}
/// <p>The type of the resource record set that you submitted a request for.</p>
pub fn record_type(mut self, input: crate::types::RrType) -> Self {
self.record_type = Some(input);
self
}
/// <p>The type of the resource record set that you submitted a request for.</p>
pub fn set_record_type(mut self, input: std::option::Option<crate::types::RrType>) -> Self {
self.record_type = input;
self
}
/// Appends an item to `record_data`.
///
/// To override the contents of this collection use [`set_record_data`](Self::set_record_data).
///
/// <p>A list that contains values that Amazon Route 53 returned for this resource record set.</p>
pub fn record_data(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.record_data.unwrap_or_default();
v.push(input.into());
self.record_data = Some(v);
self
}
/// <p>A list that contains values that Amazon Route 53 returned for this resource record set.</p>
pub fn set_record_data(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.record_data = input;
self
}
/// <p>A code that indicates whether the request is valid or not. The most common response code is <code>NOERROR</code>, meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that describes the error. For a list of possible response codes, see <a href="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6">DNS RCODES</a> on the IANA website. </p>
pub fn response_code(mut self, input: impl Into<std::string::String>) -> Self {
self.response_code = Some(input.into());
self
}
/// <p>A code that indicates whether the request is valid or not. The most common response code is <code>NOERROR</code>, meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that describes the error. For a list of possible response codes, see <a href="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6">DNS RCODES</a> on the IANA website. </p>
pub fn set_response_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.response_code = input;
self
}
/// <p>The protocol that Amazon Route 53 used to respond to the request, either <code>UDP</code> or <code>TCP</code>. </p>
pub fn protocol(mut self, input: impl Into<std::string::String>) -> Self {
self.protocol = Some(input.into());
self
}
/// <p>The protocol that Amazon Route 53 used to respond to the request, either <code>UDP</code> or <code>TCP</code>. </p>
pub fn set_protocol(mut self, input: std::option::Option<std::string::String>) -> Self {
self.protocol = input;
self
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`TestDnsAnswerOutput`](crate::operation::test_dns_answer::TestDnsAnswerOutput).
pub fn build(self) -> crate::operation::test_dns_answer::TestDnsAnswerOutput {
crate::operation::test_dns_answer::TestDnsAnswerOutput {
nameserver: self.nameserver,
record_name: self.record_name,
record_type: self.record_type,
record_data: self.record_data,
response_code: self.response_code,
protocol: self.protocol,
_request_id: self._request_id,
}
}
}