Moderation constructor

const Moderation({
  1. required bool flagged,
  2. required ModerationCategories categories,
  3. @JsonKey.new(name: 'category_scores') required ModerationCategoriesScores categoryScores,
  4. @JsonKey.new(name: 'category_applied_input_types') required ModerationCategoriesAppliedInputTypes categoryAppliedInputTypes,
})

Factory constructor for Moderation

Implementation

const factory Moderation({
  /// Whether any of the below categories are flagged.
  required bool flagged,

  /// A list of the categories, and whether they are flagged or not.
  required ModerationCategories categories,

  /// A list of the categories along with their scores as predicted by model.
  @JsonKey(name: 'category_scores')
  required ModerationCategoriesScores categoryScores,

  /// A list of the categories along with the input type(s) that the score applies to.
  @JsonKey(name: 'category_applied_input_types')
  required ModerationCategoriesAppliedInputTypes categoryAppliedInputTypes,
}) = _Moderation;