Class: Google::Apis::TranslateV3::TranslateDocumentResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/translate_v3/classes.rb,
lib/google/apis/translate_v3/representations.rb,
lib/google/apis/translate_v3/representations.rb

Overview

A translated document response message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TranslateDocumentResponse

Returns a new instance of TranslateDocumentResponse.



1625
1626
1627
# File 'lib/google/apis/translate_v3/classes.rb', line 1625

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#document_translationGoogle::Apis::TranslateV3::DocumentTranslation

A translated document message. Corresponds to the JSON property documentTranslation



1603
1604
1605
# File 'lib/google/apis/translate_v3/classes.rb', line 1603

def document_translation
  @document_translation
end

#glossary_configGoogle::Apis::TranslateV3::TranslateTextGlossaryConfig

Configures which glossary is used for a specific target language and defines options for applying that glossary. Corresponds to the JSON property glossaryConfig



1609
1610
1611
# File 'lib/google/apis/translate_v3/classes.rb', line 1609

def glossary_config
  @glossary_config
end

#glossary_document_translationGoogle::Apis::TranslateV3::DocumentTranslation

A translated document message. Corresponds to the JSON property glossaryDocumentTranslation



1614
1615
1616
# File 'lib/google/apis/translate_v3/classes.rb', line 1614

def glossary_document_translation
  @glossary_document_translation
end

#modelString

Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest 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. Corresponds to the JSON property model

Returns:

  • (String)


1623
1624
1625
# File 'lib/google/apis/translate_v3/classes.rb', line 1623

def model
  @model
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1630
1631
1632
1633
1634
1635
# File 'lib/google/apis/translate_v3/classes.rb', line 1630

def update!(**args)
  @document_translation = args[:document_translation] if args.key?(:document_translation)
  @glossary_config = args[:glossary_config] if args.key?(:glossary_config)
  @glossary_document_translation = args[:glossary_document_translation] if args.key?(:glossary_document_translation)
  @model = args[:model] if args.key?(:model)
end