Class: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match
- Defined in:
- lib/moderation_api/models/webhook_event.rb
Defined Under Namespace
Classes: Signals
Instance Attribute Summary collapse
- #entity_type ⇒ String?
- #mask ⇒ String?
-
#match ⇒ String
The matched substring.
-
#probability ⇒ Float
Match confidence between 0 and 1.
- #reasons ⇒ Array<String>?
- #signals ⇒ ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals?
-
#span ⇒ Array<Object>
- start, end
-
character offsets in the source text.
Instance Method Summary collapse
- #initialize(match:, probability:, span:, entity_type: nil, mask: nil, reasons: nil, signals: nil) ⇒ Object constructor
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, 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
#initialize(match:, probability:, span:, entity_type: nil, mask: nil, reasons: nil, signals: nil) ⇒ Object
5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5322 class Match < ModerationAPI::Internal::Type::BaseModel # @!attribute match # The matched substring # # @return [String] required :match, String # @!attribute probability # Match confidence between 0 and 1 # # @return [Float] required :probability, Float # @!attribute span # [start, end] character offsets in the source text # # @return [Array<Object>] required :span, ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Internal::Type::Unknown] # @!attribute entity_type # # @return [String, nil] optional :entity_type, String # @!attribute mask # # @return [String, nil] optional :mask, String, nil?: true # @!attribute reasons # # @return [Array<String>, nil] optional :reasons, ModerationAPI::Internal::Type::ArrayOf[String] # @!attribute signals # # @return [ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals, nil] optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals } # @!method initialize(match:, probability:, span:, entity_type: nil, mask: nil, reasons: nil, signals: nil) # @param match [String] The matched substring # # @param probability [Float] Match confidence between 0 and 1 # # @param span [Array<Object>] [start, end] character offsets in the source text # # @param entity_type [String] # # @param mask [String, nil] # # @param reasons [Array<String>] # # @param signals [ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals] # @see ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match#signals class Signals < ModerationAPI::Internal::Type::BaseModel # @!attribute bot_protection # # @return [Boolean, nil] required :bot_protection, ModerationAPI::Internal::Type::Boolean, nil?: true # @!attribute brand_impersonation # # @return [ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals::BrandImpersonation, nil] required :brand_impersonation, -> { ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals::BrandImpersonation }, nil?: true # @!attribute domain_age_days # # @return [Float, nil] required :domain_age_days, Float, nil?: true # @!attribute final_url # # @return [String, nil] required :final_url, String, nil?: true # @!attribute has_email_setup # # @return [Boolean, nil] required :has_email_setup, ModerationAPI::Internal::Type::Boolean, nil?: true # @!attribute has_suspicious_characters # # @return [Boolean] required :has_suspicious_characters, ModerationAPI::Internal::Type::Boolean # @!attribute is_link_shortener # # @return [Boolean] required :is_link_shortener, ModerationAPI::Internal::Type::Boolean # @!attribute is_reported # # @return [Boolean] required :is_reported, ModerationAPI::Internal::Type::Boolean # @!attribute redirect_count # # @return [Float, nil] required :redirect_count, Float, nil?: true # @!method initialize(bot_protection:, brand_impersonation:, domain_age_days:, final_url:, has_email_setup:, has_suspicious_characters:, is_link_shortener:, is_reported:, redirect_count:) # @param bot_protection [Boolean, nil] # @param brand_impersonation [ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals::BrandImpersonation, nil] # @param domain_age_days [Float, nil] # @param final_url [String, nil] # @param has_email_setup [Boolean, nil] # @param has_suspicious_characters [Boolean] # @param is_link_shortener [Boolean] # @param is_reported [Boolean] # @param redirect_count [Float, nil] # @see ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals#brand_impersonation class BrandImpersonation < ModerationAPI::Internal::Type::BaseModel # @!attribute brand # # @return [String] required :brand, String # @!attribute method_ # # @return [String] required :method_, String, api_name: :method # @!method initialize(brand:, method_:) # @param brand [String] # @param method_ [String] end end end |
Instance Attribute Details
#entity_type ⇒ String?
5344 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5344 optional :entity_type, String |
#mask ⇒ String?
5349 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5349 optional :mask, String, nil?: true |
#match ⇒ String
The matched substring
5327 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5327 required :match, String |
#probability ⇒ Float
Match confidence between 0 and 1
5333 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5333 required :probability, Float |
#reasons ⇒ Array<String>?
5354 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5354 optional :reasons, ModerationAPI::Internal::Type::ArrayOf[String] |
#signals ⇒ ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals?
5359 5360 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5359 optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Label::Match::Signals } |
#span ⇒ Array<Object>
- start, end
-
character offsets in the source text
5339 |
# File 'lib/moderation_api/models/webhook_event.rb', line 5339 required :span, ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Internal::Type::Unknown] |