Class: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::Label::Match
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::WebhookEvent::QueueItemAction::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::QueueItemAction::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
4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4271 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::QueueItemAction::Data::Object::Item::Label::Match::Signals, nil] optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemAction::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::QueueItemAction::Data::Object::Item::Label::Match::Signals] # @see ModerationAPI::Models::WebhookEvent::QueueItemAction::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::QueueItemAction::Data::Object::Item::Label::Match::Signals::BrandImpersonation, nil] required :brand_impersonation, -> { ModerationAPI::WebhookEvent::QueueItemAction::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::QueueItemAction::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::QueueItemAction::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?
4293 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4293 optional :entity_type, String |
#mask ⇒ String?
4298 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4298 optional :mask, String, nil?: true |
#match ⇒ String
The matched substring
4276 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4276 required :match, String |
#probability ⇒ Float
Match confidence between 0 and 1
4282 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4282 required :probability, Float |
#reasons ⇒ Array<String>?
4303 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4303 optional :reasons, ModerationAPI::Internal::Type::ArrayOf[String] |
#signals ⇒ ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::Label::Match::Signals?
4308 4309 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4308 optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Label::Match::Signals } |
#span ⇒ Array<Object>
- start, end
-
character offsets in the source text
4288 |
# File 'lib/moderation_api/models/webhook_event.rb', line 4288 required :span, ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Internal::Type::Unknown] |