Class: SafetyKit::Models::ContentCreateResponse::Label::UnionMember1

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, Label, 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:, set_id:, type:) ⇒ Object

Parameters:



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

Instance Attribute Details

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

Whether the submitted content matches the label.

Parameters:

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

Returns:



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

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

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

Escalation outcome for this label.

Parameters:

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

Returns:



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

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

#labelSymbol, SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Label

Parameters:

  • value (SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::label)

Returns:



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

required :label, enum: -> { SafetyKit::Models::ContentCreateResponse::Label::UnionMember1::Label }

#scoreFloat

Similarity between the submitted content and the matched entry.

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :score, Float

#set_idString

Identifier of the matched reference set.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :set_id, String

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

Parameters:

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

Returns:



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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {