Class: ModerationAPI::Models::ContentSubmitParams::Policy::FaceDetection

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

Defined Under Namespace

Modules: Comparator

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

#initialize(flag:, comparator: nil, count: nil, threshold: nil, id: :face_detection) ⇒ Object

Some parameter documentations has been truncated, see ModerationAPI::Models::ContentSubmitParams::Policy::FaceDetection for more details.

Parameters:

  • flag (Boolean)
  • comparator (Symbol, ModerationAPI::Models::ContentSubmitParams::Policy::FaceDetection::Comparator) (defaults to: nil)

    Flag images that contain “at least” or “fewer than” the configured number of fac

  • count (Integer) (defaults to: nil)

    Number of faces the comparator applies to. Defaults to 1, so the default rule fl

  • threshold (Float) (defaults to: nil)
  • id (Symbol, :face_detection) (defaults to: :face_detection)


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

Instance Attribute Details

#comparatorSymbol, ...

Flag images that contain “at least” or “fewer than” the configured number of faces. Defaults to at_least.



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

optional :comparator, enum: -> { ModerationAPI::ContentSubmitParams::Policy::FaceDetection::Comparator }

#countInteger?

Number of faces the comparator applies to. Defaults to 1, so the default rule flags any image containing a face.

Returns:

  • (Integer, nil)


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

optional :count, Integer

#flagBoolean

Returns:

  • (Boolean)


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

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

#idSymbol, :face_detection

Returns:

  • (Symbol, :face_detection)


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

required :id, const: :face_detection

#thresholdFloat?

Returns:

  • (Float, nil)


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

optional :threshold, Float