Class: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moderation_api/models/webhook_event.rb

Defined Under Namespace

Classes: Match

Instance Attribute Summary collapse

Method Summary

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from ModerationAPI::Internal::Type::BaseModel

Instance Attribute Details

#flaggedBoolean?

Whether this label crossed its flagging threshold

Returns:

  • (Boolean, nil)


6027
# File 'lib/moderation_api/models/webhook_event.rb', line 6027

optional :flagged, ModerationAPI::Internal::Type::Boolean

#labelString

The label name

Returns:

  • (String)


6015
# File 'lib/moderation_api/models/webhook_event.rb', line 6015

required :label, String

#manualBoolean?

True if the label was applied manually by a moderator

Returns:

  • (Boolean, nil)


6033
# File 'lib/moderation_api/models/webhook_event.rb', line 6033

optional :manual, ModerationAPI::Internal::Type::Boolean

#matchesArray<ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label::Match>?



6038
6039
# File 'lib/moderation_api/models/webhook_event.rb', line 6038

optional :matches,
-> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label::Match] }

#scoreFloat

Confidence score between 0 and 1

Returns:

  • (Float)


6021
# File 'lib/moderation_api/models/webhook_event.rb', line 6021

required :score, Float