Cloud Translation V3 API - Class Google::Cloud::Translate::V3::BatchTranslateTextRequest (v0.9.0)

Reference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::BatchTranslateTextRequest.

The batch translation request.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#glossaries

def glossaries() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}) — Optional. Glossaries to be applied for translation. It's keyed by target language code.

#glossaries=

def glossaries=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}
Parameter
  • value (::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}) — Optional. Glossaries to be applied for translation. It's keyed by target language code.
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig}) — Optional. Glossaries to be applied for translation. It's keyed by target language code.

#input_configs

def input_configs() -> ::Array<::Google::Cloud::Translate::V3::InputConfig>
Returns
  • (::Array<::Google::Cloud::Translate::V3::InputConfig>) — 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.

#input_configs=

def input_configs=(value) -> ::Array<::Google::Cloud::Translate::V3::InputConfig>
Parameter
  • value (::Array<::Google::Cloud::Translate::V3::InputConfig>) — 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.
Returns
  • (::Array<::Google::Cloud::Translate::V3::InputConfig>) — 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

def labels() -> ::Google::Protobuf::Map{::String => ::String}
Returns
  • (::Google::Protobuf::Map{::String => ::String}) — 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.

#labels=

def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}
Parameter
  • value (::Google::Protobuf::Map{::String => ::String}) — 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.

Returns
  • (::Google::Protobuf::Map{::String => ::String}) — 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

def models() -> ::Google::Protobuf::Map{::String => ::String}
Returns
  • (::Google::Protobuf::Map{::String => ::String}) — 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.

#models=

def models=(value) -> ::Google::Protobuf::Map{::String => ::String}
Parameter
  • value (::Google::Protobuf::Map{::String => ::String}) — 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.

Returns
  • (::Google::Protobuf::Map{::String => ::String}) — 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.

#output_config

def output_config() -> ::Google::Cloud::Translate::V3::OutputConfig
Returns

#output_config=

def output_config=(value) -> ::Google::Cloud::Translate::V3::OutputConfig
Parameter
Returns

#parent

def parent() -> ::String
Returns
  • (::String) — Required. Location to make a call. Must refer to a caller's project.

    Format: projects/{project-number-or-id}/locations/{location-id}.

    The global location is not supported for batch translation.

    Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

#parent=

def parent=(value) -> ::String
Parameter
  • value (::String) — Required. Location to make a call. Must refer to a caller's project.

    Format: projects/{project-number-or-id}/locations/{location-id}.

    The global location is not supported for batch translation.

    Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

Returns
  • (::String) — Required. Location to make a call. Must refer to a caller's project.

    Format: projects/{project-number-or-id}/locations/{location-id}.

    The global location is not supported for batch translation.

    Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

#source_language_code

def source_language_code() -> ::String
Returns
  • (::String) — Required. Source language code.

#source_language_code=

def source_language_code=(value) -> ::String
Parameter
  • value (::String) — Required. Source language code.
Returns
  • (::String) — Required. Source language code.

#target_language_codes

def target_language_codes() -> ::Array<::String>
Returns
  • (::Array<::String>) — Required. Specify up to 10 language codes here.

#target_language_codes=

def target_language_codes=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Required. Specify up to 10 language codes here.
Returns
  • (::Array<::String>) — Required. Specify up to 10 language codes here.