Class: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label::Match
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::WebhookEvent::QueueItemAllowed::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::QueueItemAllowed::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
6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6424 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::QueueItemAllowed::Data::Object::Item::Label::Match::Signals, nil] optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemAllowed::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::QueueItemAllowed::Data::Object::Item::Label::Match::Signals] # @see ModerationAPI::Models::WebhookEvent::QueueItemAllowed::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::QueueItemAllowed::Data::Object::Item::Label::Match::Signals::BrandImpersonation, nil] required :brand_impersonation, -> { ModerationAPI::WebhookEvent::QueueItemAllowed::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::QueueItemAllowed::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::QueueItemAllowed::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?
6446 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6446 optional :entity_type, String |
#mask ⇒ String?
6451 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6451 optional :mask, String, nil?: true |
#match ⇒ String
The matched substring
6429 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6429 required :match, String |
#probability ⇒ Float
Match confidence between 0 and 1
6435 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6435 required :probability, Float |
#reasons ⇒ Array<String>?
6456 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6456 optional :reasons, ModerationAPI::Internal::Type::ArrayOf[String] |
#signals ⇒ ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label::Match::Signals?
6461 6462 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6461 optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label::Match::Signals } |
#span ⇒ Array<Object>
- start, end
-
character offsets in the source text
6441 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6441 required :span, ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Internal::Type::Unknown] |