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
// 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).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
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,
}
}
}