Class: SafetyKit::Models::ContentCreateResponse

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

Overview

See Also:

  • SafetyKit::Resources::Content#create

Defined Under Namespace

Modules: Decision, Escalation Classes: ReferenceSetMatch, Score

Instance Attribute Summary collapse

Class Method 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(set_id:, similarity:) ⇒ Object

Reference set match found for the submitted content.

Parameters:

  • set_id (String)

    Identifier of the matched reference set.

  • similarity (Float)

    Similarity between the submitted content and the matched reference set entry.



# File 'lib/safety_kit/models/content_create_response.rb', line 55

Instance Attribute Details

#content_idString

SafetyKit identifier for the classified content.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/safety_kit/models/content_create_response.rb', line 11

required :content_id, String

#decisionSymbol, SafetyKit::Models::ContentCreateResponse::Decision

SafetyKit's decision for the submitted content: approve (no violation found), reject (violating), or review (needs human review).

Parameters:

  • value (SafetyKit::Models::ContentCreateResponse::decision)

Returns:



18
# File 'lib/safety_kit/models/content_create_response.rb', line 18

required :decision, enum: -> { SafetyKit::Models::ContentCreateResponse::Decision }

#entity_idString

The entity_id from the request.

Parameters:

  • value (String)

Returns:

  • (String)


24
# File 'lib/safety_kit/models/content_create_response.rb', line 24

required :entity_id, String

#escalationSymbol, SafetyKit::Models::ContentCreateResponse::Escalation

Escalation outcome for this request: none (the request never entered the escalation band), completed (the escalated verdict is reflected in decision), or timed_out (escalation did not finish in budget, so decision is a provisional review).

Parameters:

  • value (SafetyKit::Models::ContentCreateResponse::escalation)

Returns:



33
# File 'lib/safety_kit/models/content_create_response.rb', line 33

required :escalation, enum: -> { SafetyKit::Models::ContentCreateResponse::Escalation }

#mirroredBoolean

Whether SafetyKit mirrored the submitted content for later review.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


39
# File 'lib/safety_kit/models/content_create_response.rb', line 39

required :mirrored, SafetyKit::Internal::Type::Boolean

#reference_set_matchesArray<SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch>

Reference set matches found for the submitted content.



45
46
# File 'lib/safety_kit/models/content_create_response.rb', line 45

required :reference_set_matches,
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch] }

#scoresArray<SafetyKit::Models::ContentCreateResponse::Score>

Classifier scores produced for the submitted content.



52
53
# File 'lib/safety_kit/models/content_create_response.rb', line 52

required :scores,
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Models::ContentCreateResponse::Score] }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/safety_kit/models/content_create_response.rb', line 86

Instance Method Details

#to_hash{

Returns:

  • ({)


39
# File 'sig/safety_kit/models/content_create_response.rbs', line 39

def to_hash: -> {