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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A complex type containing the response information for the hosted zone.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateHostedZoneOutput {
    /// <p>A complex type that contains general information about the hosted zone.</p>
    pub hosted_zone: ::std::option::Option<crate::types::HostedZone>,
    /// <p>A complex type that contains information about the <code>CreateHostedZone</code> request.</p>
    pub change_info: ::std::option::Option<crate::types::ChangeInfo>,
    /// <p>A complex type that describes the name servers for this hosted zone.</p>
    pub delegation_set: ::std::option::Option<crate::types::DelegationSet>,
    /// <p>A complex type that contains information about an Amazon VPC that you associated with this hosted zone.</p>
    pub vpc: ::std::option::Option<crate::types::Vpc>,
    /// <p>The unique URL representing the new hosted zone.</p>
    pub location: ::std::string::String,
    _request_id: Option<String>,
}
impl CreateHostedZoneOutput {
    /// <p>A complex type that contains general information about the hosted zone.</p>
    pub fn hosted_zone(&self) -> ::std::option::Option<&crate::types::HostedZone> {
        self.hosted_zone.as_ref()
    }
    /// <p>A complex type that contains information about the <code>CreateHostedZone</code> request.</p>
    pub fn change_info(&self) -> ::std::option::Option<&crate::types::ChangeInfo> {
        self.change_info.as_ref()
    }
    /// <p>A complex type that describes the name servers for this hosted zone.</p>
    pub fn delegation_set(&self) -> ::std::option::Option<&crate::types::DelegationSet> {
        self.delegation_set.as_ref()
    }
    /// <p>A complex type that contains information about an Amazon VPC that you associated with this hosted zone.</p>
    pub fn vpc(&self) -> ::std::option::Option<&crate::types::Vpc> {
        self.vpc.as_ref()
    }
    /// <p>The unique URL representing the new hosted zone.</p>
    pub fn location(&self) -> &str {
        use std::ops::Deref;
        self.location.deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateHostedZoneOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateHostedZoneOutput {
    /// Creates a new builder-style object to manufacture [`CreateHostedZoneOutput`](crate::operation::create_hosted_zone::CreateHostedZoneOutput).
    pub fn builder() -> crate::operation::create_hosted_zone::builders::CreateHostedZoneOutputBuilder {
        crate::operation::create_hosted_zone::builders::CreateHostedZoneOutputBuilder::default()
    }
}

/// A builder for [`CreateHostedZoneOutput`](crate::operation::create_hosted_zone::CreateHostedZoneOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateHostedZoneOutputBuilder {
    pub(crate) hosted_zone: ::std::option::Option<crate::types::HostedZone>,
    pub(crate) change_info: ::std::option::Option<crate::types::ChangeInfo>,
    pub(crate) delegation_set: ::std::option::Option<crate::types::DelegationSet>,
    pub(crate) vpc: ::std::option::Option<crate::types::Vpc>,
    pub(crate) location: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateHostedZoneOutputBuilder {
    /// <p>A complex type that contains general information about the hosted zone.</p>
    /// This field is required.
    pub fn hosted_zone(mut self, input: crate::types::HostedZone) -> Self {
        self.hosted_zone = ::std::option::Option::Some(input);
        self
    }
    /// <p>A complex type that contains general information about the hosted zone.</p>
    pub fn set_hosted_zone(mut self, input: ::std::option::Option<crate::types::HostedZone>) -> Self {
        self.hosted_zone = input;
        self
    }
    /// <p>A complex type that contains general information about the hosted zone.</p>
    pub fn get_hosted_zone(&self) -> &::std::option::Option<crate::types::HostedZone> {
        &self.hosted_zone
    }
    /// <p>A complex type that contains information about the <code>CreateHostedZone</code> request.</p>
    /// This field is required.
    pub fn change_info(mut self, input: crate::types::ChangeInfo) -> Self {
        self.change_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>A complex type that contains information about the <code>CreateHostedZone</code> request.</p>
    pub fn set_change_info(mut self, input: ::std::option::Option<crate::types::ChangeInfo>) -> Self {
        self.change_info = input;
        self
    }
    /// <p>A complex type that contains information about the <code>CreateHostedZone</code> request.</p>
    pub fn get_change_info(&self) -> &::std::option::Option<crate::types::ChangeInfo> {
        &self.change_info
    }
    /// <p>A complex type that describes the name servers for this hosted zone.</p>
    /// This field is required.
    pub fn delegation_set(mut self, input: crate::types::DelegationSet) -> Self {
        self.delegation_set = ::std::option::Option::Some(input);
        self
    }
    /// <p>A complex type that describes the name servers for this hosted zone.</p>
    pub fn set_delegation_set(mut self, input: ::std::option::Option<crate::types::DelegationSet>) -> Self {
        self.delegation_set = input;
        self
    }
    /// <p>A complex type that describes the name servers for this hosted zone.</p>
    pub fn get_delegation_set(&self) -> &::std::option::Option<crate::types::DelegationSet> {
        &self.delegation_set
    }
    /// <p>A complex type that contains information about an Amazon VPC that you associated with this hosted zone.</p>
    pub fn vpc(mut self, input: crate::types::Vpc) -> Self {
        self.vpc = ::std::option::Option::Some(input);
        self
    }
    /// <p>A complex type that contains information about an Amazon VPC that you associated with this hosted zone.</p>
    pub fn set_vpc(mut self, input: ::std::option::Option<crate::types::Vpc>) -> Self {
        self.vpc = input;
        self
    }
    /// <p>A complex type that contains information about an Amazon VPC that you associated with this hosted zone.</p>
    pub fn get_vpc(&self) -> &::std::option::Option<crate::types::Vpc> {
        &self.vpc
    }
    /// <p>The unique URL representing the new hosted zone.</p>
    /// This field is required.
    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.location = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique URL representing the new hosted zone.</p>
    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.location = input;
        self
    }
    /// <p>The unique URL representing the new hosted zone.</p>
    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
        &self.location
    }
    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 [`CreateHostedZoneOutput`](crate::operation::create_hosted_zone::CreateHostedZoneOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`location`](crate::operation::create_hosted_zone::builders::CreateHostedZoneOutputBuilder::location)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_hosted_zone::CreateHostedZoneOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_hosted_zone::CreateHostedZoneOutput {
            hosted_zone: self.hosted_zone,
            change_info: self.change_info,
            delegation_set: self.delegation_set,
            vpc: self.vpc,
            location: self.location.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "location",
                    "location was not specified but it is required when building CreateHostedZoneOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}