Class: Google::Apis::TranslateV3::AdaptiveMtSentence

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

An AdaptiveMt sentence entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdaptiveMtSentence

Returns a new instance of AdaptiveMtSentence.



159
160
161
# File 'lib/google/apis/translate_v3/classes.rb', line 159

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

Instance Attribute Details

#create_timeString

Output only. Timestamp when this sentence was created. Corresponds to the JSON property createTime

Returns:

  • (String)


135
136
137
# File 'lib/google/apis/translate_v3/classes.rb', line 135

def create_time
  @create_time
end

#nameString

Required. The resource name of the file, in form of projects/project-number- or-id/locations/location_id/adaptiveMtDatasets/dataset/adaptiveMtFiles/ file/adaptiveMtSentences/sentence` Corresponds to the JSON propertyname`

Returns:

  • (String)


142
143
144
# File 'lib/google/apis/translate_v3/classes.rb', line 142

def name
  @name
end

#source_sentenceString

Required. The source sentence. Corresponds to the JSON property sourceSentence

Returns:

  • (String)


147
148
149
# File 'lib/google/apis/translate_v3/classes.rb', line 147

def source_sentence
  @source_sentence
end

#target_sentenceString

Required. The target sentence. Corresponds to the JSON property targetSentence

Returns:

  • (String)


152
153
154
# File 'lib/google/apis/translate_v3/classes.rb', line 152

def target_sentence
  @target_sentence
end

#update_timeString

Output only. Timestamp when this sentence was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


157
158
159
# File 'lib/google/apis/translate_v3/classes.rb', line 157

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



164
165
166
167
168
169
170
# File 'lib/google/apis/translate_v3/classes.rb', line 164

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @name = args[:name] if args.key?(:name)
  @source_sentence = args[:source_sentence] if args.key?(:source_sentence)
  @target_sentence = args[:target_sentence] if args.key?(:target_sentence)
  @update_time = args[:update_time] if args.key?(:update_time)
end