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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The properties of a parallel data resource.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ParallelDataProperties {
    /// <p>The custom name assigned to the parallel data resource.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the parallel data resource.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The description assigned to the parallel data resource.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The status of the parallel data resource. When the parallel data is ready for you to use, the status is <code>ACTIVE</code>.</p>
    pub status: ::std::option::Option<crate::types::ParallelDataStatus>,
    /// <p>The source language of the translations in the parallel data file.</p>
    pub source_language_code: ::std::option::Option<::std::string::String>,
    /// <p>The language codes for the target languages available in the parallel data file. All possible target languages are returned as an array.</p>
    pub target_language_codes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Specifies the format and S3 location of the parallel data input file.</p>
    pub parallel_data_config: ::std::option::Option<crate::types::ParallelDataConfig>,
    /// <p>Additional information from Amazon Translate about the parallel data resource. </p>
    pub message: ::std::option::Option<::std::string::String>,
    /// <p>The number of UTF-8 characters that Amazon Translate imported from the parallel data input file. This number includes only the characters in your translation examples. It does not include characters that are used to format your file. For example, if you provided a Translation Memory Exchange (.tmx) file, this number does not include the tags.</p>
    pub imported_data_size: ::std::option::Option<i64>,
    /// <p>The number of records successfully imported from the parallel data input file.</p>
    pub imported_record_count: ::std::option::Option<i64>,
    /// <p>The number of records unsuccessfully imported from the parallel data input file.</p>
    pub failed_record_count: ::std::option::Option<i64>,
    /// <p>The number of items in the input file that Amazon Translate skipped when you created or updated the parallel data resource. For example, Amazon Translate skips empty records, empty target texts, and empty lines.</p>
    pub skipped_record_count: ::std::option::Option<i64>,
    /// <p>The encryption key used to encrypt this object.</p>
    pub encryption_key: ::std::option::Option<crate::types::EncryptionKey>,
    /// <p>The time at which the parallel data resource was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time at which the parallel data resource was last updated.</p>
    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The status of the most recent update attempt for the parallel data resource.</p>
    pub latest_update_attempt_status: ::std::option::Option<crate::types::ParallelDataStatus>,
    /// <p>The time that the most recent update was attempted.</p>
    pub latest_update_attempt_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ParallelDataProperties {
    /// <p>The custom name assigned to the parallel data resource.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the parallel data resource.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The description assigned to the parallel data resource.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The status of the parallel data resource. When the parallel data is ready for you to use, the status is <code>ACTIVE</code>.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ParallelDataStatus> {
        self.status.as_ref()
    }
    /// <p>The source language of the translations in the parallel data file.</p>
    pub fn source_language_code(&self) -> ::std::option::Option<&str> {
        self.source_language_code.as_deref()
    }
    /// <p>The language codes for the target languages available in the parallel data file. All possible target languages are returned as an array.</p>
    pub fn target_language_codes(&self) -> ::std::option::Option<&[::std::string::String]> {
        self.target_language_codes.as_deref()
    }
    /// <p>Specifies the format and S3 location of the parallel data input file.</p>
    pub fn parallel_data_config(&self) -> ::std::option::Option<&crate::types::ParallelDataConfig> {
        self.parallel_data_config.as_ref()
    }
    /// <p>Additional information from Amazon Translate about the parallel data resource. </p>
    pub fn message(&self) -> ::std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The number of UTF-8 characters that Amazon Translate imported from the parallel data input file. This number includes only the characters in your translation examples. It does not include characters that are used to format your file. For example, if you provided a Translation Memory Exchange (.tmx) file, this number does not include the tags.</p>
    pub fn imported_data_size(&self) -> ::std::option::Option<i64> {
        self.imported_data_size
    }
    /// <p>The number of records successfully imported from the parallel data input file.</p>
    pub fn imported_record_count(&self) -> ::std::option::Option<i64> {
        self.imported_record_count
    }
    /// <p>The number of records unsuccessfully imported from the parallel data input file.</p>
    pub fn failed_record_count(&self) -> ::std::option::Option<i64> {
        self.failed_record_count
    }
    /// <p>The number of items in the input file that Amazon Translate skipped when you created or updated the parallel data resource. For example, Amazon Translate skips empty records, empty target texts, and empty lines.</p>
    pub fn skipped_record_count(&self) -> ::std::option::Option<i64> {
        self.skipped_record_count
    }
    /// <p>The encryption key used to encrypt this object.</p>
    pub fn encryption_key(&self) -> ::std::option::Option<&crate::types::EncryptionKey> {
        self.encryption_key.as_ref()
    }
    /// <p>The time at which the parallel data resource was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The time at which the parallel data resource was last updated.</p>
    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_at.as_ref()
    }
    /// <p>The status of the most recent update attempt for the parallel data resource.</p>
    pub fn latest_update_attempt_status(&self) -> ::std::option::Option<&crate::types::ParallelDataStatus> {
        self.latest_update_attempt_status.as_ref()
    }
    /// <p>The time that the most recent update was attempted.</p>
    pub fn latest_update_attempt_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.latest_update_attempt_at.as_ref()
    }
}
impl ParallelDataProperties {
    /// Creates a new builder-style object to manufacture [`ParallelDataProperties`](crate::types::ParallelDataProperties).
    pub fn builder() -> crate::types::builders::ParallelDataPropertiesBuilder {
        crate::types::builders::ParallelDataPropertiesBuilder::default()
    }
}

