Reference documentation and code samples for the Cloud Translation V3 API class Google::Cloud::Translate::V3::Translation.
A single translation response.
Inherits
- Object
 
Extended By
- Google::Protobuf::MessageExts::ClassMethods
 
Includes
- Google::Protobuf::MessageExts
 
Methods
#detected_language_code
def detected_language_code() -> ::String- (::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.
 
#detected_language_code=
def detected_language_code=(value) -> ::String- value (::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.
 
- (::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.
 
#glossary_config
def glossary_config() -> ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig- 
        (::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig) — The 
glossary_configused for this translation. 
#glossary_config=
def glossary_config=(value) -> ::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig- 
        value (::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig) — The 
glossary_configused for this translation. 
- 
        (::Google::Cloud::Translate::V3::TranslateTextGlossaryConfig) — The 
glossary_configused for this translation. 
#model
def model() -> ::String- 
        (::String) — Only present when 
modelis present in the request.modelhere is normalized to have project number.For example: If the
modelrequested in TranslationTextRequest isprojects/{project-id}/locations/{location-id}/models/general/nmtthenmodelhere would be normalized toprojects/{project-number}/locations/{location-id}/models/general/nmt. 
#model=
def model=(value) -> ::String- 
        value (::String) — Only present when 
modelis present in the request.modelhere is normalized to have project number.For example: If the
modelrequested in TranslationTextRequest isprojects/{project-id}/locations/{location-id}/models/general/nmtthenmodelhere would be normalized toprojects/{project-number}/locations/{location-id}/models/general/nmt. 
- 
        (::String) — Only present when 
modelis present in the request.modelhere is normalized to have project number.For example: If the
modelrequested in TranslationTextRequest isprojects/{project-id}/locations/{location-id}/models/general/nmtthenmodelhere would be normalized toprojects/{project-number}/locations/{location-id}/models/general/nmt. 
#translated_text
def translated_text() -> ::String- (::String) — Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.
 
#translated_text=
def translated_text=(value) -> ::String- value (::String) — Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.
 
- (::String) — Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.