Class: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moderation_api/models/webhook_event.rb

Overview

See Also:

Defined Under Namespace

Modules: Content, MetaType Classes: ClientAction, Label

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(brand:, method_:) ⇒ Object

Parameters:

  • brand (String)
  • method_ (String)


# File 'lib/moderation_api/models/webhook_event.rb', line 2516

Instance Attribute Details

#author_idString?

External author ID (the customer’s identifier, not Moderation API’s internal id)

Returns:

  • (String, nil)


2429
# File 'lib/moderation_api/models/webhook_event.rb', line 2429

required :author_id, String, nil?: true

#channel_keyString?

The channel the content was submitted to, identified by your customer-defined channel key.

Returns:

  • (String, nil)


2436
# File 'lib/moderation_api/models/webhook_event.rb', line 2436

required :channel_key, String, nil?: true

#client_actionModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?

A recommendation from your own client-side flagging.



2442
2443
2444
2445
2446
# File 'lib/moderation_api/models/webhook_event.rb', line 2442

required :client_action,
-> {
  ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction
},
nil?: true

#conversation_idString?

Conversation grouping ID, if any

Returns:

  • (String, nil)


2459
# File 'lib/moderation_api/models/webhook_event.rb', line 2459

required :conversation_id, String, nil?: true

#flaggedBoolean?

Whether the content was flagged by moderation

Returns:

  • (Boolean, nil)


2465
# File 'lib/moderation_api/models/webhook_event.rb', line 2465

required :flagged, ModerationAPI::Internal::Type::Boolean, nil?: true

#flagged_fieldsArray<String>

For object content, the field keys (e.g. “bio”) that triggered a flag. Empty when no fields were flagged or the content is not an object.

Returns:

  • (Array<String>)


2472
# File 'lib/moderation_api/models/webhook_event.rb', line 2472

required :flagged_fields, ModerationAPI::Internal::Type::ArrayOf[String]

#idString

Content ID from your system

Returns:

  • (String)


2423
# File 'lib/moderation_api/models/webhook_event.rb', line 2423

required :id, String

#labelsArray<ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label>?

Moderation labels applied to the content



2478
2479
2480
2481
2482
# File 'lib/moderation_api/models/webhook_event.rb', line 2478

required :labels,
-> {
  ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Label]
},
nil?: true

#languageString?

Detected ISO language code, if available

Returns:

  • (String, nil)


2488
# File 'lib/moderation_api/models/webhook_event.rb', line 2488

required :language, String, nil?: true

#meta_typeSymbol, ...

High-level content type (e.g. message, post, comment). Defaults to the channel’s configured content type but can be overridden per request via the moderation API ‘type` field.



2496
2497
2498
2499
2500
# File 'lib/moderation_api/models/webhook_event.rb', line 2496

required :meta_type,
enum: -> {
  ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::MetaType
},
nil?: true

#metadataHash{Symbol=>Object}?

Arbitrary key/value metadata. Top-level keys are strings.

Returns:



2506
2507
2508
# File 'lib/moderation_api/models/webhook_event.rb', line 2506

required :metadata,
ModerationAPI::Internal::Type::HashOf[ModerationAPI::Internal::Type::Unknown],
nil?: true

#timestampTime

ISO 8601 timestamp of when the content was submitted

Returns:

  • (Time)


2514
# File 'lib/moderation_api/models/webhook_event.rb', line 2514

required :timestamp, Time