« blib/lib/Paws/Translate/TextTranslationJobProperties.pm
↑ Summary
blib/lib/Paws/Translate/TranslateTextResponse.pm »
| 1 | |||
| 2 | package Paws::Translate::TranslateText; | ||
| 3 | use Moose; | ||
| 4 | has SourceLanguageCode => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has TargetLanguageCode => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | has TerminologyNames => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 7 | has Text => (is => 'ro', isa => 'Str', required => 1); | ||
| 8 | |||
| 9 | use MooseX::ClassAttribute; | ||
| 10 | |||
| 11 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'TranslateText'); | ||
| 12 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Translate::TranslateTextResponse'); | ||
| 13 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 14 | 1; | ||
| 15 | |||
| 16 | ### main pod documentation begin ### | ||
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | Paws::Translate::TranslateText - Arguments for method TranslateText on L<Paws::Translate> | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | This class represents the parameters used for calling the method TranslateText on the | ||
| 25 | L<Amazon Translate|Paws::Translate> service. Use the attributes of this class | ||
| 26 | as arguments to method TranslateText. | ||
| 27 | |||
| 28 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to TranslateText. | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | my $translate = Paws->service('Translate'); | ||
| 33 | my $TranslateTextResponse = $translate->TranslateText( | ||
| 34 | SourceLanguageCode => 'MyLanguageCodeString', | ||
| 35 | TargetLanguageCode => 'MyLanguageCodeString', | ||
| 36 | Text => 'MyBoundedLengthString', | ||
| 37 | TerminologyNames => [ | ||
| 38 | 'MyResourceName', ... # min: 1, max: 256 | ||
| 39 | ], # OPTIONAL | ||
| 40 | ); | ||
| 41 | |||
| 42 | # Results: | ||
| 43 | my $AppliedTerminologies = $TranslateTextResponse->AppliedTerminologies; | ||
| 44 | my $SourceLanguageCode = $TranslateTextResponse->SourceLanguageCode; | ||
| 45 | my $TargetLanguageCode = $TranslateTextResponse->TargetLanguageCode; | ||
| 46 | my $TranslatedText = $TranslateTextResponse->TranslatedText; | ||
| 47 | |||
| 48 | # Returns a L<Paws::Translate::TranslateTextResponse> object. | ||
| 49 | |||
| 50 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 51 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/translate/TranslateText> | ||
| 52 | |||
| 53 | =head1 ATTRIBUTES | ||
| 54 | |||
| 55 | |||
| 56 | =head2 B<REQUIRED> SourceLanguageCode => Str | ||
| 57 | |||
| 58 | The language code for the language of the source text. The language | ||
| 59 | must be a language supported by Amazon Translate. For a list of | ||
| 60 | language codes, see what-is-languages. | ||
| 61 | |||
| 62 | To have Amazon Translate determine the source language of your text, | ||
| 63 | you can specify C<auto> in the C<SourceLanguageCode> field. If you | ||
| 64 | specify C<auto>, Amazon Translate will call Amazon Comprehend | ||
| 65 | (https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html) | ||
| 66 | to determine the source language. | ||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | =head2 B<REQUIRED> TargetLanguageCode => Str | ||
| 71 | |||
| 72 | The language code requested for the language of the target text. The | ||
| 73 | language must be a language supported by Amazon Translate. | ||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | =head2 TerminologyNames => ArrayRef[Str|Undef] | ||
| 78 | |||
| 79 | The name of the terminology list file to be used in the TranslateText | ||
| 80 | request. You can use 1 terminology list at most in a C<TranslateText> | ||
| 81 | request. Terminology lists can contain a maximum of 256 terms. | ||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | =head2 B<REQUIRED> Text => Str | ||
| 86 | |||
| 87 | The text to translate. The text string can be a maximum of 5,000 bytes | ||
| 88 | long. Depending on your character set, this may be fewer than 5,000 | ||
| 89 | characters. | ||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | =head1 SEE ALSO | ||
| 95 | |||
| 96 | This class forms part of L<Paws>, documenting arguments for method TranslateText in L<Paws::Translate> | ||
| 97 | |||
| 98 | =head1 BUGS and CONTRIBUTIONS | ||
| 99 | |||
| 100 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 101 | |||
| 102 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 103 | |||
| 104 | =cut | ||
| 105 |