Class: ModerationAPI::Models::ContentSubmitParams::Policy::Hate

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moderation_api/models/content_submit_params.rb,
sig/moderation_api/models/content_submit_params.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#initializeHate

Returns a new instance of Hate.

Parameters:

  • flag: (Boolean)
  • threshold: (Float)
  • id: (:hate)


461
# File 'sig/moderation_api/models/content_submit_params.rbs', line 461

def initialize: (flag: bool, ?threshold: Float, ?id: :hate) -> void

Instance Attribute Details

#flagBoolean

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


587
# File 'lib/moderation_api/models/content_submit_params.rb', line 587

required :flag, ModerationAPI::Internal::Type::Boolean

#idSymbol, :hate

Parameters:

  • value (:hate)

Returns:

  • (Symbol, :hate)


582
# File 'lib/moderation_api/models/content_submit_params.rb', line 582

required :id, const: :hate

#thresholdFloat?

Parameters:

  • (Float)

Returns:

  • (Float, nil)


592
# File 'lib/moderation_api/models/content_submit_params.rb', line 592

optional :threshold, Float

Instance Method Details

#to_hash{ id: :hate, flag: bool, threshold: Float }

Returns:

  • ({ id: :hate, flag: bool, threshold: Float })


463
# File 'sig/moderation_api/models/content_submit_params.rbs', line 463

def to_hash: -> { id: :hate, flag: bool, threshold: Float }