aws_sdk_lexmodelbuilding/operation/start_migration/
_start_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 StartMigrationOutput {
6    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
7    pub v1_bot_name: ::std::option::Option<::std::string::String>,
8    /// <p>The version of the bot to migrate to Amazon Lex V2.</p>
9    pub v1_bot_version: ::std::option::Option<::std::string::String>,
10    /// <p>The locale used for the Amazon Lex V1 bot.</p>
11    pub v1_bot_locale: ::std::option::Option<crate::types::Locale>,
12    /// <p>The unique identifier for the Amazon Lex V2 bot.</p>
13    pub v2_bot_id: ::std::option::Option<::std::string::String>,
14    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
15    pub v2_bot_role: ::std::option::Option<::std::string::String>,
16    /// <p>The unique identifier that Amazon Lex assigned to the migration.</p>
17    pub migration_id: ::std::option::Option<::std::string::String>,
18    /// <p>The strategy used to conduct the migration.</p>
19    pub migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
20    /// <p>The date and time that the migration started.</p>
21    pub migration_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
22    _request_id: Option<String>,
23}
24impl StartMigrationOutput {
25    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
26    pub fn v1_bot_name(&self) -> ::std::option::Option<&str> {
27        self.v1_bot_name.as_deref()
28    }
29    /// <p>The version of the bot to migrate to Amazon Lex V2.</p>
30    pub fn v1_bot_version(&self) -> ::std::option::Option<&str> {
31        self.v1_bot_version.as_deref()
32    }
33    /// <p>The locale used for the Amazon Lex V1 bot.</p>
34    pub fn v1_bot_locale(&self) -> ::std::option::Option<&crate::types::Locale> {
35        self.v1_bot_locale.as_ref()
36    }
37    /// <p>The unique identifier for the Amazon Lex V2 bot.</p>
38    pub fn v2_bot_id(&self) -> ::std::option::Option<&str> {
39        self.v2_bot_id.as_deref()
40    }
41    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
42    pub fn v2_bot_role(&self) -> ::std::option::Option<&str> {
43        self.v2_bot_role.as_deref()
44    }
45    /// <p>The unique identifier that Amazon Lex assigned to the migration.</p>
46    pub fn migration_id(&self) -> ::std::option::Option<&str> {
47        self.migration_id.as_deref()
48    }
49    /// <p>The strategy used to conduct the migration.</p>
50    pub fn migration_strategy(&self) -> ::std::option::Option<&crate::types::MigrationStrategy> {
51        self.migration_strategy.as_ref()
52    }
53    /// <p>The date and time that the migration started.</p>
54    pub fn migration_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55        self.migration_timestamp.as_ref()
56    }
57}
58impl ::aws_types::request_id::RequestId for StartMigrationOutput {
59    fn request_id(&self) -> Option<&str> {
60        self._request_id.as_deref()
61    }
62}
63impl StartMigrationOutput {
64    /// Creates a new builder-style object to manufacture [`StartMigrationOutput`](crate::operation::start_migration::StartMigrationOutput).
65    pub fn builder() -> crate::operation::start_migration::builders::StartMigrationOutputBuilder {
66        crate::operation::start_migration::builders::StartMigrationOutputBuilder::default()
67    }
68}
69
70/// A builder for [`StartMigrationOutput`](crate::operation::start_migration::StartMigrationOutput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct StartMigrationOutputBuilder {
74    pub(crate) v1_bot_name: ::std::option::Option<::std::string::String>,
75    pub(crate) v1_bot_version: ::std::option::Option<::std::string::String>,
76    pub(crate) v1_bot_locale: ::std::option::Option<crate::types::Locale>,
77    pub(crate) v2_bot_id: ::std::option::Option<::std::string::String>,
78    pub(crate) v2_bot_role: ::std::option::Option<::std::string::String>,
79    pub(crate) migration_id: ::std::option::Option<::std::string::String>,
80    pub(crate) migration_strategy: ::std::option::Option<crate::types::MigrationStrategy>,
81    pub(crate) migration_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
82    _request_id: Option<String>,
83}
84impl StartMigrationOutputBuilder {
85    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
86    pub fn v1_bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.v1_bot_name = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
91    pub fn set_v1_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.v1_bot_name = input;
93        self
94    }
95    /// <p>The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2.</p>
96    pub fn get_v1_bot_name(&self) -> &::std::option::Option<::std::string::String> {
97        &self.v1_bot_name
98    }
99    /// <p>The version of the bot to migrate to Amazon Lex V2.</p>
100    pub fn v1_bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.v1_bot_version = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The version of the bot to migrate to Amazon Lex V2.</p>
105    pub fn set_v1_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.v1_bot_version = input;
107        self
108    }
109    /// <p>The version of the bot to migrate to Amazon Lex V2.</p>
110    pub fn get_v1_bot_version(&self) -> &::std::option::Option<::std::string::String> {
111        &self.v1_bot_version
112    }
113    /// <p>The locale used for the Amazon Lex V1 bot.</p>
114    pub fn v1_bot_locale(mut self, input: crate::types::Locale) -> Self {
115        self.v1_bot_locale = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The locale used for the Amazon Lex V1 bot.</p>
119    pub fn set_v1_bot_locale(mut self, input: ::std::option::Option<crate::types::Locale>) -> Self {
120        self.v1_bot_locale = input;
121        self
122    }
123    /// <p>The locale used for the Amazon Lex V1 bot.</p>
124    pub fn get_v1_bot_locale(&self) -> &::std::option::Option<crate::types::Locale> {
125        &self.v1_bot_locale
126    }
127    /// <p>The unique identifier for the Amazon Lex V2 bot.</p>
128    pub fn v2_bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.v2_bot_id = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The unique identifier for the Amazon Lex V2 bot.</p>
133    pub fn set_v2_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.v2_bot_id = input;
135        self
136    }
137    /// <p>The unique identifier for the Amazon Lex V2 bot.</p>
138    pub fn get_v2_bot_id(&self) -> &::std::option::Option<::std::string::String> {
139        &self.v2_bot_id
140    }
141    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
142    pub fn v2_bot_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.v2_bot_role = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
147    pub fn set_v2_bot_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.v2_bot_role = input;
149        self
150    }
151    /// <p>The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot.</p>
152    pub fn get_v2_bot_role(&self) -> &::std::option::Option<::std::string::String> {
153        &self.v2_bot_role
154    }
155    /// <p>The unique identifier that Amazon Lex assigned to the migration.</p>
156    pub fn migration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.migration_id = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>The unique identifier that Amazon Lex assigned to the migration.</p>
161    pub fn set_migration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.migration_id = input;
163        self
164    }
165    /// <p>The unique identifier that Amazon Lex assigned to the migration.</p>
166    pub fn get_migration_id(&self) -> &::std::option::Option<::std::string::String> {
167        &self.migration_id
168    }
169    /// <p>The strategy used to conduct the migration.</p>
170    pub fn migration_strategy(mut self, input: crate::types::MigrationStrategy) -> Self {
171        self.migration_strategy = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>The strategy used to conduct the migration.</p>
175    pub fn set_migration_strategy(mut self, input: ::std::option::Option<crate::types::MigrationStrategy>) -> Self {
176        self.migration_strategy = input;
177        self
178    }
179    /// <p>The strategy used to conduct the migration.</p>
180    pub fn get_migration_strategy(&self) -> &::std::option::Option<crate::types::MigrationStrategy> {
181        &self.migration_strategy
182    }
183    /// <p>The date and time that the migration started.</p>
184    pub fn migration_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
185        self.migration_timestamp = ::std::option::Option::Some(input);
186        self
187    }
188    /// <p>The date and time that the migration started.</p>
189    pub fn set_migration_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
190        self.migration_timestamp = input;
191        self
192    }
193    /// <p>The date and time that the migration started.</p>
194    pub fn get_migration_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
195        &self.migration_timestamp
196    }
197    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
198        self._request_id = Some(request_id.into());
199        self
200    }
201
202    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
203        self._request_id = request_id;
204        self
205    }
206    /// Consumes the builder and constructs a [`StartMigrationOutput`](crate::operation::start_migration::StartMigrationOutput).
207    pub fn build(self) -> crate::operation::start_migration::StartMigrationOutput {
208        crate::operation::start_migration::StartMigrationOutput {
209            v1_bot_name: self.v1_bot_name,
210            v1_bot_version: self.v1_bot_version,
211            v1_bot_locale: self.v1_bot_locale,
212            v2_bot_id: self.v2_bot_id,
213            v2_bot_role: self.v2_bot_role,
214            migration_id: self.migration_id,
215            migration_strategy: self.migration_strategy,
216            migration_timestamp: self.migration_timestamp,
217            _request_id: self._request_id,
218        }
219    }
220}