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
6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 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 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6388 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?
6410 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6410 optional :entity_type, String |
#mask ⇒ String?
6415 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6415 optional :mask, String, nil?: true |
#match ⇒ String
The matched substring
6393 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6393 required :match, String |
#probability ⇒ Float
Match confidence between 0 and 1
6399 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6399 required :probability, Float |
#reasons ⇒ Array<String>?
6420 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6420 optional :reasons, ModerationAPI::Internal::Type::ArrayOf[String] |
#signals ⇒ ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label::Match::Signals?
6425 6426 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6425 optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label::Match::Signals } |
#span ⇒ Array<Object>
- start, end
-
character offsets in the source text
6405 |
# File 'lib/moderation_api/models/webhook_event.rb', line 6405 required :span, ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Internal::Type::Unknown] |