Class: Google::Apis::TexttospeechV1beta1::SafetySetting
- Inherits:
-
Object
- Object
- Google::Apis::TexttospeechV1beta1::SafetySetting
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/texttospeech_v1beta1/classes.rb,
lib/google/apis/texttospeech_v1beta1/representations.rb,
lib/google/apis/texttospeech_v1beta1/representations.rb
Overview
Safety setting for a single harm category.
Instance Attribute Summary collapse
-
#category ⇒ String
The harm category to apply the safety setting to.
-
#threshold ⇒ String
The harm block threshold for the safety setting.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SafetySetting
constructor
A new instance of SafetySetting.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SafetySetting
Returns a new instance of SafetySetting.
444 445 446 |
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 444 def initialize(**args) update!(**args) end |
Instance Attribute Details
#category ⇒ String
The harm category to apply the safety setting to.
Corresponds to the JSON property category
437 438 439 |
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 437 def category @category end |
#threshold ⇒ String
The harm block threshold for the safety setting.
Corresponds to the JSON property threshold
442 443 444 |
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 442 def threshold @threshold end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
449 450 451 452 |
# File 'lib/google/apis/texttospeech_v1beta1/classes.rb', line 449 def update!(**args) @category = args[:category] if args.key?(:category) @threshold = args[:threshold] if args.key?(:threshold) end |