#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateHostedZoneOutput {
pub hosted_zone: ::std::option::Option<crate::types::HostedZone>,
pub change_info: ::std::option::Option<crate::types::ChangeInfo>,
pub delegation_set: ::std::option::Option<crate::types::DelegationSet>,
pub vpc: ::std::option::Option<crate::types::Vpc>,
pub location: ::std::string::String,
_request_id: Option<String>,
}
impl CreateHostedZoneOutput {
pub fn hosted_zone(&self) -> ::std::option::Option<&crate::types::HostedZone> {
self.hosted_zone.as_ref()
}
pub fn change_info(&self) -> ::std::option::Option<&crate::types::ChangeInfo> {
self.change_info.as_ref()
}
pub fn delegation_set(&self) -> ::std::option::Option<&crate::types::DelegationSet> {
self.delegation_set.as_ref()
}
pub fn vpc(&self) -> ::std::option::Option<&crate::types::Vpc> {
self.vpc.as_ref()
}
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 {
pub fn builder() -> crate::operation::create_hosted_zone::builders::CreateHostedZoneOutputBuilder {
crate::operation::create_hosted_zone::builders::CreateHostedZoneOutputBuilder::default()
}
}
#[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 {
pub fn hosted_zone(mut self, input: crate::types::HostedZone) -> Self {
self.hosted_zone = ::std::option::Option::Some(input);
self
}
pub fn set_hosted_zone(mut self, input: ::std::option::Option<crate::types::HostedZone>) -> Self {
self.hosted_zone = input;
self
}
pub fn get_hosted_zone(&self) -> &::std::option::Option<crate::types::HostedZone> {
&self.hosted_zone
}
pub fn change_info(mut self, input: crate::types::ChangeInfo) -> Self {
self.change_info = ::std::option::Option::Some(input);
self
}
pub fn set_change_info(mut self, input: ::std::option::Option<crate::types::ChangeInfo>) -> Self {
self.change_info = input;
self
}
pub fn get_change_info(&self) -> &::std::option::Option<crate::types::ChangeInfo> {
&self.change_info
}
pub fn delegation_set(mut self, input: crate::types::DelegationSet) -> Self {
self.delegation_set = ::std::option::Option::Some(input);
self
}
pub fn set_delegation_set(mut self, input: ::std::option::Option<crate::types::DelegationSet>) -> Self {
self.delegation_set = input;
self
}
pub fn get_delegation_set(&self) -> &::std::option::Option<crate::types::DelegationSet> {
&self.delegation_set
}
pub fn vpc(mut self, input: crate::types::Vpc) -> Self {
self.vpc = ::std::option::Option::Some(input);
self
}
pub fn set_vpc(mut self, input: ::std::option::Option<crate::types::Vpc>) -> Self {
self.vpc = input;
self
}
pub fn get_vpc(&self) -> &::std::option::Option<crate::types::Vpc> {
&self.vpc
}
pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.location = ::std::option::Option::Some(input.into());
self
}
pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.location = input;
self
}
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
}
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,
})
}
}