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

Classes: Policy, ReferenceSetMatch

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

#initializeObject



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

def initialize: (

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

#policiesArray<SafetyKit::Models::ContentCreateResponse::Policy>

Per-policy results for the submitted content.



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

required :policies,
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Models::ContentCreateResponse::Policy] }

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

Reference set matches found for the submitted content.



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

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

#user_idString

The user_id from the request.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :user_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {