CreateModerationRequest class abstract
Request object for the Create moderation endpoint.
- Available extensions
- Annotations
-
- @freezed
Constructors
- CreateModerationRequest.new({@_ModerationModelConverter() @JsonKey(includeIfNull: false) @Default(ModerationModelString('omni-moderation-latest')) ModerationModel? model, @_ModerationInputConverter() required ModerationInput input})
-
Factory constructor for CreateModerationRequest
constfactory
-
CreateModerationRequest.fromJson(Map<
String, dynamic> json) -
Object construction from a JSON representation
factory
Properties
-
copyWith
→ $CreateModerationRequestCopyWith<
CreateModerationRequest> -
Create a copy of CreateModerationRequest
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- input → ModerationInput
-
Input (or inputs) to classify. Can be a single string, an array of strings, or
an array of multi-modal input objects similar to other models.
no setterinherited
- model → ModerationModel?
-
The content moderation model you would like to use. Learn more in
the moderation guide, and learn about
available models here.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_CreateModerationRequest value)) → TResult -
Available on CreateModerationRequest, provided by the CreateModerationRequestPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_CreateModerationRequest value)?) → TResult? -
Available on CreateModerationRequest, provided by the CreateModerationRequestPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_CreateModerationRequest value)?, {required TResult orElse()}) → TResult -
Available on CreateModerationRequest, provided by the CreateModerationRequestPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(ModerationModel? model, ModerationInput input)?, {required TResult orElse()}) → TResult -
Available on CreateModerationRequest, provided by the CreateModerationRequestPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this CreateModerationRequest to a JSON map.
inherited
-
toMap(
) → Map< String, dynamic> - Map representation of object (not serialized)
-
toString(
) → String -
A string representation of this object.
inherited
-
validateSchema(
) → String? - Perform validations on the schema property values
-
when<
TResult extends Object?> (TResult $default(ModerationModel? model, ModerationInput input)) → TResult -
Available on CreateModerationRequest, provided by the CreateModerationRequestPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(ModerationModel? model, ModerationInput input)?) → TResult? -
Available on CreateModerationRequest, provided by the CreateModerationRequestPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
propertyNames
→ const List<
String> - List of all property names of schema