Class: SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/safety_kit/models/beta/event_create_params.rb

Defined Under Namespace

Modules: Content, Metadata, SourceType Classes: ResourcesUsed

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(event_name:, labels:, source_id:, source_type:, timestamp:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil, type: :moderation_decision) ⇒ Object

Some parameter documentations has been truncated, see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision for more details.

A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution.

Parameters:



# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3526

Instance Attribute Details

#contentArray<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent>?

User-authored or user-uploaded content parts. Use this for message bodies, bios, listing text, image URLs, and similar content SafetyKit should compare or analyze.



3480
3481
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3480

optional :content,
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content] }

#content_idString?

Your stable identifier for the content involved in this event, such as a message, listing, page, post, profile, or uploaded media item.

Returns:

  • (String, nil)


3488
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3488

optional :content_id, String

#event_nameString

Stable, low-cardinality product action name. Use snake_case and put dynamic values in typed fields, content, resources_used, or metadata.

Returns:

  • (String)


3436
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3436

required :event_name, String

#idempotency_keyString?

Optional caller-provided key used to make retries of this individual event idempotent. Reuse the same key only for retries of the same logical event.

Returns:

  • (String, nil)


3495
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3495

optional :idempotency_key, String

#labelsArray<String>

One or more label categories supplied with the report or moderation decision.

Returns:

  • (Array<String>)


3442
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3442

required :labels, SafetyKit::Internal::Type::ArrayOf[String]

#metadataHash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}?

Non-PII product context for filtering, segmentation, and debugging. Values may be strings, numbers, booleans, or arrays of those scalar values.

Returns:

  • (Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil)


3502
3503
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3502

optional :metadata,
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Metadata] }

#resources_usedArray<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::ResourcesUsed>?

Reusable resources observed during the event. Use this for emails, phone numbers, names, addresses, social handles, URLs, payment identifiers, or similar identifiers.



3511
3512
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3511

optional :resources_used,
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::ResourcesUsed] }

#source_idString

Stable identifier within source_type. Examples: moderator@example.com or 550e8400-e29b-41d4-a716-446655440000 for expert_labeler or human_moderator, automated_review_v2026_06_04 for automation, or <vendor_name>-v2.1 for vendor.

Returns:

  • (String)


3450
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3450

required :source_id, String

#source_typeSymbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::SourceType

Coarse attribution category for the moderation decision source. Supported values: human_moderator (a human reviewer in your moderation workflow), expert_labeler (an expert human labeler or specialist reviewer), automation (an automated model, rules engine, or enforcement workflow), or vendor (an external review or moderation provider).



3460
3461
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3460

required :source_type,
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::SourceType }

#target_content_idString?

Your stable identifier for the content being reported.

Returns:

  • (String, nil)


3518
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3518

optional :target_content_id, String

#target_user_idString?

Your stable canonical identifier for the user being reported.

Returns:

  • (String, nil)


3524
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3524

optional :target_user_id, String

#timestampTime

The time the event occurred in your system, as an ISO 8601 datetime string.

Returns:

  • (Time)


3467
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3467

required :timestamp, Time

#typeSymbol, :moderation_decision

Returns:

  • (Symbol, :moderation_decision)


3472
# File 'lib/safety_kit/models/beta/event_create_params.rb', line 3472

required :type, const: :moderation_decision