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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
// 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 MoveAccountInput {
/// <p>ID for the account that you want to move.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
pub account_id: ::std::option::Option<::std::string::String>,
/// <p>ID for the root or organizational unit that you want to move the account from.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub source_parent_id: ::std::option::Option<::std::string::String>,
/// <p>ID for the root or organizational unit that you want to move the account to.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub destination_parent_id: ::std::option::Option<::std::string::String>,
}
impl MoveAccountInput {
/// <p>ID for the account that you want to move.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
pub fn account_id(&self) -> ::std::option::Option<&str> {
self.account_id.as_deref()
}
/// <p>ID for the root or organizational unit that you want to move the account from.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub fn source_parent_id(&self) -> ::std::option::Option<&str> {
self.source_parent_id.as_deref()
}
/// <p>ID for the root or organizational unit that you want to move the account to.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub fn destination_parent_id(&self) -> ::std::option::Option<&str> {
self.destination_parent_id.as_deref()
}
}
impl MoveAccountInput {
/// Creates a new builder-style object to manufacture [`MoveAccountInput`](crate::operation::move_account::MoveAccountInput).
pub fn builder() -> crate::operation::move_account::builders::MoveAccountInputBuilder {
crate::operation::move_account::builders::MoveAccountInputBuilder::default()
}
}
/// A builder for [`MoveAccountInput`](crate::operation::move_account::MoveAccountInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MoveAccountInputBuilder {
pub(crate) account_id: ::std::option::Option<::std::string::String>,
pub(crate) source_parent_id: ::std::option::Option<::std::string::String>,
pub(crate) destination_parent_id: ::std::option::Option<::std::string::String>,
}
impl MoveAccountInputBuilder {
/// <p>ID for the account that you want to move.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
/// This field is required.
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>ID for the account that you want to move.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
/// <p>ID for the account that you want to move.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for an account ID string requires exactly 12 digits.</p>
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
/// <p>ID for the root or organizational unit that you want to move the account from.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
/// This field is required.
pub fn source_parent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_parent_id = ::std::option::Option::Some(input.into());
self
}
/// <p>ID for the root or organizational unit that you want to move the account from.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub fn set_source_parent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_parent_id = input;
self
}
/// <p>ID for the root or organizational unit that you want to move the account from.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub fn get_source_parent_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_parent_id
}
/// <p>ID for the root or organizational unit that you want to move the account to.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
/// This field is required.
pub fn destination_parent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.destination_parent_id = ::std::option::Option::Some(input.into());
self
}
/// <p>ID for the root or organizational unit that you want to move the account to.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub fn set_destination_parent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.destination_parent_id = input;
self
}
/// <p>ID for the root or organizational unit that you want to move the account to.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a parent ID string requires one of the following:</p>
/// <ul>
/// <li>
/// <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>
/// <li>
/// <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li>
/// </ul>
pub fn get_destination_parent_id(&self) -> &::std::option::Option<::std::string::String> {
&self.destination_parent_id
}
/// Consumes the builder and constructs a [`MoveAccountInput`](crate::operation::move_account::MoveAccountInput).
pub fn build(self) -> ::std::result::Result<crate::operation::move_account::MoveAccountInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::move_account::MoveAccountInput {
account_id: self.account_id,
source_parent_id: self.source_parent_id,
destination_parent_id: self.destination_parent_id,
})
}
}