Class: Google::Cloud::Translate::V3::Translation

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/translate/v3/translation_service.rb

Overview

A single translation response.

Instance Attribute Summary collapse

Instance Attribute Details

#detected_language_code::String

Returns The ISO-639 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.

Returns:

  • (::String)

    The ISO-639 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.



166
167
168
169
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 166

class Translation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#glossary_config::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig

Returns The glossary_config used for this translation.

Returns:



166
167
168
169
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 166

class Translation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#model::String

Returns 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.

Returns:

  • (::String)

    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.



166
167
168
169
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 166

class Translation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#translated_text::String

Returns Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.

Returns:

  • (::String)

    Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.



166
167
168
169
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 166

class Translation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end