google_api_translate v0.9.0 GoogleApi.Translate.V3.Model.Translation View Source

A single translation response.

Attributes

  • detectedLanguageCode (type: String.t, default: nil) - The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.

  • glossaryConfig (type: GoogleApi.Translate.V3.Model.TranslateTextGlossaryConfig.t, default: nil) - The glossary_config used for this translation.

  • model (type: String.t, default: nil) - Only present when model is present in the request. model here is normalized to have project number.

    For example: If the model requested in TranslationTextRequest is projects/{project-id}/locations/{location-id}/models/general/nmt then model here would be normalized to projects/{project-number}/locations/{location-id}/models/general/nmt.

  • translatedText (type: String.t, default: nil) - Text translated into the target language.

Link to this section Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Link to this section Types

Link to this type

t()

View Source
t() :: %GoogleApi.Translate.V3.Model.Translation{
  detectedLanguageCode: String.t(),
  glossaryConfig: GoogleApi.Translate.V3.Model.TranslateTextGlossaryConfig.t(),
  model: String.t(),
  translatedText: String.t()
}

Link to this section Functions

Link to this function

decode(value, options)

View Source
decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.