Class: ModerationAPI::Models::ContentSubmitResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::ContentSubmitResponse
- Defined in:
- lib/moderation_api/models/content_submit_response.rb,
sig/moderation_api/models/content_submit_response.rbs
Overview
Defined Under Namespace
Modules: Insight, Policy Classes: Author, Casebook, Content, Error, Evaluation, Meta, Recommendation
Instance Attribute Summary collapse
-
#author ⇒ ModerationAPI::Models::ContentSubmitResponse::Author?
The author of the content if your account has authors enabled.
-
#casebook ⇒ ModerationAPI::Models::ContentSubmitResponse::Casebook?
What your casebook — the record of your past moderation decisions — found for this content, or null when it had nothing close enough to say, when the matching cases disagreed, or when casebook lookups are not switched on for this channel.
-
#content ⇒ ModerationAPI::Models::ContentSubmitResponse::Content
Potentially modified content.
-
#errors ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Error>?
Policies that had errors.
-
#evaluation ⇒ ModerationAPI::Models::ContentSubmitResponse::Evaluation
The evaluation of the content after running the channel policies.
-
#insights ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight, ModerationAPI::Models::ContentSubmitResponse::Insight::LanguageInsight>
Results of all insights enabled in the channel.
-
#meta ⇒ ModerationAPI::Models::ContentSubmitResponse::Meta
Metadata about the moderation request.
-
#policies ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput>
Results of all policies in the channel.
-
#recommendation ⇒ ModerationAPI::Models::ContentSubmitResponse::Recommendation
The recommendation for the content based on the evaluation.
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput)
Instance Method Summary collapse
- #initialize(key:, name:) ⇒ Object constructor
- #to_hash ⇒ {
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(key:, name:) ⇒ Object
|
|
# File 'lib/moderation_api/models/content_submit_response.rb', line 69
|
Instance Attribute Details
#author ⇒ ModerationAPI::Models::ContentSubmitResponse::Author?
The author of the content if your account has authors enabled. Requires you to send authorId when submitting content.
12 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 12 required :author, -> { ModerationAPI::Models::ContentSubmitResponse::Author }, nil?: true |
#casebook ⇒ ModerationAPI::Models::ContentSubmitResponse::Casebook?
What your casebook — the record of your past moderation decisions — found for
this content, or null when it had nothing close enough to say, when the matching
cases disagreed, or when casebook lookups are not switched on for this channel.
Reports what the casebook found; whether it decided the outcome is shown in
recommendation, where a higher-priority rule may have settled the item first.
22 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 22 required :casebook, -> { ModerationAPI::Models::ContentSubmitResponse::Casebook }, nil?: true |
#content ⇒ ModerationAPI::Models::ContentSubmitResponse::Content
Potentially modified content.
28 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 28 required :content, -> { ModerationAPI::Models::ContentSubmitResponse::Content } |
#errors ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Error>?
Policies that had errors
66 67 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 66 optional :errors, -> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::ContentSubmitResponse::Error] } |
#evaluation ⇒ ModerationAPI::Models::ContentSubmitResponse::Evaluation
The evaluation of the content after running the channel policies.
34 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 34 required :evaluation, -> { ModerationAPI::Models::ContentSubmitResponse::Evaluation } |
#insights ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight, ModerationAPI::Models::ContentSubmitResponse::Insight::LanguageInsight>
Results of all insights enabled in the channel.
40 41 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 40 required :insights, -> { ModerationAPI::Internal::Type::ArrayOf[union: ModerationAPI::Models::ContentSubmitResponse::Insight] } |
#meta ⇒ ModerationAPI::Models::ContentSubmitResponse::Meta
Metadata about the moderation request
47 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 47 required :meta, -> { ModerationAPI::Models::ContentSubmitResponse::Meta } |
#policies ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput>
Results of all policies in the channel. Sorted by highest probability.
53 54 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 53 required :policies, -> { ModerationAPI::Internal::Type::ArrayOf[union: ModerationAPI::Models::ContentSubmitResponse::Policy] } |
#recommendation ⇒ ModerationAPI::Models::ContentSubmitResponse::Recommendation
The recommendation for the content based on the evaluation.
60 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 60 required :recommendation, -> { ModerationAPI::Models::ContentSubmitResponse::Recommendation } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/moderation_api/models/content_submit_response.rb', line 291
|
.variants ⇒ Array(ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput)
|
|
# File 'lib/moderation_api/models/content_submit_response.rb', line 621
|
Instance Method Details
#to_hash ⇒ {
51 |
# File 'sig/moderation_api/models/content_submit_response.rbs', line 51
def to_hash: -> {
|