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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A complex type that contain the response to a <code>GetHostedZone</code> request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetHostedZoneOutput {
/// <p>A complex type that contains general information about the specified hosted zone.</p>
pub hosted_zone: ::std::option::Option<crate::types::HostedZone>,
/// <p>A complex type that lists the Amazon Route 53 name servers for the specified hosted zone.</p>
pub delegation_set: ::std::option::Option<crate::types::DelegationSet>,
/// <p>A complex type that contains information about the VPCs that are associated with the specified hosted zone.</p>
pub vpcs: ::std::option::Option<::std::vec::Vec<crate::types::Vpc>>,
_request_id: Option<String>,
}
impl GetHostedZoneOutput {
/// <p>A complex type that contains general information about the specified hosted zone.</p>
pub fn hosted_zone(&self) -> ::std::option::Option<&crate::types::HostedZone> {
self.hosted_zone.as_ref()
}
/// <p>A complex type that lists the Amazon Route 53 name servers for the specified 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 the VPCs that are associated with the specified hosted zone.</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 `.vpcs.is_none()`.
pub fn vpcs(&self) -> &[crate::types::Vpc] {
self.vpcs.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for GetHostedZoneOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetHostedZoneOutput {
/// Creates a new builder-style object to manufacture [`GetHostedZoneOutput`](crate::operation::get_hosted_zone::GetHostedZoneOutput).
pub fn builder() -> crate::operation::get_hosted_zone::builders::GetHostedZoneOutputBuilder {
crate::operation::get_hosted_zone::builders::GetHostedZoneOutputBuilder::default()
}
}
/// A builder for [`GetHostedZoneOutput`](crate::operation::get_hosted_zone::GetHostedZoneOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetHostedZoneOutputBuilder {
pub(crate) hosted_zone: ::std::option::Option<crate::types::HostedZone>,
pub(crate) delegation_set: ::std::option::Option<crate::types::DelegationSet>,
pub(crate) vpcs: ::std::option::Option<::std::vec::Vec<crate::types::Vpc>>,
_request_id: Option<String>,
}
impl GetHostedZoneOutputBuilder {
/// <p>A complex type that contains general information about the specified 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 specified 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 specified hosted zone.</p>
pub fn get_hosted_zone(&self) -> &::std::option::Option<crate::types::HostedZone> {
&self.hosted_zone
}
/// <p>A complex type that lists the Amazon Route 53 name servers for the specified hosted zone.</p>
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 lists the Amazon Route 53 name servers for the specified 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 lists the Amazon Route 53 name servers for the specified hosted zone.</p>
pub fn get_delegation_set(&self) -> &::std::option::Option<crate::types::DelegationSet> {
&self.delegation_set
}
/// Appends an item to `vpcs`.
///
/// To override the contents of this collection use [`set_vpcs`](Self::set_vpcs).
///
/// <p>A complex type that contains information about the VPCs that are associated with the specified hosted zone.</p>
pub fn vpcs(mut self, input: crate::types::Vpc) -> Self {
let mut v = self.vpcs.unwrap_or_default();
v.push(input);
self.vpcs = ::std::option::Option::Some(v);
self
}
/// <p>A complex type that contains information about the VPCs that are associated with the specified hosted zone.</p>
pub fn set_vpcs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Vpc>>) -> Self {
self.vpcs = input;
self
}
/// <p>A complex type that contains information about the VPCs that are associated with the specified hosted zone.</p>
pub fn get_vpcs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Vpc>> {
&self.vpcs
}
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 [`GetHostedZoneOutput`](crate::operation::get_hosted_zone::GetHostedZoneOutput).
pub fn build(self) -> crate::operation::get_hosted_zone::GetHostedZoneOutput {
crate::operation::get_hosted_zone::GetHostedZoneOutput {
hosted_zone: self.hosted_zone,
delegation_set: self.delegation_set,
vpcs: self.vpcs,
_request_id: self._request_id,
}
}
}