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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisassociateCustomDomainOutput {
/// <p>The App Runner subdomain of the App Runner service. The disassociated custom domain name was mapped to this target name.</p>
pub dns_target: ::std::string::String,
/// <p>The Amazon Resource Name (ARN) of the App Runner service that a custom domain name is disassociated from.</p>
pub service_arn: ::std::string::String,
/// <p>A description of the domain name that's being disassociated.</p>
pub custom_domain: ::std::option::Option<crate::types::CustomDomain>,
/// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
pub vpc_dns_targets: ::std::vec::Vec<crate::types::VpcDnsTarget>,
_request_id: Option<String>,
}
impl DisassociateCustomDomainOutput {
/// <p>The App Runner subdomain of the App Runner service. The disassociated custom domain name was mapped to this target name.</p>
pub fn dns_target(&self) -> &str {
use std::ops::Deref;
self.dns_target.deref()
}
/// <p>The Amazon Resource Name (ARN) of the App Runner service that a custom domain name is disassociated from.</p>
pub fn service_arn(&self) -> &str {
use std::ops::Deref;
self.service_arn.deref()
}
/// <p>A description of the domain name that's being disassociated.</p>
pub fn custom_domain(&self) -> ::std::option::Option<&crate::types::CustomDomain> {
self.custom_domain.as_ref()
}
/// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
pub fn vpc_dns_targets(&self) -> &[crate::types::VpcDnsTarget] {
use std::ops::Deref;
self.vpc_dns_targets.deref()
}
}
impl ::aws_types::request_id::RequestId for DisassociateCustomDomainOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DisassociateCustomDomainOutput {
/// Creates a new builder-style object to manufacture [`DisassociateCustomDomainOutput`](crate::operation::disassociate_custom_domain::DisassociateCustomDomainOutput).
pub fn builder() -> crate::operation::disassociate_custom_domain::builders::DisassociateCustomDomainOutputBuilder {
crate::operation::disassociate_custom_domain::builders::DisassociateCustomDomainOutputBuilder::default()
}
}
/// A builder for [`DisassociateCustomDomainOutput`](crate::operation::disassociate_custom_domain::DisassociateCustomDomainOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateCustomDomainOutputBuilder {
pub(crate) dns_target: ::std::option::Option<::std::string::String>,
pub(crate) service_arn: ::std::option::Option<::std::string::String>,
pub(crate) custom_domain: ::std::option::Option<crate::types::CustomDomain>,
pub(crate) vpc_dns_targets: ::std::option::Option<::std::vec::Vec<crate::types::VpcDnsTarget>>,
_request_id: Option<String>,
}
impl DisassociateCustomDomainOutputBuilder {
/// <p>The App Runner subdomain of the App Runner service. The disassociated custom domain name was mapped to this target name.</p>
/// This field is required.
pub fn dns_target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dns_target = ::std::option::Option::Some(input.into());
self
}
/// <p>The App Runner subdomain of the App Runner service. The disassociated custom domain name was mapped to this target name.</p>
pub fn set_dns_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dns_target = input;
self
}
/// <p>The App Runner subdomain of the App Runner service. The disassociated custom domain name was mapped to this target name.</p>
pub fn get_dns_target(&self) -> &::std::option::Option<::std::string::String> {
&self.dns_target
}
/// <p>The Amazon Resource Name (ARN) of the App Runner service that a custom domain name is disassociated from.</p>
/// This field is required.
pub fn service_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the App Runner service that a custom domain name is disassociated from.</p>
pub fn set_service_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the App Runner service that a custom domain name is disassociated from.</p>
pub fn get_service_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.service_arn
}
/// <p>A description of the domain name that's being disassociated.</p>
/// This field is required.
pub fn custom_domain(mut self, input: crate::types::CustomDomain) -> Self {
self.custom_domain = ::std::option::Option::Some(input);
self
}
/// <p>A description of the domain name that's being disassociated.</p>
pub fn set_custom_domain(mut self, input: ::std::option::Option<crate::types::CustomDomain>) -> Self {
self.custom_domain = input;
self
}
/// <p>A description of the domain name that's being disassociated.</p>
pub fn get_custom_domain(&self) -> &::std::option::Option<crate::types::CustomDomain> {
&self.custom_domain
}
/// Appends an item to `vpc_dns_targets`.
///
/// To override the contents of this collection use [`set_vpc_dns_targets`](Self::set_vpc_dns_targets).
///
/// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
pub fn vpc_dns_targets(mut self, input: crate::types::VpcDnsTarget) -> Self {
let mut v = self.vpc_dns_targets.unwrap_or_default();
v.push(input);
self.vpc_dns_targets = ::std::option::Option::Some(v);
self
}
/// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
pub fn set_vpc_dns_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcDnsTarget>>) -> Self {
self.vpc_dns_targets = input;
self
}
/// <p>DNS Target records for the custom domains of this Amazon VPC.</p>
pub fn get_vpc_dns_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcDnsTarget>> {
&self.vpc_dns_targets
}
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 [`DisassociateCustomDomainOutput`](crate::operation::disassociate_custom_domain::DisassociateCustomDomainOutput).
/// This method will fail if any of the following fields are not set:
/// - [`dns_target`](crate::operation::disassociate_custom_domain::builders::DisassociateCustomDomainOutputBuilder::dns_target)
/// - [`service_arn`](crate::operation::disassociate_custom_domain::builders::DisassociateCustomDomainOutputBuilder::service_arn)
/// - [`vpc_dns_targets`](crate::operation::disassociate_custom_domain::builders::DisassociateCustomDomainOutputBuilder::vpc_dns_targets)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::disassociate_custom_domain::DisassociateCustomDomainOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::disassociate_custom_domain::DisassociateCustomDomainOutput {
dns_target: self.dns_target.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"dns_target",
"dns_target was not specified but it is required when building DisassociateCustomDomainOutput",
)
})?,
service_arn: self.service_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"service_arn",
"service_arn was not specified but it is required when building DisassociateCustomDomainOutput",
)
})?,
custom_domain: self.custom_domain,
vpc_dns_targets: self.vpc_dns_targets.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"vpc_dns_targets",
"vpc_dns_targets was not specified but it is required when building DisassociateCustomDomainOutput",
)
})?,
_request_id: self._request_id,
})
}
}