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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
// 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 GetMigrationOutput {
/// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
pub migration_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub v1_bot_name: ::std::option::Option<::std::string::String>,
/// <p>The version of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub v1_bot_version: ::std::option::Option<::std::string::String>,
/// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub v1_bot_locale: ::std::option::Option<crate::types::Locale>,
/// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
pub v2_bot_id: ::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>Indicates the status of the migration. When the status is <code>COMPLETE</code> the migration is finished and the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.</p>
pub migration_status: ::std::option::Option<crate::types::MigrationStatus>,
/// <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>,
/// <p>The date and time that the migration started.</p>
pub migration_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>A list of alerts and warnings that indicate issues with the migration for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1 feature has a different implementation if Amazon Lex V2.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/migrate.html">Migrating a bot</a> in the <i>Amazon Lex V2 developer guide</i>.</p>
pub alerts: ::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>>,
_request_id: Option<String>,
}
impl GetMigrationOutput {
/// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
pub fn migration_id(&self) -> ::std::option::Option<&str> {
self.migration_id.as_deref()
}
/// <p>The name of the Amazon Lex V1 bot migrated 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 Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub fn v1_bot_version(&self) -> ::std::option::Option<&str> {
self.v1_bot_version.as_deref()
}
/// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub fn v1_bot_locale(&self) -> ::std::option::Option<&crate::types::Locale> {
self.v1_bot_locale.as_ref()
}
/// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
pub fn v2_bot_id(&self) -> ::std::option::Option<&str> {
self.v2_bot_id.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>Indicates the status of the migration. When the status is <code>COMPLETE</code> the migration is finished and the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.</p>
pub fn migration_status(&self) -> ::std::option::Option<&crate::types::MigrationStatus> {
self.migration_status.as_ref()
}
/// <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()
}
/// <p>The date and time that the migration started.</p>
pub fn migration_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.migration_timestamp.as_ref()
}
/// <p>A list of alerts and warnings that indicate issues with the migration for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1 feature has a different implementation if Amazon Lex V2.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/migrate.html">Migrating a bot</a> in the <i>Amazon Lex V2 developer guide</i>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.alerts.is_none()`.
pub fn alerts(&self) -> &[crate::types::MigrationAlert] {
self.alerts.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for GetMigrationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetMigrationOutput {
/// Creates a new builder-style object to manufacture [`GetMigrationOutput`](crate::operation::get_migration::GetMigrationOutput).
pub fn builder() -> crate::operation::get_migration::builders::GetMigrationOutputBuilder {
crate::operation::get_migration::builders::GetMigrationOutputBuilder::default()
}
}
/// A builder for [`GetMigrationOutput`](crate::operation::get_migration::GetMigrationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetMigrationOutputBuilder {
pub(crate) migration_id: ::std::option::Option<::std::string::String>,
pub(crate) v1_bot_name: ::std::option::Option<::std::string::String>,
pub(crate) v1_bot_version: ::std::option::Option<::std::string::String>,
pub(crate) v1_bot_locale: ::std::option::Option<crate::types::Locale>,
pub(crate) v2_bot_id: ::std::option::Option<::std::string::String>,
pub(crate) v2_bot_role: ::std::option::Option<::std::string::String>,
pub(crate) migration_status: ::std::option::Option<crate::types::MigrationStatus>,
pub(crate) migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
pub(crate) migration_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) alerts: ::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>>,
_request_id: Option<String>,
}
impl GetMigrationOutputBuilder {
/// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
pub fn migration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.migration_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
pub fn set_migration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.migration_id = input;
self
}
/// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
pub fn get_migration_id(&self) -> &::std::option::Option<::std::string::String> {
&self.migration_id
}
/// <p>The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
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 migrated 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 migrated 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 Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
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 Amazon Lex V1 bot migrated to Amazon Lex V2.</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 Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub fn get_v1_bot_version(&self) -> &::std::option::Option<::std::string::String> {
&self.v1_bot_version
}
/// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub fn v1_bot_locale(mut self, input: crate::types::Locale) -> Self {
self.v1_bot_locale = ::std::option::Option::Some(input);
self
}
/// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub fn set_v1_bot_locale(mut self, input: ::std::option::Option<crate::types::Locale>) -> Self {
self.v1_bot_locale = input;
self
}
/// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
pub fn get_v1_bot_locale(&self) -> &::std::option::Option<crate::types::Locale> {
&self.v1_bot_locale
}
/// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
pub fn v2_bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.v2_bot_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
pub fn set_v2_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.v2_bot_id = input;
self
}
/// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
pub fn get_v2_bot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.v2_bot_id
}
/// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
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>Indicates the status of the migration. When the status is <code>COMPLETE</code> the migration is finished and the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.</p>
pub fn migration_status(mut self, input: crate::types::MigrationStatus) -> Self {
self.migration_status = ::std::option::Option::Some(input);
self
}
/// <p>Indicates the status of the migration. When the status is <code>COMPLETE</code> the migration is finished and the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.</p>
pub fn set_migration_status(mut self, input: ::std::option::Option<crate::types::MigrationStatus>) -> Self {
self.migration_status = input;
self
}
/// <p>Indicates the status of the migration. When the status is <code>COMPLETE</code> the migration is finished and the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration.</p>
pub fn get_migration_status(&self) -> &::std::option::Option<crate::types::MigrationStatus> {
&self.migration_status
}
/// <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(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
}
/// <p>The date and time that the migration started.</p>
pub fn migration_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.migration_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The date and time that the migration started.</p>
pub fn set_migration_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.migration_timestamp = input;
self
}
/// <p>The date and time that the migration started.</p>
pub fn get_migration_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.migration_timestamp
}
/// Appends an item to `alerts`.
///
/// To override the contents of this collection use [`set_alerts`](Self::set_alerts).
///
/// <p>A list of alerts and warnings that indicate issues with the migration for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1 feature has a different implementation if Amazon Lex V2.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/migrate.html">Migrating a bot</a> in the <i>Amazon Lex V2 developer guide</i>.</p>
pub fn alerts(mut self, input: crate::types::MigrationAlert) -> Self {
let mut v = self.alerts.unwrap_or_default();
v.push(input);
self.alerts = ::std::option::Option::Some(v);
self
}
/// <p>A list of alerts and warnings that indicate issues with the migration for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1 feature has a different implementation if Amazon Lex V2.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/migrate.html">Migrating a bot</a> in the <i>Amazon Lex V2 developer guide</i>.</p>
pub fn set_alerts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>>) -> Self {
self.alerts = input;
self
}
/// <p>A list of alerts and warnings that indicate issues with the migration for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1 feature has a different implementation if Amazon Lex V2.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/migrate.html">Migrating a bot</a> in the <i>Amazon Lex V2 developer guide</i>.</p>
pub fn get_alerts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>> {
&self.alerts
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetMigrationOutput`](crate::operation::get_migration::GetMigrationOutput).
pub fn build(self) -> crate::operation::get_migration::GetMigrationOutput {
crate::operation::get_migration::GetMigrationOutput {
migration_id: self.migration_id,
v1_bot_name: self.v1_bot_name,
v1_bot_version: self.v1_bot_version,
v1_bot_locale: self.v1_bot_locale,
v2_bot_id: self.v2_bot_id,
v2_bot_role: self.v2_bot_role,
migration_status: self.migration_status,
migration_strategy: self.migration_strategy,
migration_timestamp: self.migration_timestamp,
alerts: self.alerts,
_request_id: self._request_id,
}
}
}