aws-sdk-route53 1.59.0

AWS SDK for Amazon Route 53
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>(Private hosted zones only) A complex type that contains information about an Amazon VPC.</p>
/// <p>If you associate a private hosted zone with an Amazon VPC when you make a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html">CreateHostedZone</a> request, the following parameters are also required.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Vpc {
    /// <p>(Private hosted zones only) The region that an Amazon VPC was created in.</p>
    pub vpc_region: ::std::option::Option<crate::types::VpcRegion>,
    /// <p>(Private hosted zones only) The ID of an Amazon VPC.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
}
impl Vpc {
    /// <p>(Private hosted zones only) The region that an Amazon VPC was created in.</p>
    pub fn vpc_region(&self) -> ::std::option::Option<&crate::types::VpcRegion> {
        self.vpc_region.as_ref()
    }
    /// <p>(Private hosted zones only) The ID of an Amazon VPC.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
}
impl Vpc {
    /// Creates a new builder-style object to manufacture [`Vpc`](crate::types::Vpc).
    pub fn builder() -> crate::types::builders::VpcBuilder {
        crate::types::builders::VpcBuilder::default()
    }
}

/// A builder for [`Vpc`](crate::types::Vpc).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct VpcBuilder {
    pub(crate) vpc_region: ::std::option::Option<crate::types::VpcRegion>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
}
impl VpcBuilder {
    /// <p>(Private hosted zones only) The region that an Amazon VPC was created in.</p>
    pub fn vpc_region(mut self, input: crate::types::VpcRegion) -> Self {
        self.vpc_region = ::std::option::Option::Some(input);
        self
    }
    /// <p>(Private hosted zones only) The region that an Amazon VPC was created in.</p>
    pub fn set_vpc_region(mut self, input: ::std::option::Option<crate::types::VpcRegion>) -> Self {
        self.vpc_region = input;
        self
    }
    /// <p>(Private hosted zones only) The region that an Amazon VPC was created in.</p>
    pub fn get_vpc_region(&self) -> &::std::option::Option<crate::types::VpcRegion> {
        &self.vpc_region
    }
    /// <p>(Private hosted zones only) The ID of an Amazon VPC.</p>
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>(Private hosted zones only) The ID of an Amazon VPC.</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>(Private hosted zones only) The ID of an Amazon VPC.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// Consumes the builder and constructs a [`Vpc`](crate::types::Vpc).
    pub fn build(self) -> crate::types::Vpc {
        crate::types::Vpc {
            vpc_region: self.vpc_region,
            vpc_id: self.vpc_id,
        }
    }
}