Class: Google::Apis::TexttospeechV1::SafetySetting
- Inherits:
-
Object
- Object
- Google::Apis::TexttospeechV1::SafetySetting
- 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
-
#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.
473 474 475 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 473 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
466 467 468 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 466 def category @category end |
#threshold ⇒ String
The harm block threshold for the safety setting.
Corresponds to the JSON property threshold
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 |