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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateResolverRuleInput {
/// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
pub resolver_rule_id: ::std::option::Option<::std::string::String>,
/// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
/// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The ID of the VPC that you want to associate the Resolver rule with.</p>
pub vpc_id: ::std::option::Option<::std::string::String>,
}
impl AssociateResolverRuleInput {
/// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
pub fn resolver_rule_id(&self) -> ::std::option::Option<&str> {
self.resolver_rule_id.as_deref()
}
/// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
/// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The ID of the VPC that you want to associate the Resolver rule with.</p>
pub fn vpc_id(&self) -> ::std::option::Option<&str> {
self.vpc_id.as_deref()
}
}
impl AssociateResolverRuleInput {
/// Creates a new builder-style object to manufacture [`AssociateResolverRuleInput`](crate::operation::associate_resolver_rule::AssociateResolverRuleInput).
pub fn builder() -> crate::operation::associate_resolver_rule::builders::AssociateResolverRuleInputBuilder {
crate::operation::associate_resolver_rule::builders::AssociateResolverRuleInputBuilder::default()
}
}
/// A builder for [`AssociateResolverRuleInput`](crate::operation::associate_resolver_rule::AssociateResolverRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateResolverRuleInputBuilder {
pub(crate) resolver_rule_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
}
impl AssociateResolverRuleInputBuilder {
/// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
/// This field is required.
pub fn resolver_rule_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resolver_rule_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
pub fn set_resolver_rule_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resolver_rule_id = input;
self
}
/// <p>The ID of the Resolver rule that you want to associate with the VPC. To list the existing Resolver rules, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html">ListResolverRules</a>.</p>
pub fn get_resolver_rule_id(&self) -> &::std::option::Option<::std::string::String> {
&self.resolver_rule_id
}
/// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
/// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
/// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>A name for the association that you're creating between a Resolver rule and a VPC.</p>
/// <p>The name can be up to 64 characters long and can contain letters (a-z, A-Z), numbers (0-9), hyphens (-), underscores (_), and spaces. The name cannot consist of only numbers.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The ID of the VPC that you want to associate the Resolver rule with.</p>
/// This field is required.
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>The ID of the VPC that you want to associate the Resolver rule with.</p>
pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.vpc_id = input;
self
}
/// <p>The ID of the VPC that you want to associate the Resolver rule with.</p>
pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
&self.vpc_id
}
/// Consumes the builder and constructs a [`AssociateResolverRuleInput`](crate::operation::associate_resolver_rule::AssociateResolverRuleInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::associate_resolver_rule::AssociateResolverRuleInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::associate_resolver_rule::AssociateResolverRuleInput {
resolver_rule_id: self.resolver_rule_id,
name: self.name,
vpc_id: self.vpc_id,
})
}
}