Class: Google::Apis::TranslateV3::GlossaryTerm

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

Represents a single glossary term

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GlossaryTerm

Returns a new instance of GlossaryTerm.



842
843
844
# File 'lib/google/apis/translate_v3/classes.rb', line 842

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

Instance Attribute Details

#language_codeString

The language for this glossary term. Corresponds to the JSON property languageCode

Returns:

  • (String)


835
836
837
# File 'lib/google/apis/translate_v3/classes.rb', line 835

def language_code
  @language_code
end

#textString

The text for the glossary term. Corresponds to the JSON property text

Returns:

  • (String)


840
841
842
# File 'lib/google/apis/translate_v3/classes.rb', line 840

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



847
848
849
850
# File 'lib/google/apis/translate_v3/classes.rb', line 847

def update!(**args)
  @language_code = args[:language_code] if args.key?(:language_code)
  @text = args[:text] if args.key?(:text)
end