aws_sdk_lexmodelbuilding/operation/get_migration/
_get_migration_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetMigrationOutput {
6    /// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
7    pub migration_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
9    pub v1_bot_name: ::std::option::Option<::std::string::String>,
10    /// <p>The version of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
11    pub v1_bot_version: ::std::option::Option<::std::string::String>,
12    /// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
13    pub v1_bot_locale: ::std::option::Option<crate::types::Locale>,
14    /// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
15    pub v2_bot_id: ::std::option::Option<::std::string::String>,
16    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
17    pub v2_bot_role: ::std::option::Option<::std::string::String>,
18    /// <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>
19    pub migration_status: ::std::option::Option<crate::types::MigrationStatus>,
20    /// <p>The strategy used to conduct the migration.</p>
21    /// <ul>
22    /// <li>
23    /// <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>
24    /// <li>
25    /// <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>
26    /// </ul>
27    pub migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
28    /// <p>The date and time that the migration started.</p>
29    pub migration_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
30    /// <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>
31    /// <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>
32    pub alerts: ::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>>,
33    _request_id: Option<String>,
34}
35impl GetMigrationOutput {
36    /// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
37    pub fn migration_id(&self) -> ::std::option::Option<&str> {
38        self.migration_id.as_deref()
39    }
40    /// <p>The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
41    pub fn v1_bot_name(&self) -> ::std::option::Option<&str> {
42        self.v1_bot_name.as_deref()
43    }
44    /// <p>The version of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
45    pub fn v1_bot_version(&self) -> ::std::option::Option<&str> {
46        self.v1_bot_version.as_deref()
47    }
48    /// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
49    pub fn v1_bot_locale(&self) -> ::std::option::Option<&crate::types::Locale> {
50        self.v1_bot_locale.as_ref()
51    }
52    /// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
53    pub fn v2_bot_id(&self) -> ::std::option::Option<&str> {
54        self.v2_bot_id.as_deref()
55    }
56    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
57    pub fn v2_bot_role(&self) -> ::std::option::Option<&str> {
58        self.v2_bot_role.as_deref()
59    }
60    /// <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>
61    pub fn migration_status(&self) -> ::std::option::Option<&crate::types::MigrationStatus> {
62        self.migration_status.as_ref()
63    }
64    /// <p>The strategy used to conduct the migration.</p>
65    /// <ul>
66    /// <li>
67    /// <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>
68    /// <li>
69    /// <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>
70    /// </ul>
71    pub fn migration_strategy(&self) -> ::std::option::Option<&crate::types::MigrationStrategy> {
72        self.migration_strategy.as_ref()
73    }
74    /// <p>The date and time that the migration started.</p>
75    pub fn migration_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
76        self.migration_timestamp.as_ref()
77    }
78    /// <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>
79    /// <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>
80    ///
81    /// 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()`.
82    pub fn alerts(&self) -> &[crate::types::MigrationAlert] {
83        self.alerts.as_deref().unwrap_or_default()
84    }
85}
86impl ::aws_types::request_id::RequestId for GetMigrationOutput {
87    fn request_id(&self) -> Option<&str> {
88        self._request_id.as_deref()
89    }
90}
91impl GetMigrationOutput {
92    /// Creates a new builder-style object to manufacture [`GetMigrationOutput`](crate::operation::get_migration::GetMigrationOutput).
93    pub fn builder() -> crate::operation::get_migration::builders::GetMigrationOutputBuilder {
94        crate::operation::get_migration::builders::GetMigrationOutputBuilder::default()
95    }
96}
97
98/// A builder for [`GetMigrationOutput`](crate::operation::get_migration::GetMigrationOutput).
99#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
100#[non_exhaustive]
101pub struct GetMigrationOutputBuilder {
102    pub(crate) migration_id: ::std::option::Option<::std::string::String>,
103    pub(crate) v1_bot_name: ::std::option::Option<::std::string::String>,
104    pub(crate) v1_bot_version: ::std::option::Option<::std::string::String>,
105    pub(crate) v1_bot_locale: ::std::option::Option<crate::types::Locale>,
106    pub(crate) v2_bot_id: ::std::option::Option<::std::string::String>,
107    pub(crate) v2_bot_role: ::std::option::Option<::std::string::String>,
108    pub(crate) migration_status: ::std::option::Option<crate::types::MigrationStatus>,
109    pub(crate) migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
110    pub(crate) migration_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
111    pub(crate) alerts: ::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>>,
112    _request_id: Option<String>,
113}
114impl GetMigrationOutputBuilder {
115    /// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
116    pub fn migration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.migration_id = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
121    pub fn set_migration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.migration_id = input;
123        self
124    }
125    /// <p>The unique identifier of the migration. This is the same as the identifier used when calling the <code>GetMigration</code> operation.</p>
126    pub fn get_migration_id(&self) -> &::std::option::Option<::std::string::String> {
127        &self.migration_id
128    }
129    /// <p>The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
130    pub fn v1_bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.v1_bot_name = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
135    pub fn set_v1_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.v1_bot_name = input;
137        self
138    }
139    /// <p>The name of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
140    pub fn get_v1_bot_name(&self) -> &::std::option::Option<::std::string::String> {
141        &self.v1_bot_name
142    }
143    /// <p>The version of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
144    pub fn v1_bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.v1_bot_version = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The version of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
149    pub fn set_v1_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.v1_bot_version = input;
151        self
152    }
153    /// <p>The version of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
154    pub fn get_v1_bot_version(&self) -> &::std::option::Option<::std::string::String> {
155        &self.v1_bot_version
156    }
157    /// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
158    pub fn v1_bot_locale(mut self, input: crate::types::Locale) -> Self {
159        self.v1_bot_locale = ::std::option::Option::Some(input);
160        self
161    }
162    /// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
163    pub fn set_v1_bot_locale(mut self, input: ::std::option::Option<crate::types::Locale>) -> Self {
164        self.v1_bot_locale = input;
165        self
166    }
167    /// <p>The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2.</p>
168    pub fn get_v1_bot_locale(&self) -> &::std::option::Option<crate::types::Locale> {
169        &self.v1_bot_locale
170    }
171    /// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
172    pub fn v2_bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.v2_bot_id = ::std::option::Option::Some(input.into());
174        self
175    }
176    /// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
177    pub fn set_v2_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.v2_bot_id = input;
179        self
180    }
181    /// <p>The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to.</p>
182    pub fn get_v2_bot_id(&self) -> &::std::option::Option<::std::string::String> {
183        &self.v2_bot_id
184    }
185    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
186    pub fn v2_bot_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.v2_bot_role = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
191    pub fn set_v2_bot_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.v2_bot_role = input;
193        self
194    }
195    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
196    pub fn get_v2_bot_role(&self) -> &::std::option::Option<::std::string::String> {
197        &self.v2_bot_role
198    }
199    /// <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>
200    pub fn migration_status(mut self, input: crate::types::MigrationStatus) -> Self {
201        self.migration_status = ::std::option::Option::Some(input);
202        self
203    }
204    /// <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>
205    pub fn set_migration_status(mut self, input: ::std::option::Option<crate::types::MigrationStatus>) -> Self {
206        self.migration_status = input;
207        self
208    }
209    /// <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>
210    pub fn get_migration_status(&self) -> &::std::option::Option<crate::types::MigrationStatus> {
211        &self.migration_status
212    }
213    /// <p>The strategy used to conduct the migration.</p>
214    /// <ul>
215    /// <li>
216    /// <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>
217    /// <li>
218    /// <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>
219    /// </ul>
220    pub fn migration_strategy(mut self, input: crate::types::MigrationStrategy) -> Self {
221        self.migration_strategy = ::std::option::Option::Some(input);
222        self
223    }
224    /// <p>The strategy used to conduct the migration.</p>
225    /// <ul>
226    /// <li>
227    /// <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>
228    /// <li>
229    /// <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>
230    /// </ul>
231    pub fn set_migration_strategy(mut self, input: ::std::option::Option<crate::types::MigrationStrategy>) -> Self {
232        self.migration_strategy = input;
233        self
234    }
235    /// <p>The strategy used to conduct the migration.</p>
236    /// <ul>
237    /// <li>
238    /// <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>
239    /// <li>
240    /// <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>
241    /// </ul>
242    pub fn get_migration_strategy(&self) -> &::std::option::Option<crate::types::MigrationStrategy> {
243        &self.migration_strategy
244    }
245    /// <p>The date and time that the migration started.</p>
246    pub fn migration_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
247        self.migration_timestamp = ::std::option::Option::Some(input);
248        self
249    }
250    /// <p>The date and time that the migration started.</p>
251    pub fn set_migration_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
252        self.migration_timestamp = input;
253        self
254    }
255    /// <p>The date and time that the migration started.</p>
256    pub fn get_migration_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
257        &self.migration_timestamp
258    }
259    /// Appends an item to `alerts`.
260    ///
261    /// To override the contents of this collection use [`set_alerts`](Self::set_alerts).
262    ///
263    /// <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>
264    /// <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>
265    pub fn alerts(mut self, input: crate::types::MigrationAlert) -> Self {
266        let mut v = self.alerts.unwrap_or_default();
267        v.push(input);
268        self.alerts = ::std::option::Option::Some(v);
269        self
270    }
271    /// <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>
272    /// <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>
273    pub fn set_alerts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>>) -> Self {
274        self.alerts = input;
275        self
276    }
277    /// <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>
278    /// <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>
279    pub fn get_alerts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MigrationAlert>> {
280        &self.alerts
281    }
282    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
283        self._request_id = Some(request_id.into());
284        self
285    }
286
287    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
288        self._request_id = request_id;
289        self
290    }
291    /// Consumes the builder and constructs a [`GetMigrationOutput`](crate::operation::get_migration::GetMigrationOutput).
292    pub fn build(self) -> crate::operation::get_migration::GetMigrationOutput {
293        crate::operation::get_migration::GetMigrationOutput {
294            migration_id: self.migration_id,
295            v1_bot_name: self.v1_bot_name,
296            v1_bot_version: self.v1_bot_version,
297            v1_bot_locale: self.v1_bot_locale,
298            v2_bot_id: self.v2_bot_id,
299            v2_bot_role: self.v2_bot_role,
300            migration_status: self.migration_status,
301            migration_strategy: self.migration_strategy,
302            migration_timestamp: self.migration_timestamp,
303            alerts: self.alerts,
304            _request_id: self._request_id,
305        }
306    }
307}