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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes a domain where you are storing recordsets.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Domain {
/// <p>The name of the domain.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the domain recordset (<code>arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE</code>).</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub support_code: ::std::option::Option<::std::string::String>,
/// <p>The date when the domain recordset was created.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The AWS Region and Availability Zones where the domain recordset was created.</p>
pub location: ::std::option::Option<crate::types::ResourceLocation>,
/// <p>The resource type.</p>
pub resource_type: ::std::option::Option<crate::types::ResourceType>,
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>An array of key-value pairs containing information about the domain entries.</p>
pub domain_entries: ::std::option::Option<::std::vec::Vec<crate::types::DomainEntry>>,
/// <p>An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone.</p>
pub registered_domain_delegation_info: ::std::option::Option<crate::types::RegisteredDomainDelegationInfo>,
}
impl Domain {
/// <p>The name of the domain.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the domain recordset (<code>arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE</code>).</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn support_code(&self) -> ::std::option::Option<&str> {
self.support_code.as_deref()
}
/// <p>The date when the domain recordset was created.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>The AWS Region and Availability Zones where the domain recordset was created.</p>
pub fn location(&self) -> ::std::option::Option<&crate::types::ResourceLocation> {
self.location.as_ref()
}
/// <p>The resource type.</p>
pub fn resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
self.resource_type.as_ref()
}
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>An array of key-value pairs containing information about the domain entries.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.domain_entries.is_none()`.
pub fn domain_entries(&self) -> &[crate::types::DomainEntry] {
self.domain_entries.as_deref().unwrap_or_default()
}
/// <p>An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone.</p>
pub fn registered_domain_delegation_info(&self) -> ::std::option::Option<&crate::types::RegisteredDomainDelegationInfo> {
self.registered_domain_delegation_info.as_ref()
}
}
impl Domain {
/// Creates a new builder-style object to manufacture [`Domain`](crate::types::Domain).
pub fn builder() -> crate::types::builders::DomainBuilder {
crate::types::builders::DomainBuilder::default()
}
}
/// A builder for [`Domain`](crate::types::Domain).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DomainBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) support_code: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) location: ::std::option::Option<crate::types::ResourceLocation>,
pub(crate) resource_type: ::std::option::Option<crate::types::ResourceType>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) domain_entries: ::std::option::Option<::std::vec::Vec<crate::types::DomainEntry>>,
pub(crate) registered_domain_delegation_info: ::std::option::Option<crate::types::RegisteredDomainDelegationInfo>,
}
impl DomainBuilder {
/// <p>The name of the domain.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the domain.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the domain.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The Amazon Resource Name (ARN) of the domain recordset (<code>arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE</code>).</p>
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the domain recordset (<code>arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE</code>).</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the domain recordset (<code>arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE</code>).</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn support_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.support_code = ::std::option::Option::Some(input.into());
self
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn set_support_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.support_code = input;
self
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn get_support_code(&self) -> &::std::option::Option<::std::string::String> {
&self.support_code
}
/// <p>The date when the domain recordset was created.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The date when the domain recordset was created.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The date when the domain recordset was created.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The AWS Region and Availability Zones where the domain recordset was created.</p>
pub fn location(mut self, input: crate::types::ResourceLocation) -> Self {
self.location = ::std::option::Option::Some(input);
self
}
/// <p>The AWS Region and Availability Zones where the domain recordset was created.</p>
pub fn set_location(mut self, input: ::std::option::Option<crate::types::ResourceLocation>) -> Self {
self.location = input;
self
}
/// <p>The AWS Region and Availability Zones where the domain recordset was created.</p>
pub fn get_location(&self) -> &::std::option::Option<crate::types::ResourceLocation> {
&self.location
}
/// <p>The resource type.</p>
pub fn resource_type(mut self, input: crate::types::ResourceType) -> Self {
self.resource_type = ::std::option::Option::Some(input);
self
}
/// <p>The resource type.</p>
pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
self.resource_type = input;
self
}
/// <p>The resource type.</p>
pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
&self.resource_type
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// Appends an item to `domain_entries`.
///
/// To override the contents of this collection use [`set_domain_entries`](Self::set_domain_entries).
///
/// <p>An array of key-value pairs containing information about the domain entries.</p>
pub fn domain_entries(mut self, input: crate::types::DomainEntry) -> Self {
let mut v = self.domain_entries.unwrap_or_default();
v.push(input);
self.domain_entries = ::std::option::Option::Some(v);
self
}
/// <p>An array of key-value pairs containing information about the domain entries.</p>
pub fn set_domain_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DomainEntry>>) -> Self {
self.domain_entries = input;
self
}
/// <p>An array of key-value pairs containing information about the domain entries.</p>
pub fn get_domain_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DomainEntry>> {
&self.domain_entries
}
/// <p>An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone.</p>
pub fn registered_domain_delegation_info(mut self, input: crate::types::RegisteredDomainDelegationInfo) -> Self {
self.registered_domain_delegation_info = ::std::option::Option::Some(input);
self
}
/// <p>An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone.</p>
pub fn set_registered_domain_delegation_info(mut self, input: ::std::option::Option<crate::types::RegisteredDomainDelegationInfo>) -> Self {
self.registered_domain_delegation_info = input;
self
}
/// <p>An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone.</p>
pub fn get_registered_domain_delegation_info(&self) -> &::std::option::Option<crate::types::RegisteredDomainDelegationInfo> {
&self.registered_domain_delegation_info
}
/// Consumes the builder and constructs a [`Domain`](crate::types::Domain).
pub fn build(self) -> crate::types::Domain {
crate::types::Domain {
name: self.name,
arn: self.arn,
support_code: self.support_code,
created_at: self.created_at,
location: self.location,
resource_type: self.resource_type,
tags: self.tags,
domain_entries: self.domain_entries,
registered_domain_delegation_info: self.registered_domain_delegation_info,
}
}
}