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.



170
171
172
173
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 170

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:



170
171
172
173
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 170

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.



170
171
172
173
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 170

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.



170
171
172
173
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 170

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