Moderation class
Model holding data for a message moderated by Moderation V1-V2.
- Annotations
-
- @JsonSerializable()
Constructors
-
Moderation.new({required ModerationAction action, required String originalText, List<
String> ? textHarms, List<String> ? imageHarms, String? blocklistMatched, String? semanticFilterMatched, bool platformCircumvented = false}) -
Model holding data for a message moderated by Moderation V1-V2.
const
-
Moderation.fromJson(Map<
String, dynamic> json) -
Create a new instance from a json
factory
Properties
- action → ModerationAction
-
The action taken by the moderation system.
final
- blocklistMatched → String?
-
The blocklist matched by the message.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
imageHarms
→ List<
String> ? -
The list of harmful images detected in the message.
final
- originalText → String
-
The original text of the message.
final
- platformCircumvented → bool
-
true/false if the message triggered the platform circumvention model.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticFilterMatched → String?
-
The semantic filter matched by the message.
final
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited -
textHarms
→ List<
String> ? -
The list of harmful text detected in the message.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serialize to json
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited