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
// 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 AddRegionInput {
/// <p>The identifier of the directory to which you want to add Region replication.</p>
pub directory_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
pub region_name: ::std::option::Option<::std::string::String>,
/// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
pub vpc_settings: ::std::option::Option<crate::types::DirectoryVpcSettings>,
}
impl AddRegionInput {
/// <p>The identifier of the directory to which you want to add Region replication.</p>
pub fn directory_id(&self) -> ::std::option::Option<&str> {
self.directory_id.as_deref()
}
/// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
pub fn region_name(&self) -> ::std::option::Option<&str> {
self.region_name.as_deref()
}
/// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
pub fn vpc_settings(&self) -> ::std::option::Option<&crate::types::DirectoryVpcSettings> {
self.vpc_settings.as_ref()
}
}
impl AddRegionInput {
/// Creates a new builder-style object to manufacture [`AddRegionInput`](crate::operation::add_region::AddRegionInput).
pub fn builder() -> crate::operation::add_region::builders::AddRegionInputBuilder {
crate::operation::add_region::builders::AddRegionInputBuilder::default()
}
}
/// A builder for [`AddRegionInput`](crate::operation::add_region::AddRegionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddRegionInputBuilder {
pub(crate) directory_id: ::std::option::Option<::std::string::String>,
pub(crate) region_name: ::std::option::Option<::std::string::String>,
pub(crate) vpc_settings: ::std::option::Option<crate::types::DirectoryVpcSettings>,
}
impl AddRegionInputBuilder {
/// <p>The identifier of the directory to which you want to add Region replication.</p>
/// This field is required.
pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.directory_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the directory to which you want to add Region replication.</p>
pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.directory_id = input;
self
}
/// <p>The identifier of the directory to which you want to add Region replication.</p>
pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
&self.directory_id
}
/// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
/// This field is required.
pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.region_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.region_name = input;
self
}
/// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
&self.region_name
}
/// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
/// This field is required.
pub fn vpc_settings(mut self, input: crate::types::DirectoryVpcSettings) -> Self {
self.vpc_settings = ::std::option::Option::Some(input);
self
}
/// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
pub fn set_vpc_settings(mut self, input: ::std::option::Option<crate::types::DirectoryVpcSettings>) -> Self {
self.vpc_settings = input;
self
}
/// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
pub fn get_vpc_settings(&self) -> &::std::option::Option<crate::types::DirectoryVpcSettings> {
&self.vpc_settings
}
/// Consumes the builder and constructs a [`AddRegionInput`](crate::operation::add_region::AddRegionInput).
pub fn build(self) -> ::std::result::Result<crate::operation::add_region::AddRegionInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::add_region::AddRegionInput {
directory_id: self.directory_id,
region_name: self.region_name,
vpc_settings: self.vpc_settings,
})
}
}