| 1 | package Paws::Translate; | ||
| 2 | use Moose; | ||
| 3 | sub service { 'translate' } | ||
| 4 | sub signing_name { 'translate' } | ||
| 5 | sub version { '2017-07-01' } | ||
| 6 | sub target_prefix { 'AWSShineFrontendService_20170701' } | ||
| 7 | sub json_version { "1.1" } | ||
| 8 | has max_attempts => (is => 'ro', isa => 'Int', default => 5); | ||
| 9 | has retry => (is => 'ro', isa => 'HashRef', default => sub { | ||
| 10 | { base => 'rand', type => 'exponential', growth_factor => 2 } | ||
| 11 | }); | ||
| 12 | has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [ | ||
| 13 | ] }); | ||
| 14 | |||
| 15 | with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller'; | ||
| 16 | |||
| 17 | |||
| 18 | sub CreateParallelData { | ||
| 19 | my $self = shift; | ||
| 20 | my $call_object = $self->new_with_coercions('Paws::Translate::CreateParallelData', @_); | ||
| 21 | return $self->caller->do_call($self, $call_object); | ||
| 22 | } | ||
| 23 | sub DeleteParallelData { | ||
| 24 | my $self = shift; | ||
| 25 | my $call_object = $self->new_with_coercions('Paws::Translate::DeleteParallelData', @_); | ||
| 26 | return $self->caller->do_call($self, $call_object); | ||
| 27 | } | ||
| 28 | sub DeleteTerminology { | ||
| 29 | my $self = shift; | ||
| 30 | my $call_object = $self->new_with_coercions('Paws::Translate::DeleteTerminology', @_); | ||
| 31 | return $self->caller->do_call($self, $call_object); | ||
| 32 | } | ||
| 33 | sub DescribeTextTranslationJob { | ||
| 34 | my $self = shift; | ||
| 35 | my $call_object = $self->new_with_coercions('Paws::Translate::DescribeTextTranslationJob', @_); | ||
| 36 | return $self->caller->do_call($self, $call_object); | ||
| 37 | } | ||
| 38 | sub GetParallelData { | ||
| 39 | my $self = shift; | ||
| 40 | my $call_object = $self->new_with_coercions('Paws::Translate::GetParallelData', @_); | ||
| 41 | return $self->caller->do_call($self, $call_object); | ||
| 42 | } | ||
| 43 | sub GetTerminology { | ||
| 44 | my $self = shift; | ||
| 45 | my $call_object = $self->new_with_coercions('Paws::Translate::GetTerminology', @_); | ||
| 46 | return $self->caller->do_call($self, $call_object); | ||
| 47 | } | ||
| 48 | sub ImportTerminology { | ||
| 49 | my $self = shift; | ||
| 50 | my $call_object = $self->new_with_coercions('Paws::Translate::ImportTerminology', @_); | ||
| 51 | return $self->caller->do_call($self, $call_object); | ||
| 52 | } | ||
| 53 | sub ListParallelData { | ||
| 54 | my $self = shift; | ||
| 55 | my $call_object = $self->new_with_coercions('Paws::Translate::ListParallelData', @_); | ||
| 56 | return $self->caller->do_call($self, $call_object); | ||
| 57 | } | ||
| 58 | sub ListTerminologies { | ||
| 59 | my $self = shift; | ||
| 60 | my $call_object = $self->new_with_coercions('Paws::Translate::ListTerminologies', @_); | ||
| 61 | return $self->caller->do_call($self, $call_object); | ||
| 62 | } | ||
| 63 | sub ListTextTranslationJobs { | ||
| 64 | my $self = shift; | ||
| 65 | my $call_object = $self->new_with_coercions('Paws::Translate::ListTextTranslationJobs', @_); | ||
| 66 | return $self->caller->do_call($self, $call_object); | ||
| 67 | } | ||
| 68 | sub StartTextTranslationJob { | ||
| 69 | my $self = shift; | ||
| 70 | my $call_object = $self->new_with_coercions('Paws::Translate::StartTextTranslationJob', @_); | ||
| 71 | return $self->caller->do_call($self, $call_object); | ||
| 72 | } | ||
| 73 | sub StopTextTranslationJob { | ||
| 74 | my $self = shift; | ||
| 75 | my $call_object = $self->new_with_coercions('Paws::Translate::StopTextTranslationJob', @_); | ||
| 76 | return $self->caller->do_call($self, $call_object); | ||
| 77 | } | ||
| 78 | sub TranslateText { | ||
| 79 | my $self = shift; | ||
| 80 | my $call_object = $self->new_with_coercions('Paws::Translate::TranslateText', @_); | ||
| 81 | return $self->caller->do_call($self, $call_object); | ||
| 82 | } | ||
| 83 | sub UpdateParallelData { | ||
| 84 | my $self = shift; | ||
| 85 | my $call_object = $self->new_with_coercions('Paws::Translate::UpdateParallelData', @_); | ||
| 86 | return $self->caller->do_call($self, $call_object); | ||
| 87 | } | ||
| 88 | |||
| 89 | sub ListAllTerminologies { | ||
| 90 | my $self = shift; | ||
| 91 | |||
| 92 | my $callback = shift @_ if (ref($_[0]) eq 'CODE'); | ||
| 93 | my $result = $self->ListTerminologies(@_); | ||
| 94 | my $next_result = $result; | ||
| 95 | |||
| 96 | if (not defined $callback) { | ||
| 97 | while ($next_result->NextToken) { | ||
| 98 | $next_result = $self->ListTerminologies(@_, NextToken => $next_result->NextToken); | ||
| 99 | push @{ $result->TerminologyPropertiesList }, @{ $next_result->TerminologyPropertiesList }; | ||
| 100 | } | ||
| 101 | return $result; | ||
| 102 | } else { | ||
| 103 | while ($result->NextToken) { | ||
| 104 | $callback->($_ => 'TerminologyPropertiesList') foreach (@{ $result->TerminologyPropertiesList }); | ||
| 105 | $result = $self->ListTerminologies(@_, NextToken => $result->NextToken); | ||
| 106 | } | ||
| 107 | $callback->($_ => 'TerminologyPropertiesList') foreach (@{ $result->TerminologyPropertiesList }); | ||
| 108 | } | ||
| 109 | |||
| 110 | return undef | ||
| 111 | } | ||
| 112 | |||
| 113 | |||
| 114 | sub operations { qw/CreateParallelData DeleteParallelData DeleteTerminology DescribeTextTranslationJob GetParallelData GetTerminology ImportTerminology ListParallelData ListTerminologies ListTextTranslationJobs StartTextTranslationJob StopTextTranslationJob TranslateText UpdateParallelData / } | ||
| 115 | |||
| 116 | 1; | ||
| 117 | |||
| 118 | ### main pod documentation begin ### | ||
| 119 | |||
| 120 | =head1 NAME | ||
| 121 | |||
| 122 | Paws::Translate - Perl Interface to AWS Amazon Translate | ||
| 123 | |||
| 124 | =head1 SYNOPSIS | ||
| 125 | |||
| 126 | use Paws; | ||
| 127 | |||
| 128 | my $obj = Paws->service('Translate'); | ||
| 129 | my $res = $obj->Method( | ||
| 130 | Arg1 => $val1, | ||
| 131 | Arg2 => [ 'V1', 'V2' ], | ||
| 132 | # if Arg3 is an object, the HashRef will be used as arguments to the constructor | ||
| 133 | # of the arguments type | ||
| 134 | Arg3 => { Att1 => 'Val1' }, | ||
| 135 | # if Arg4 is an array of objects, the HashRefs will be passed as arguments to | ||
| 136 | # the constructor of the arguments type | ||
| 137 | Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], | ||
| 138 | ); | ||
| 139 | |||
| 140 | =head1 DESCRIPTION | ||
| 141 | |||
| 142 | Provides translation between one source language and another of the | ||
| 143 | same set of languages. | ||
| 144 | |||
| 145 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01> | ||
| 146 | |||
| 147 | |||
| 148 | =head1 METHODS | ||
| 149 | |||
| 150 | =head2 CreateParallelData | ||
| 151 | |||
| 152 | =over | ||
| 153 | |||
| 154 | =item ClientToken => Str | ||
| 155 | |||
| 156 | =item Name => Str | ||
| 157 | |||
| 158 | =item ParallelDataConfig => L<Paws::Translate::ParallelDataConfig> | ||
| 159 | |||
| 160 | =item [Description => Str] | ||
| 161 | |||
| 162 | =item [EncryptionKey => L<Paws::Translate::EncryptionKey>] | ||
| 163 | |||
| 164 | |||
| 165 | =back | ||
| 166 | |||
| 167 | Each argument is described in detail in: L<Paws::Translate::CreateParallelData> | ||
| 168 | |||
| 169 | Returns: a L<Paws::Translate::CreateParallelDataResponse> instance | ||
| 170 | |||
| 171 | Creates a parallel data resource in Amazon Translate by importing an | ||
| 172 | input file from Amazon S3. Parallel data files contain examples of | ||
| 173 | source phrases and their translations from your translation memory. By | ||
| 174 | adding parallel data, you can influence the style, tone, and word | ||
| 175 | choice in your translation output. | ||
| 176 | |||
| 177 | |||
| 178 | =head2 DeleteParallelData | ||
| 179 | |||
| 180 | =over | ||
| 181 | |||
| 182 | =item Name => Str | ||
| 183 | |||
| 184 | |||
| 185 | =back | ||
| 186 | |||
| 187 | Each argument is described in detail in: L<Paws::Translate::DeleteParallelData> | ||
| 188 | |||
| 189 | Returns: a L<Paws::Translate::DeleteParallelDataResponse> instance | ||
| 190 | |||
| 191 | Deletes a parallel data resource in Amazon Translate. | ||
| 192 | |||
| 193 | |||
| 194 | =head2 DeleteTerminology | ||
| 195 | |||
| 196 | =over | ||
| 197 | |||
| 198 | =item Name => Str | ||
| 199 | |||
| 200 | |||
| 201 | =back | ||
| 202 | |||
| 203 | Each argument is described in detail in: L<Paws::Translate::DeleteTerminology> | ||
| 204 | |||
| 205 | Returns: nothing | ||
| 206 | |||
| 207 | A synchronous action that deletes a custom terminology. | ||
| 208 | |||
| 209 | |||
| 210 | =head2 DescribeTextTranslationJob | ||
| 211 | |||
| 212 | =over | ||
| 213 | |||
| 214 | =item JobId => Str | ||
| 215 | |||
| 216 | |||
| 217 | =back | ||
| 218 | |||
| 219 | Each argument is described in detail in: L<Paws::Translate::DescribeTextTranslationJob> | ||
| 220 | |||
| 221 | Returns: a L<Paws::Translate::DescribeTextTranslationJobResponse> instance | ||
| 222 | |||
| 223 | Gets the properties associated with an asycnhronous batch translation | ||
| 224 | job including name, ID, status, source and target languages, | ||
| 225 | input/output S3 buckets, and so on. | ||
| 226 | |||
| 227 | |||
| 228 | =head2 GetParallelData | ||
| 229 | |||
| 230 | =over | ||
| 231 | |||
| 232 | =item Name => Str | ||
| 233 | |||
| 234 | |||
| 235 | =back | ||
| 236 | |||
| 237 | Each argument is described in detail in: L<Paws::Translate::GetParallelData> | ||
| 238 | |||
| 239 | Returns: a L<Paws::Translate::GetParallelDataResponse> instance | ||
| 240 | |||
| 241 | Provides information about a parallel data resource. | ||
| 242 | |||
| 243 | |||
| 244 | =head2 GetTerminology | ||
| 245 | |||
| 246 | =over | ||
| 247 | |||
| 248 | =item Name => Str | ||
| 249 | |||
| 250 | =item TerminologyDataFormat => Str | ||
| 251 | |||
| 252 | |||
| 253 | =back | ||
| 254 | |||
| 255 | Each argument is described in detail in: L<Paws::Translate::GetTerminology> | ||
| 256 | |||
| 257 | Returns: a L<Paws::Translate::GetTerminologyResponse> instance | ||
| 258 | |||
| 259 | Retrieves a custom terminology. | ||
| 260 | |||
| 261 | |||
| 262 | =head2 ImportTerminology | ||
| 263 | |||
| 264 | =over | ||
| 265 | |||
| 266 | =item MergeStrategy => Str | ||
| 267 | |||
| 268 | =item Name => Str | ||
| 269 | |||
| 270 | =item TerminologyData => L<Paws::Translate::TerminologyData> | ||
| 271 | |||
| 272 | =item [Description => Str] | ||
| 273 | |||
| 274 | =item [EncryptionKey => L<Paws::Translate::EncryptionKey>] | ||
| 275 | |||
| 276 | |||
| 277 | =back | ||
| 278 | |||
| 279 | Each argument is described in detail in: L<Paws::Translate::ImportTerminology> | ||
| 280 | |||
| 281 | Returns: a L<Paws::Translate::ImportTerminologyResponse> instance | ||
| 282 | |||
| 283 | Creates or updates a custom terminology, depending on whether or not | ||
| 284 | one already exists for the given terminology name. Importing a | ||
| 285 | terminology with the same name as an existing one will merge the | ||
| 286 | terminologies based on the chosen merge strategy. Currently, the only | ||
| 287 | supported merge strategy is OVERWRITE, and so the imported terminology | ||
| 288 | will overwrite an existing terminology of the same name. | ||
| 289 | |||
| 290 | If you import a terminology that overwrites an existing one, the new | ||
| 291 | terminology take up to 10 minutes to fully propagate and be available | ||
| 292 | for use in a translation due to cache policies with the DataPlane | ||
| 293 | service that performs the translations. | ||
| 294 | |||
| 295 | |||
| 296 | =head2 ListParallelData | ||
| 297 | |||
| 298 | =over | ||
| 299 | |||
| 300 | =item [MaxResults => Int] | ||
| 301 | |||
| 302 | =item [NextToken => Str] | ||
| 303 | |||
| 304 | |||
| 305 | =back | ||
| 306 | |||
| 307 | Each argument is described in detail in: L<Paws::Translate::ListParallelData> | ||
| 308 | |||
| 309 | Returns: a L<Paws::Translate::ListParallelDataResponse> instance | ||
| 310 | |||
| 311 | Provides a list of your parallel data resources in Amazon Translate. | ||
| 312 | |||
| 313 | |||
| 314 | =head2 ListTerminologies | ||
| 315 | |||
| 316 | =over | ||
| 317 | |||
| 318 | =item [MaxResults => Int] | ||
| 319 | |||
| 320 | =item [NextToken => Str] | ||
| 321 | |||
| 322 | |||
| 323 | =back | ||
| 324 | |||
| 325 | Each argument is described in detail in: L<Paws::Translate::ListTerminologies> | ||
| 326 | |||
| 327 | Returns: a L<Paws::Translate::ListTerminologiesResponse> instance | ||
| 328 | |||
| 329 | Provides a list of custom terminologies associated with your account. | ||
| 330 | |||
| 331 | |||
| 332 | =head2 ListTextTranslationJobs | ||
| 333 | |||
| 334 | =over | ||
| 335 | |||
| 336 | =item [Filter => L<Paws::Translate::TextTranslationJobFilter>] | ||
| 337 | |||
| 338 | =item [MaxResults => Int] | ||
| 339 | |||
| 340 | =item [NextToken => Str] | ||
| 341 | |||
| 342 | |||
| 343 | =back | ||
| 344 | |||
| 345 | Each argument is described in detail in: L<Paws::Translate::ListTextTranslationJobs> | ||
| 346 | |||
| 347 | Returns: a L<Paws::Translate::ListTextTranslationJobsResponse> instance | ||
| 348 | |||
| 349 | Gets a list of the batch translation jobs that you have submitted. | ||
| 350 | |||
| 351 | |||
| 352 | =head2 StartTextTranslationJob | ||
| 353 | |||
| 354 | =over | ||
| 355 | |||
| 356 | =item ClientToken => Str | ||
| 357 | |||
| 358 | =item DataAccessRoleArn => Str | ||
| 359 | |||
| 360 | =item InputDataConfig => L<Paws::Translate::InputDataConfig> | ||
| 361 | |||
| 362 | =item OutputDataConfig => L<Paws::Translate::OutputDataConfig> | ||
| 363 | |||
| 364 | =item SourceLanguageCode => Str | ||
| 365 | |||
| 366 | =item TargetLanguageCodes => ArrayRef[Str|Undef] | ||
| 367 | |||
| 368 | =item [JobName => Str] | ||
| 369 | |||
| 370 | =item [ParallelDataNames => ArrayRef[Str|Undef]] | ||
| 371 | |||
| 372 | =item [TerminologyNames => ArrayRef[Str|Undef]] | ||
| 373 | |||
| 374 | |||
| 375 | =back | ||
| 376 | |||
| 377 | Each argument is described in detail in: L<Paws::Translate::StartTextTranslationJob> | ||
| 378 | |||
| 379 | Returns: a L<Paws::Translate::StartTextTranslationJobResponse> instance | ||
| 380 | |||
| 381 | Starts an asynchronous batch translation job. Batch translation jobs | ||
| 382 | can be used to translate large volumes of text across multiple | ||
| 383 | documents at once. For more information, see async. | ||
| 384 | |||
| 385 | Batch translation jobs can be described with the | ||
| 386 | DescribeTextTranslationJob operation, listed with the | ||
| 387 | ListTextTranslationJobs operation, and stopped with the | ||
| 388 | StopTextTranslationJob operation. | ||
| 389 | |||
| 390 | Amazon Translate does not support batch translation of multiple source | ||
| 391 | languages at once. | ||
| 392 | |||
| 393 | |||
| 394 | =head2 StopTextTranslationJob | ||
| 395 | |||
| 396 | =over | ||
| 397 | |||
| 398 | =item JobId => Str | ||
| 399 | |||
| 400 | |||
| 401 | =back | ||
| 402 | |||
| 403 | Each argument is described in detail in: L<Paws::Translate::StopTextTranslationJob> | ||
| 404 | |||
| 405 | Returns: a L<Paws::Translate::StopTextTranslationJobResponse> instance | ||
| 406 | |||
| 407 | Stops an asynchronous batch translation job that is in progress. | ||
| 408 | |||
| 409 | If the job's state is C<IN_PROGRESS>, the job will be marked for | ||
| 410 | termination and put into the C<STOP_REQUESTED> state. If the job | ||
| 411 | completes before it can be stopped, it is put into the C<COMPLETED> | ||
| 412 | state. Otherwise, the job is put into the C<STOPPED> state. | ||
| 413 | |||
| 414 | Asynchronous batch translation jobs are started with the | ||
| 415 | StartTextTranslationJob operation. You can use the | ||
| 416 | DescribeTextTranslationJob or ListTextTranslationJobs operations to get | ||
| 417 | a batch translation job's C<JobId>. | ||
| 418 | |||
| 419 | |||
| 420 | =head2 TranslateText | ||
| 421 | |||
| 422 | =over | ||
| 423 | |||
| 424 | =item SourceLanguageCode => Str | ||
| 425 | |||
| 426 | =item TargetLanguageCode => Str | ||
| 427 | |||
| 428 | =item Text => Str | ||
| 429 | |||
| 430 | =item [TerminologyNames => ArrayRef[Str|Undef]] | ||
| 431 | |||
| 432 | |||
| 433 | =back | ||
| 434 | |||
| 435 | Each argument is described in detail in: L<Paws::Translate::TranslateText> | ||
| 436 | |||
| 437 | Returns: a L<Paws::Translate::TranslateTextResponse> instance | ||
| 438 | |||
| 439 | Translates input text from the source language to the target language. | ||
| 440 | For a list of available languages and language codes, see | ||
| 441 | what-is-languages. | ||
| 442 | |||
| 443 | |||
| 444 | =head2 UpdateParallelData | ||
| 445 | |||
| 446 | =over | ||
| 447 | |||
| 448 | =item ClientToken => Str | ||
| 449 | |||
| 450 | =item Name => Str | ||
| 451 | |||
| 452 | =item ParallelDataConfig => L<Paws::Translate::ParallelDataConfig> | ||
| 453 | |||
| 454 | =item [Description => Str] | ||
| 455 | |||
| 456 | |||
| 457 | =back | ||
| 458 | |||
| 459 | Each argument is described in detail in: L<Paws::Translate::UpdateParallelData> | ||
| 460 | |||
| 461 | Returns: a L<Paws::Translate::UpdateParallelDataResponse> instance | ||
| 462 | |||
| 463 | Updates a previously created parallel data resource by importing a new | ||
| 464 | input file from Amazon S3. | ||
| 465 | |||
| 466 | |||
| 467 | |||
| 468 | |||
| 469 | =head1 PAGINATORS | ||
| 470 | |||
| 471 | Paginator methods are helpers that repetively call methods that return partial results | ||
| 472 | |||
| 473 | =head2 ListAllTerminologies(sub { },[MaxResults => Int, NextToken => Str]) | ||
| 474 | |||
| 475 | =head2 ListAllTerminologies([MaxResults => Int, NextToken => Str]) | ||
| 476 | |||
| 477 | |||
| 478 | If passed a sub as first parameter, it will call the sub for each element found in : | ||
| 479 | |||
| 480 | - TerminologyPropertiesList, passing the object as the first parameter, and the string 'TerminologyPropertiesList' as the second parameter | ||
| 481 | |||
| 482 | If not, it will return a a L<Paws::Translate::ListTerminologiesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory. | ||
| 483 | |||
| 484 | |||
| 485 | |||
| 486 | |||
| 487 | |||
| 488 | =head1 SEE ALSO | ||
| 489 | |||
| 490 | This service class forms part of L<Paws> | ||
| 491 | |||
| 492 | =head1 BUGS and CONTRIBUTIONS | ||
| 493 | |||
| 494 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 495 | |||
| 496 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 497 | |||
| 498 | =cut | ||
| 499 |