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
// 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 UpdateDomainAssociationInput {
/// <p>The domain to update.</p>
pub domain: ::std::option::Option<::std::string::String>,
/// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
pub target_resource: ::std::option::Option<crate::types::DistributionResourceId>,
/// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
pub if_match: ::std::option::Option<::std::string::String>,
}
impl UpdateDomainAssociationInput {
/// <p>The domain to update.</p>
pub fn domain(&self) -> ::std::option::Option<&str> {
self.domain.as_deref()
}
/// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
pub fn target_resource(&self) -> ::std::option::Option<&crate::types::DistributionResourceId> {
self.target_resource.as_ref()
}
/// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
pub fn if_match(&self) -> ::std::option::Option<&str> {
self.if_match.as_deref()
}
}
impl UpdateDomainAssociationInput {
/// Creates a new builder-style object to manufacture [`UpdateDomainAssociationInput`](crate::operation::update_domain_association::UpdateDomainAssociationInput).
pub fn builder() -> crate::operation::update_domain_association::builders::UpdateDomainAssociationInputBuilder {
crate::operation::update_domain_association::builders::UpdateDomainAssociationInputBuilder::default()
}
}
/// A builder for [`UpdateDomainAssociationInput`](crate::operation::update_domain_association::UpdateDomainAssociationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDomainAssociationInputBuilder {
pub(crate) domain: ::std::option::Option<::std::string::String>,
pub(crate) target_resource: ::std::option::Option<crate::types::DistributionResourceId>,
pub(crate) if_match: ::std::option::Option<::std::string::String>,
}
impl UpdateDomainAssociationInputBuilder {
/// <p>The domain to update.</p>
/// This field is required.
pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain = ::std::option::Option::Some(input.into());
self
}
/// <p>The domain to update.</p>
pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain = input;
self
}
/// <p>The domain to update.</p>
pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
&self.domain
}
/// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
/// This field is required.
pub fn target_resource(mut self, input: crate::types::DistributionResourceId) -> Self {
self.target_resource = ::std::option::Option::Some(input);
self
}
/// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
pub fn set_target_resource(mut self, input: ::std::option::Option<crate::types::DistributionResourceId>) -> Self {
self.target_resource = input;
self
}
/// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
pub fn get_target_resource(&self) -> &::std::option::Option<crate::types::DistributionResourceId> {
&self.target_resource
}
/// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.if_match = ::std::option::Option::Some(input.into());
self
}
/// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.if_match = input;
self
}
/// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
&self.if_match
}
/// Consumes the builder and constructs a [`UpdateDomainAssociationInput`](crate::operation::update_domain_association::UpdateDomainAssociationInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_domain_association::UpdateDomainAssociationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_domain_association::UpdateDomainAssociationInput {
domain: self.domain,
target_resource: self.target_resource,
if_match: self.if_match,
})
}
}