View Source GoogleApi.Translate.V3.Model.BatchTranslateTextRequest (google_api_translate v0.21.0)

The batch translation request.

Attributes

  • glossaries (type: %{optional(String.t) => GoogleApi.Translate.V3.Model.TranslateTextGlossaryConfig.t}, default: nil) - Optional. Glossaries to be applied for translation. It's keyed by target language code.
  • inputConfigs (type: list(GoogleApi.Translate.V3.Model.InputConfig.t), default: nil) - Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
  • labels (type: map(), default: nil) - Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
  • models (type: map(), default: nil) - Optional. The models to use for translation. Map's key is target language code. Map's value is model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: projects/{project-number-or-id}/locations/{location-id}/models/{model-id} - General (built-in) models: projects/{project-number-or-id}/locations/{location-id}/models/general/nmt, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.
  • outputConfig (type: GoogleApi.Translate.V3.Model.OutputConfig.t, default: nil) - Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs.
  • sourceLanguageCode (type: String.t, default: nil) - Required. Source language code.
  • targetLanguageCodes (type: list(String.t), default: nil) - Required. Specify up to 10 language codes here.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.Translate.V3.Model.BatchTranslateTextRequest{
  glossaries:
    %{
      optional(String.t()) =>
        GoogleApi.Translate.V3.Model.TranslateTextGlossaryConfig.t()
    }
    | nil,
  inputConfigs: [GoogleApi.Translate.V3.Model.InputConfig.t()] | nil,
  labels: map() | nil,
  models: map() | nil,
  outputConfig: GoogleApi.Translate.V3.Model.OutputConfig.t() | nil,
  sourceLanguageCode: String.t() | nil,
  targetLanguageCodes: [String.t()] | nil
}

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.