Class: ModerationAPI::Models::ContentSubmitParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/moderation_api/models/content_submit_params.rb

Overview

Defined Under Namespace

Modules: Content, MetaType, Policy

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(url:, type: :audio) ⇒ Object

Audio

Parameters:

  • url (String)

    The URL of the audio content

  • type (Symbol, :audio) (defaults to: :audio)


# File 'lib/moderation_api/models/content_submit_params.rb', line 73

Instance Attribute Details

#author_idString?

The author of the content.

Returns:

  • (String, nil)


20
# File 'lib/moderation_api/models/content_submit_params.rb', line 20

optional :author_id, String, api_name: :authorId

#channelString?

Provide a channel ID or key. Will use the project’s default channel if not provided.

Returns:

  • (String, nil)


27
# File 'lib/moderation_api/models/content_submit_params.rb', line 27

optional :channel, String

#content_idString?

The unique ID of the content in your database.

Returns:

  • (String, nil)


33
# File 'lib/moderation_api/models/content_submit_params.rb', line 33

optional :content_id, String, api_name: :contentId

#conversation_idString?

For example the ID of a chat room or a post

Returns:

  • (String, nil)


39
# File 'lib/moderation_api/models/content_submit_params.rb', line 39

optional :conversation_id, String, api_name: :conversationId

#do_not_storeBoolean?

Do not store the content. The content won’t enter the review queue

Returns:

  • (Boolean, nil)


45
# File 'lib/moderation_api/models/content_submit_params.rb', line 45

optional :do_not_store, ModerationAPI::Internal::Type::Boolean, api_name: :doNotStore

#meta_typeSymbol, ...

The meta type of content being moderated



57
# File 'lib/moderation_api/models/content_submit_params.rb', line 57

optional :meta_type, enum: -> { ModerationAPI::ContentSubmitParams::MetaType }, api_name: :metaType

#metadataHash{Symbol=>Object}?

Any metadata you want to store with the content

Returns:

  • (Hash{Symbol=>Object}, nil)


51
# File 'lib/moderation_api/models/content_submit_params.rb', line 51

optional :metadata, ModerationAPI::Internal::Type::HashOf[ModerationAPI::Internal::Type::Unknown]

#policiesArray<ModerationAPI::Models::ContentSubmitParams::Policy::Toxicity, ModerationAPI::Models::ContentSubmitParams::Policy::PersonalInformation, ModerationAPI::Models::ContentSubmitParams::Policy::ToxicitySevere, ModerationAPI::Models::ContentSubmitParams::Policy::Hate, ModerationAPI::Models::ContentSubmitParams::Policy::Illicit, ModerationAPI::Models::ContentSubmitParams::Policy::IllicitDrugs, ModerationAPI::Models::ContentSubmitParams::Policy::IllicitAlcohol, ModerationAPI::Models::ContentSubmitParams::Policy::IllicitFirearms, ModerationAPI::Models::ContentSubmitParams::Policy::IllicitTobacco, ModerationAPI::Models::ContentSubmitParams::Policy::IllicitGambling, ModerationAPI::Models::ContentSubmitParams::Policy::Cannabis, ModerationAPI::Models::ContentSubmitParams::Policy::Adult, ModerationAPI::Models::ContentSubmitParams::Policy::Crypto, ModerationAPI::Models::ContentSubmitParams::Policy::Sexual, ModerationAPI::Models::ContentSubmitParams::Policy::Flirtation, ModerationAPI::Models::ContentSubmitParams::Policy::Profanity, ModerationAPI::Models::ContentSubmitParams::Policy::Violence, ModerationAPI::Models::ContentSubmitParams::Policy::SelfHarm, ModerationAPI::Models::ContentSubmitParams::Policy::Spam, ModerationAPI::Models::ContentSubmitParams::Policy::SelfPromotion, ModerationAPI::Models::ContentSubmitParams::Policy::Political, ModerationAPI::Models::ContentSubmitParams::Policy::Religion, ModerationAPI::Models::ContentSubmitParams::Policy::CodeAbuse, ModerationAPI::Models::ContentSubmitParams::Policy::PiiMasking, ModerationAPI::Models::ContentSubmitParams::Policy::URLMasking, ModerationAPI::Models::ContentSubmitParams::Policy::URLRisk, ModerationAPI::Models::ContentSubmitParams::Policy::Guideline>?

(Enterprise) override the channel policies for this moderation request only.

Returns:



63
64
# File 'lib/moderation_api/models/content_submit_params.rb', line 63

optional :policies,
-> { ModerationAPI::Internal::Type::ArrayOf[union: ModerationAPI::ContentSubmitParams::Policy] }

#timestampFloat?

Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time.

Returns:

  • (Float, nil)


71
# File 'lib/moderation_api/models/content_submit_params.rb', line 71

optional :timestamp, Float