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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[deprecated(note = "Amazon Lex V1 is deprecated. Use Amazon Lex V2 instead.", since = "2025-09-08")]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartMigrationInput {
/// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
pub v1_bot_name: ::std::option::Option<::std::string::String>,
/// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
pub v1_bot_version: ::std::option::Option<::std::string::String>,
/// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
/// <ul>
/// <li>
/// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
/// <li>
/// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
/// </ul>
pub v2_bot_name: ::std::option::Option<::std::string::String>,
/// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
pub v2_bot_role: ::std::option::Option<::std::string::String>,
/// <p>The strategy used to conduct the migration.</p>
/// <ul>
/// <li>
/// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
/// <li>
/// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
/// </ul>
pub migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
}
impl StartMigrationInput {
/// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
pub fn v1_bot_name(&self) -> ::std::option::Option<&str> {
self.v1_bot_name.as_deref()
}
/// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
pub fn v1_bot_version(&self) -> ::std::option::Option<&str> {
self.v1_bot_version.as_deref()
}
/// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
/// <ul>
/// <li>
/// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
/// <li>
/// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
/// </ul>
pub fn v2_bot_name(&self) -> ::std::option::Option<&str> {
self.v2_bot_name.as_deref()
}
/// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
pub fn v2_bot_role(&self) -> ::std::option::Option<&str> {
self.v2_bot_role.as_deref()
}
/// <p>The strategy used to conduct the migration.</p>
/// <ul>
/// <li>
/// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
/// <li>
/// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
/// </ul>
pub fn migration_strategy(&self) -> ::std::option::Option<&crate::types::MigrationStrategy> {
self.migration_strategy.as_ref()
}
}
impl StartMigrationInput {
/// Creates a new builder-style object to manufacture [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
pub fn builder() -> crate::operation::start_migration::builders::StartMigrationInputBuilder {
crate::operation::start_migration::builders::StartMigrationInputBuilder::default()
}
}
/// A builder for [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartMigrationInputBuilder {
pub(crate) v1_bot_name: ::std::option::Option<::std::string::String>,
pub(crate) v1_bot_version: ::std::option::Option<::std::string::String>,
pub(crate) v2_bot_name: ::std::option::Option<::std::string::String>,
pub(crate) v2_bot_role: ::std::option::Option<::std::string::String>,
pub(crate) migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
}
impl StartMigrationInputBuilder {
/// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
/// This field is required.
pub fn v1_bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.v1_bot_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
pub fn set_v1_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.v1_bot_name = input;
self
}
/// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
pub fn get_v1_bot_name(&self) -> &::std::option::Option<::std::string::String> {
&self.v1_bot_name
}
/// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
/// This field is required.
pub fn v1_bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.v1_bot_version = ::std::option::Option::Some(input.into());
self
}
/// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
pub fn set_v1_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.v1_bot_version = input;
self
}
/// <p>The version of the bot to migrate to Amazon Lex V2. You can migrate the <code>$LATEST</code> version as well as any numbered version.</p>
pub fn get_v1_bot_version(&self) -> &::std::option::Option<::std::string::String> {
&self.v1_bot_version
}
/// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
/// <ul>
/// <li>
/// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
/// <li>
/// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
/// </ul>
/// This field is required.
pub fn v2_bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.v2_bot_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
/// <ul>
/// <li>
/// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
/// <li>
/// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
/// </ul>
pub fn set_v2_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.v2_bot_name = input;
self
}
/// <p>The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.</p>
/// <ul>
/// <li>
/// <p>If the Amazon Lex V2 bot doesn't exist, you must use the <code>CREATE_NEW</code> migration strategy.</p></li>
/// <li>
/// <p>If the Amazon Lex V2 bot exists, you must use the <code>UPDATE_EXISTING</code> migration strategy to change the contents of the Amazon Lex V2 bot.</p></li>
/// </ul>
pub fn get_v2_bot_name(&self) -> &::std::option::Option<::std::string::String> {
&self.v2_bot_name
}
/// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
/// This field is required.
pub fn v2_bot_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.v2_bot_role = ::std::option::Option::Some(input.into());
self
}
/// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
pub fn set_v2_bot_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.v2_bot_role = input;
self
}
/// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
pub fn get_v2_bot_role(&self) -> &::std::option::Option<::std::string::String> {
&self.v2_bot_role
}
/// <p>The strategy used to conduct the migration.</p>
/// <ul>
/// <li>
/// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
/// <li>
/// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
/// </ul>
/// This field is required.
pub fn migration_strategy(mut self, input: crate::types::MigrationStrategy) -> Self {
self.migration_strategy = ::std::option::Option::Some(input);
self
}
/// <p>The strategy used to conduct the migration.</p>
/// <ul>
/// <li>
/// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
/// <li>
/// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
/// </ul>
pub fn set_migration_strategy(mut self, input: ::std::option::Option<crate::types::MigrationStrategy>) -> Self {
self.migration_strategy = input;
self
}
/// <p>The strategy used to conduct the migration.</p>
/// <ul>
/// <li>
/// <p><code>CREATE_NEW</code> - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot.</p></li>
/// <li>
/// <p><code>UPDATE_EXISTING</code> - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot.</p></li>
/// </ul>
pub fn get_migration_strategy(&self) -> &::std::option::Option<crate::types::MigrationStrategy> {
&self.migration_strategy
}
/// Consumes the builder and constructs a [`StartMigrationInput`](crate::operation::start_migration::StartMigrationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::start_migration::StartMigrationInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::start_migration::StartMigrationInput {
v1_bot_name: self.v1_bot_name,
v1_bot_version: self.v1_bot_version,
v2_bot_name: self.v2_bot_name,
v2_bot_role: self.v2_bot_role,
migration_strategy: self.migration_strategy,
})
}
}