Class: Google::Apis::TranslateV3::RefinementEntry

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 single refinement entry for RefineTextRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RefinementEntry

Returns a new instance of RefinementEntry.



2012
2013
2014
# File 'lib/google/apis/translate_v3/classes.rb', line 2012

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

Instance Attribute Details

#original_translationString

Required. The original translation of the source text. Corresponds to the JSON property originalTranslation

Returns:

  • (String)


2005
2006
2007
# File 'lib/google/apis/translate_v3/classes.rb', line 2005

def original_translation
  @original_translation
end

#source_textString

Required. The source text to be refined. Corresponds to the JSON property sourceText

Returns:

  • (String)


2010
2011
2012
# File 'lib/google/apis/translate_v3/classes.rb', line 2010

def source_text
  @source_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2017
2018
2019
2020
# File 'lib/google/apis/translate_v3/classes.rb', line 2017

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