SafetyRating class final

Safety rating for a piece of content.

The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.

Constructors

SafetyRating({required HarmCategory category, required SafetyRating_HarmProbability probability, bool blocked = false})
SafetyRating.fromJson(Object? j)
factory

Properties

blocked → bool
Was this content blocked because of this rating?
final
category → HarmCategory
Required. The category for this rating.
final
hashCode → int
The hash code for this object.
no setterinherited
probability → SafetyRating_HarmProbability
Required. The probability of harm for this content.
final
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Object
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String