Class: Google::Apis::TranslateV3beta1::Translation
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3beta1::Translation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/translate_v3beta1/classes.rb,
generated/google/apis/translate_v3beta1/representations.rb,
generated/google/apis/translate_v3beta1/representations.rb
Overview
A single translation response.
Instance Attribute Summary collapse
-
#detected_language_code ⇒ String
The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request.
-
#glossary_config ⇒ Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig
Configures which glossary should be used for a specific target language, and defines options for applying that glossary.
-
#model ⇒ String
Only present when
model
is present in the request. -
#translated_text ⇒ String
Text translated into the target language.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Translation
constructor
A new instance of Translation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Translation
Returns a new instance of Translation
863 864 865 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 863 def initialize(**args) update!(**args) end |
Instance Attribute Details
#detected_language_code ⇒ String
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.
Corresponds to the JSON property detectedLanguageCode
844 845 846 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 844 def detected_language_code @detected_language_code end |
#glossary_config ⇒ Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig
Configures which glossary should be used for a specific target language,
and defines options for applying that glossary.
Corresponds to the JSON property glossaryConfig
850 851 852 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 850 def glossary_config @glossary_config end |
#model ⇒ String
Only present when model
is present in the request.
This is same as model
provided in the request.
Corresponds to the JSON property model
856 857 858 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 856 def model @model end |
#translated_text ⇒ String
Text translated into the target language.
Corresponds to the JSON property translatedText
861 862 863 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 861 def translated_text @translated_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
868 869 870 871 872 873 |
# File 'generated/google/apis/translate_v3beta1/classes.rb', line 868 def update!(**args) @detected_language_code = args[:detected_language_code] if args.key?(:detected_language_code) @glossary_config = args[:glossary_config] if args.key?(:glossary_config) @model = args[:model] if args.key?(:model) @translated_text = args[:translated_text] if args.key?(:translated_text) end |