/// A builder for [`ParallelDataProperties`](crate::types::ParallelDataProperties).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ParallelDataPropertiesBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ParallelDataStatus>,
    pub(crate) source_language_code: ::std::option::Option<::std::string::String>,
    pub(crate) target_language_codes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) parallel_data_config: ::std::option::Option<crate::types::ParallelDataConfig>,
    pub(crate) message: ::std::option::Option<::std::string::String>,
    pub(crate) imported_data_size: ::std::option::Option<i64>,
    pub(crate) imported_record_count: ::std::option::Option<i64>,
    pub(crate) failed_record_count: ::std::option::Option<i64>,
    pub(crate) skipped_record_count: ::std::option::Option<i64>,
    pub(crate) encryption_key: ::std::option::Option<crate::types::EncryptionKey>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) latest_update_attempt_status: ::std::option::Option<crate::types::ParallelDataStatus>,
    pub(crate) latest_update_attempt_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ParallelDataPropertiesBuilder {
    /// <p>The custom name assigned to the parallel data resource.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The custom name assigned to the parallel data resource.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The custom name assigned to the parallel data resource.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The Amazon Resource Name (ARN) of the parallel data resource.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the parallel data resource.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the parallel data resource.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The description assigned to the parallel data resource.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description assigned to the parallel data resource.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description assigned to the parallel data resource.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The status of the parallel data resource. When the parallel data is ready for you to use, the status is <code>ACTIVE</code>.</p>
    pub fn status(mut self, input: crate::types::ParallelDataStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the parallel data resource. When the parallel data is ready for you to use, the status is <code>ACTIVE</code>.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ParallelDataStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the parallel data resource. When the parallel data is ready for you to use, the status is <code>ACTIVE</code>.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ParallelDataStatus> {
        &self.status
    }
    /// <p>The source language of the translations in the parallel data file.</p>
    pub fn source_language_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_language_code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The source language of the translations in the parallel data file.</p>
    pub fn set_source_language_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_language_code = input;
        self
    }
    /// <p>The source language of the translations in the parallel data file.</p>
    pub fn get_source_language_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_language_code
    }
    /// Appends an item to `target_language_codes`.
    ///
    /// To override the contents of this collection use [`set_target_language_codes`](Self::set_target_language_codes).
    ///
    /// <p>The language codes for the target languages available in the parallel data file. All possible target languages are returned as an array.</p>
    pub fn target_language_codes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.target_language_codes.unwrap_or_default();
        v.push(input.into());
        self.target_language_codes = ::std::option::Option::Some(v);
        self
    }
    /// <p>The language codes for the target languages available in the parallel data file. All possible target languages are returned as an array.</p>
    pub fn set_target_language_codes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.target_language_codes = input;
        self
    }
    /// <p>The language codes for the target languages available in the parallel data file. All possible target languages are returned as an array.</p>
    pub fn get_target_language_codes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.target_language_codes
    }
    /// <p>Specifies the format and S3 location of the parallel data input file.</p>
    pub fn parallel_data_config(mut self, input: crate::types::ParallelDataConfig) -> Self {
        self.parallel_data_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the format and S3 location of the parallel data input file.</p>
    pub fn set_parallel_data_config(mut self, input: ::std::option::Option<crate::types::ParallelDataConfig>) -> Self {
        self.parallel_data_config = input;
        self
    }
    /// <p>Specifies the format and S3 location of the parallel data input file.</p>
    pub fn get_parallel_data_config(&self) -> &::std::option::Option<crate::types::ParallelDataConfig> {
        &self.parallel_data_config
    }
    /// <p>Additional information from Amazon Translate about the parallel data resource. </p>
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Additional information from Amazon Translate about the parallel data resource. </p>
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message = input;
        self
    }
    /// <p>Additional information from Amazon Translate about the parallel data resource. </p>
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.message
    }
    /// <p>The number of UTF-8 characters that Amazon Translate imported from the parallel data input file. This number includes only the characters in your translation examples. It does not include characters that are used to format your file. For example, if you provided a Translation Memory Exchange (.tmx) file, this number does not include the tags.</p>
    pub fn imported_data_size(mut self, input: i64) -> Self {
        self.imported_data_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of UTF-8 characters that Amazon Translate imported from the parallel data input file. This number includes only the characters in your translation examples. It does not include characters that are used to format your file. For example, if you provided a Translation Memory Exchange (.tmx) file, this number does not include the tags.</p>
    pub fn set_imported_data_size(mut self, input: ::std::option::Option<i64>) -> Self {
        self.imported_data_size = input;
        self
    }
    /// <p>The number of UTF-8 characters that Amazon Translate imported from the parallel data input file. This number includes only the characters in your translation examples. It does not include characters that are used to format your file. For example, if you provided a Translation Memory Exchange (.tmx) file, this number does not include the tags.</p>
    pub fn get_imported_data_size(&self) -> &::std::option::Option<i64> {
        &self.imported_data_size
    }
    /// <p>The number of records successfully imported from the parallel data input file.</p>
    pub fn imported_record_count(mut self, input: i64) -> Self {
        self.imported_record_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of records successfully imported from the parallel data input file.</p>
    pub fn set_imported_record_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.imported_record_count = input;
        self
    }
    /// <p>The number of records successfully imported from the parallel data input file.</p>
    pub fn get_imported_record_count(&self) -> &::std::option::Option<i64> {
        &self.imported_record_count
    }
    /// <p>The number of records unsuccessfully imported from the parallel data input file.</p>
    pub fn failed_record_count(mut self, input: i64) -> Self {
        self.failed_record_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of records unsuccessfully imported from the parallel data input file.</p>
    pub fn set_failed_record_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.failed_record_count = input;
        self
    }
    /// <p>The number of records unsuccessfully imported from the parallel data input file.</p>
    pub fn get_failed_record_count(&self) -> &::std::option::Option<i64> {
        &self.failed_record_count
    }
    /// <p>The number of items in the input file that Amazon Translate skipped when you created or updated the parallel data resource. For example, Amazon Translate skips empty records, empty target texts, and empty lines.</p>
    pub fn skipped_record_count(mut self, input: i64) -> Self {
        self.skipped_record_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of items in the input file that Amazon Translate skipped when you created or updated the parallel data resource. For example, Amazon Translate skips empty records, empty target texts, and empty lines.</p>
    pub fn set_skipped_record_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.skipped_record_count = input;
        self
    }
    /// <p>The number of items in the input file that Amazon Translate skipped when you created or updated the parallel data resource. For example, Amazon Translate skips empty records, empty target texts, and empty lines.</p>
    pub fn get_skipped_record_count(&self) -> &::std::option::Option<i64> {
        &self.skipped_record_count
    }
    /// <p>The encryption key used to encrypt this object.</p>
    pub fn encryption_key(mut self, input: crate::types::EncryptionKey) -> Self {
        self.encryption_key = ::std::option::Option::Some(input);
        self
    }
    /// <p>The encryption key used to encrypt this object.</p>
    pub fn set_encryption_key(mut self, input: ::std::option::Option<crate::types::EncryptionKey>) -> Self {
        self.encryption_key = input;
        self
    }
    /// <p>The encryption key used to encrypt this object.</p>
    pub fn get_encryption_key(&self) -> &::std::option::Option<crate::types::EncryptionKey> {
        &self.encryption_key
    }
    /// <p>The time at which the parallel data resource was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the parallel data resource was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The time at which the parallel data resource was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The time at which the parallel data resource was last updated.</p>
    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the parallel data resource was last updated.</p>
    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_at = input;
        self
    }
    /// <p>The time at which the parallel data resource was last updated.</p>
    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_at
    }
    /// <p>The status of the most recent update attempt for the parallel data resource.</p>
    pub fn latest_update_attempt_status(mut self, input: crate::types::ParallelDataStatus) -> Self {
        self.latest_update_attempt_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the most recent update attempt for the parallel data resource.</p>
    pub fn set_latest_update_attempt_status(mut self, input: ::std::option::Option<crate::types::ParallelDataStatus>) -> Self {
        self.latest_update_attempt_status = input;
        self
    }
    /// <p>The status of the most recent update attempt for the parallel data resource.</p>
    pub fn get_latest_update_attempt_status(&self) -> &::std::option::Option<crate::types::ParallelDataStatus> {
        &self.latest_update_attempt_status
    }
    /// <p>The time that the most recent update was attempted.</p>
    pub fn latest_update_attempt_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.latest_update_attempt_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that the most recent update was attempted.</p>
    pub fn set_latest_update_attempt_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.latest_update_attempt_at = input;
        self
    }
    /// <p>The time that the most recent update was attempted.</p>
    pub fn get_latest_update_attempt_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.latest_update_attempt_at
    }
    /// Consumes the builder and constructs a [`ParallelDataProperties`](crate::types::ParallelDataProperties).
    pub fn build(self) -> crate::types::ParallelDataProperties {
        crate::types::ParallelDataProperties {
            name: self.name,
            arn: self.arn,
            description: self.description,
            status: self.status,
            source_language_code: self.source_language_code,
            target_language_codes: self.target_language_codes,
            parallel_data_config: self.parallel_data_config,
            message: self.message,
            imported_data_size: self.imported_data_size,
            imported_record_count: self.imported_record_count,
            failed_record_count: self.failed_record_count,
            skipped_record_count: self.skipped_record_count,
            encryption_key: self.encryption_key,
            created_at: self.created_at,
            last_updated_at: self.last_updated_at,
            latest_update_attempt_status: self.latest_update_attempt_status,
            latest_update_attempt_at: self.latest_update_attempt_at,
        }
    }
}