Class: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match
- Defined in:
- lib/moderation_api/models/webhook_event.rb,
sig/moderation_api/models/webhook_event.rbs
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>?
- #scripts ⇒ Array<String>?
- #signals ⇒ ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match::Signals?
- #skeleton ⇒ String?
-
#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, scripts: nil, signals: nil, skeleton: nil) ⇒ Object constructor
- #to_hash ⇒ {
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, scripts: nil, signals: nil, skeleton: nil) ⇒ Object
2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2927 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 scripts # # @return [Array<String>, nil] optional :scripts, ModerationAPI::Internal::Type::ArrayOf[String] # @!attribute signals # # @return [ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match::Signals, nil] optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match::Signals } # @!attribute skeleton # # @return [String, nil] optional :skeleton, String # @!method initialize(match:, probability:, span:, entity_type: nil, mask: nil, reasons: nil, scripts: nil, signals: nil, skeleton: 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 scripts [Array<String>] # # @param signals [ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match::Signals] # # @param skeleton [String] # @see ModerationAPI::Models::WebhookEvent::QueueItemResolved::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::QueueItemResolved::Data::Object::Item::Label::Match::Signals::BrandImpersonation, nil] required :brand_impersonation, -> { ModerationAPI::WebhookEvent::QueueItemResolved::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::QueueItemResolved::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::QueueItemResolved::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?
2949 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2949 optional :entity_type, String |
#mask ⇒ String?
2954 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2954 optional :mask, String, nil?: true |
#match ⇒ String
The matched substring
2932 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2932 required :match, String |
#probability ⇒ Float
Match confidence between 0 and 1
2938 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2938 required :probability, Float |
#reasons ⇒ Array<String>?
2959 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2959 optional :reasons, ModerationAPI::Internal::Type::ArrayOf[String] |
#scripts ⇒ Array<String>?
2964 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2964 optional :scripts, ModerationAPI::Internal::Type::ArrayOf[String] |
#signals ⇒ ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match::Signals?
2969 2970 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2969 optional :signals, -> { ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Label::Match::Signals } |
#skeleton ⇒ String?
2975 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2975 optional :skeleton, String |
#span ⇒ Array<Object>
[start, end] character offsets in the source text
2944 |
# File 'lib/moderation_api/models/webhook_event.rb', line 2944 required :span, ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Internal::Type::Unknown] |
Instance Method Details
#to_hash ⇒ {
2257 |
# File 'sig/moderation_api/models/webhook_event.rbs', line 2257
def to_hash: -> {
|