libZSservicesZSamazonka-translateZSamazonka-translate
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Translate.TranslateText

Description

Translates input text from the source language to the target language. For a list of available languages and language codes, see what-is-languages.

Synopsis

Creating a Request

data TranslateText Source #

See: newTranslateText smart constructor.

Constructors

TranslateText' 

Fields

  • terminologyNames :: Maybe [Text]

    The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at most in a TranslateText request. Terminology lists can contain a maximum of 256 terms.

  • text :: Text

    The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.

  • sourceLanguageCode :: Text

    The language code for the language of the source text. The language must be a language supported by Amazon Translate. For a list of language codes, see what-is-languages.

    To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.

  • targetLanguageCode :: Text

    The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.

Instances

Instances details
Eq TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Read TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Show TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Generic TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Associated Types

type Rep TranslateText :: Type -> Type #

NFData TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Methods

rnf :: TranslateText -> () #

Hashable TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

ToJSON TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

AWSRequest TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Associated Types

type AWSResponse TranslateText #

ToHeaders TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

ToPath TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

ToQuery TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

type Rep TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

type Rep TranslateText = D1 ('MetaData "TranslateText" "Amazonka.Translate.TranslateText" "libZSservicesZSamazonka-translateZSamazonka-translate" 'False) (C1 ('MetaCons "TranslateText'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "terminologyNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "sourceLanguageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "targetLanguageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse TranslateText Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

newTranslateText Source #

Create a value of TranslateText with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:terminologyNames:TranslateText', translateText_terminologyNames - The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at most in a TranslateText request. Terminology lists can contain a maximum of 256 terms.

$sel:text:TranslateText', translateText_text - The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.

$sel:sourceLanguageCode:TranslateText', translateText_sourceLanguageCode - The language code for the language of the source text. The language must be a language supported by Amazon Translate. For a list of language codes, see what-is-languages.

To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.

$sel:targetLanguageCode:TranslateText', translateText_targetLanguageCode - The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.

Request Lenses

translateText_terminologyNames :: Lens' TranslateText (Maybe [Text]) Source #

The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at most in a TranslateText request. Terminology lists can contain a maximum of 256 terms.

translateText_text :: Lens' TranslateText Text Source #

The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.

translateText_sourceLanguageCode :: Lens' TranslateText Text Source #

The language code for the language of the source text. The language must be a language supported by Amazon Translate. For a list of language codes, see what-is-languages.

To have Amazon Translate determine the source language of your text, you can specify auto in the SourceLanguageCode field. If you specify auto, Amazon Translate will call Amazon Comprehend to determine the source language.

translateText_targetLanguageCode :: Lens' TranslateText Text Source #

The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.

Destructuring the Response

data TranslateTextResponse Source #

See: newTranslateTextResponse smart constructor.

Constructors

TranslateTextResponse' 

Fields

Instances

Instances details
Eq TranslateTextResponse Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Read TranslateTextResponse Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Show TranslateTextResponse Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Generic TranslateTextResponse Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Associated Types

type Rep TranslateTextResponse :: Type -> Type #

NFData TranslateTextResponse Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

Methods

rnf :: TranslateTextResponse -> () #

type Rep TranslateTextResponse Source # 
Instance details

Defined in Amazonka.Translate.TranslateText

type Rep TranslateTextResponse = D1 ('MetaData "TranslateTextResponse" "Amazonka.Translate.TranslateText" "libZSservicesZSamazonka-translateZSamazonka-translate" 'False) (C1 ('MetaCons "TranslateTextResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "appliedTerminologies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AppliedTerminology])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "translatedText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sourceLanguageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "targetLanguageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newTranslateTextResponse Source #

Create a value of TranslateTextResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:appliedTerminologies:TranslateTextResponse', translateTextResponse_appliedTerminologies - The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response.

$sel:httpStatus:TranslateTextResponse', translateTextResponse_httpStatus - The response's http status code.

$sel:translatedText:TranslateTextResponse', translateTextResponse_translatedText - The translated text.

$sel:sourceLanguageCode:TranslateText', translateTextResponse_sourceLanguageCode - The language code for the language of the source text.

$sel:targetLanguageCode:TranslateText', translateTextResponse_targetLanguageCode - The language code for the language of the target text.

Response Lenses

translateTextResponse_appliedTerminologies :: Lens' TranslateTextResponse (Maybe [AppliedTerminology]) Source #

The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response.

translateTextResponse_sourceLanguageCode :: Lens' TranslateTextResponse Text Source #

The language code for the language of the source text.

translateTextResponse_targetLanguageCode :: Lens' TranslateTextResponse Text Source #

The language code for the language of the target text.