Class: SafetyKit::Models::ContentCreateResponse::Label::UnionMember0

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

Defined Under Namespace

Modules: Decision, Escalation, Type

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(decision:, escalation:, label:, score:, type:) ⇒ Object

Some parameter documentations has been truncated, see SafetyKit::Models::ContentCreateResponse::Label::UnionMember0 for more details.

Parameters:



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

Instance Attribute Details

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

Whether the submitted content matches the label.

Parameters:

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

Returns:



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

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

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

Escalation outcome for this label.

Parameters:

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

Returns:



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

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

#labelString

Label identifier.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :label, String

#scoreFloat?

Classifier score between 0 and 1. Higher means more likely matching. Null when no classifier scored the label.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :score, Float, nil?: true

#typeSymbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Type

Parameters:

  • value (SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::type_)

Returns:



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

required :type, enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember0::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {