Class: Google::Apis::TranslateV3::GlossaryEntry

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 entry in a glossary.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GlossaryEntry

Returns a new instance of GlossaryEntry.



796
797
798
# File 'lib/google/apis/translate_v3/classes.rb', line 796

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

Instance Attribute Details

#descriptionString

Describes the glossary entry. Corresponds to the JSON property description

Returns:

  • (String)


776
777
778
# File 'lib/google/apis/translate_v3/classes.rb', line 776

def description
  @description
end

#nameString

Required. The resource name of the entry. Format: "projects//locations// glossaries//glossaryEntries/" Corresponds to the JSON property name

Returns:

  • (String)


782
783
784
# File 'lib/google/apis/translate_v3/classes.rb', line 782

def name
  @name
end

#terms_pairGoogle::Apis::TranslateV3::GlossaryTermsPair

Represents a single entry for an unidirectional glossary. Corresponds to the JSON property termsPair



787
788
789
# File 'lib/google/apis/translate_v3/classes.rb', line 787

def terms_pair
  @terms_pair
end

#terms_setGoogle::Apis::TranslateV3::GlossaryTermsSet

Represents a single entry for an equivalent term set glossary. This is used for equivalent term sets where each term can be replaced by the other terms in the set. Corresponds to the JSON property termsSet



794
795
796
# File 'lib/google/apis/translate_v3/classes.rb', line 794

def terms_set
  @terms_set
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



801
802
803
804
805
806
# File 'lib/google/apis/translate_v3/classes.rb', line 801

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @terms_pair = args[:terms_pair] if args.key?(:terms_pair)
  @terms_set = args[:terms_set] if args.key?(:terms_set)
end