Class: Google::Apis::TranslateV3beta1::TranslateTextGlossaryConfig

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

Overview

Configures which glossary should be used for a specific target language, and defines options for applying that glossary.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TranslateTextGlossaryConfig

Returns a new instance of TranslateTextGlossaryConfig.



1227
1228
1229
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 1227

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

Instance Attribute Details

#contextual_translation_enabledBoolean Also known as: contextual_translation_enabled?

Optional. If set to true, the glossary will be used for contextual translation. Corresponds to the JSON property contextualTranslationEnabled

Returns:

  • (Boolean)


1211
1212
1213
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 1211

def contextual_translation_enabled
  @contextual_translation_enabled
end

#glossaryString

Required. Specifies the glossary used for this translation. Use this format: projects//locations//glossaries/* Corresponds to the JSON property glossary

Returns:

  • (String)


1218
1219
1220
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 1218

def glossary
  @glossary
end

#ignore_caseBoolean Also known as: ignore_case?

Optional. Indicates match is case-insensitive. Default value is false if missing. Corresponds to the JSON property ignoreCase

Returns:

  • (Boolean)


1224
1225
1226
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 1224

def ignore_case
  @ignore_case
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1232
1233
1234
1235
1236
# File 'lib/google/apis/translate_v3beta1/classes.rb', line 1232

def update!(**args)
  @contextual_translation_enabled = args[:contextual_translation_enabled] if args.key?(:contextual_translation_enabled)
  @glossary = args[:glossary] if args.key?(:glossary)
  @ignore_case = args[:ignore_case] if args.key?(:ignore_case)
end