Class: Google::Apis::TexttospeechV1::SafetySetting

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

Overview

Safety setting for a single harm category.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SafetySetting

Returns a new instance of SafetySetting.



473
474
475
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 473

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

Instance Attribute Details

#categoryString

The harm category to apply the safety setting to. Corresponds to the JSON property category

Returns:

  • (String)


466
467
468
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 466

def category
  @category
end

#thresholdString

The harm block threshold for the safety setting. Corresponds to the JSON property threshold

Returns:

  • (String)


471
472
473
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 471

def threshold
  @threshold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



478
479
480
481
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 478

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