moderation_api 1.2.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ignore +2 -0
- data/CHANGELOG.md +28 -0
- data/README.md +200 -62
- data/SECURITY.md +27 -0
- data/lib/moderation_api/client.rb +98 -0
- data/lib/moderation_api/errors.rb +228 -0
- data/lib/moderation_api/file_part.rb +58 -0
- data/lib/moderation_api/internal/transport/base_client.rb +577 -0
- data/lib/moderation_api/internal/transport/pooled_net_requester.rb +208 -0
- data/lib/moderation_api/internal/type/array_of.rb +168 -0
- data/lib/moderation_api/internal/type/base_model.rb +534 -0
- data/lib/moderation_api/internal/type/base_page.rb +55 -0
- data/lib/moderation_api/internal/type/boolean.rb +77 -0
- data/lib/moderation_api/internal/type/converter.rb +327 -0
- data/lib/moderation_api/internal/type/enum.rb +131 -0
- data/lib/moderation_api/internal/type/file_input.rb +111 -0
- data/lib/moderation_api/internal/type/hash_of.rb +188 -0
- data/lib/moderation_api/internal/type/request_parameters.rb +42 -0
- data/lib/moderation_api/internal/type/union.rb +243 -0
- data/lib/moderation_api/internal/type/unknown.rb +81 -0
- data/lib/moderation_api/internal/util.rb +915 -0
- data/lib/moderation_api/internal.rb +20 -0
- data/lib/moderation_api/models/account_list_params.rb +14 -0
- data/lib/moderation_api/models/account_list_response.rb +68 -0
- data/lib/moderation_api/models/action_create_params.rb +217 -0
- data/lib/moderation_api/models/action_create_response.rb +188 -0
- data/lib/moderation_api/models/action_delete_params.rb +14 -0
- data/lib/moderation_api/models/action_delete_response.rb +25 -0
- data/lib/moderation_api/models/action_list_params.rb +20 -0
- data/lib/moderation_api/models/action_list_response.rb +247 -0
- data/lib/moderation_api/models/action_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/action_retrieve_response.rb +244 -0
- data/lib/moderation_api/models/action_update_params.rb +217 -0
- data/lib/moderation_api/models/action_update_response.rb +188 -0
- data/lib/moderation_api/models/actions/execute_execute_by_id_params.rb +48 -0
- data/lib/moderation_api/models/actions/execute_execute_by_id_response.rb +35 -0
- data/lib/moderation_api/models/actions/execute_execute_params.rb +64 -0
- data/lib/moderation_api/models/actions/execute_execute_response.rb +21 -0
- data/lib/moderation_api/models/auth_create_params.rb +14 -0
- data/lib/moderation_api/models/auth_create_response.rb +33 -0
- data/lib/moderation_api/models/auth_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/auth_retrieve_response.rb +25 -0
- data/lib/moderation_api/models/author_create_params.rb +127 -0
- data/lib/moderation_api/models/author_create_response.rb +272 -0
- data/lib/moderation_api/models/author_delete_params.rb +14 -0
- data/lib/moderation_api/models/author_delete_response.rb +16 -0
- data/lib/moderation_api/models/author_list_params.rb +93 -0
- data/lib/moderation_api/models/author_list_response.rb +326 -0
- data/lib/moderation_api/models/author_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/author_retrieve_response.rb +274 -0
- data/lib/moderation_api/models/author_update_params.rb +119 -0
- data/lib/moderation_api/models/author_update_response.rb +272 -0
- data/lib/moderation_api/models/content_submit_params.rb +871 -0
- data/lib/moderation_api/models/content_submit_response.rb +742 -0
- data/lib/moderation_api/models/queue/item_list_params.rb +118 -0
- data/lib/moderation_api/models/queue/item_list_response.rb +235 -0
- data/lib/moderation_api/models/queue/item_resolve_params.rb +32 -0
- data/lib/moderation_api/models/queue/item_resolve_response.rb +34 -0
- data/lib/moderation_api/models/queue/item_unresolve_params.rb +32 -0
- data/lib/moderation_api/models/queue/item_unresolve_response.rb +34 -0
- data/lib/moderation_api/models/queue_get_stats_params.rb +22 -0
- data/lib/moderation_api/models/queue_get_stats_response.rb +251 -0
- data/lib/moderation_api/models/queue_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/queue_retrieve_response.rb +190 -0
- data/lib/moderation_api/models/wordlist/word_add_params.rb +24 -0
- data/lib/moderation_api/models/wordlist/word_add_response.rb +35 -0
- data/lib/moderation_api/models/wordlist/word_remove_params.rb +24 -0
- data/lib/moderation_api/models/wordlist/word_remove_response.rb +35 -0
- data/lib/moderation_api/models/wordlist_get_embedding_status_params.rb +14 -0
- data/lib/moderation_api/models/wordlist_get_embedding_status_response.rb +35 -0
- data/lib/moderation_api/models/wordlist_list_params.rb +14 -0
- data/lib/moderation_api/models/wordlist_list_response.rb +52 -0
- data/lib/moderation_api/models/wordlist_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/wordlist_retrieve_response.rb +65 -0
- data/lib/moderation_api/models/wordlist_update_params.rb +58 -0
- data/lib/moderation_api/models/wordlist_update_response.rb +65 -0
- data/lib/moderation_api/models.rb +90 -0
- data/lib/moderation_api/request_options.rb +78 -0
- data/lib/moderation_api/resources/account.rb +32 -0
- data/lib/moderation_api/resources/actions/execute.rb +80 -0
- data/lib/moderation_api/resources/actions.rb +175 -0
- data/lib/moderation_api/resources/auth.rb +50 -0
- data/lib/moderation_api/resources/authors.rb +179 -0
- data/lib/moderation_api/resources/content.rb +53 -0
- data/lib/moderation_api/resources/queue/items.rb +131 -0
- data/lib/moderation_api/resources/queue.rb +63 -0
- data/lib/moderation_api/resources/wordlist/words.rb +64 -0
- data/lib/moderation_api/resources/wordlist.rb +111 -0
- data/lib/moderation_api/version.rb +2 -12
- data/lib/moderation_api.rb +115 -89
- data/manifest.yaml +17 -0
- data/rbi/moderation_api/client.rbi +67 -0
- data/rbi/moderation_api/errors.rbi +205 -0
- data/rbi/moderation_api/file_part.rbi +37 -0
- data/rbi/moderation_api/internal/transport/base_client.rbi +305 -0
- data/rbi/moderation_api/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/moderation_api/internal/type/array_of.rbi +104 -0
- data/rbi/moderation_api/internal/type/base_model.rbi +314 -0
- data/rbi/moderation_api/internal/type/base_page.rbi +43 -0
- data/rbi/moderation_api/internal/type/boolean.rbi +58 -0
- data/rbi/moderation_api/internal/type/converter.rbi +225 -0
- data/rbi/moderation_api/internal/type/enum.rbi +82 -0
- data/rbi/moderation_api/internal/type/file_input.rbi +59 -0
- data/rbi/moderation_api/internal/type/hash_of.rbi +104 -0
- data/rbi/moderation_api/internal/type/request_parameters.rbi +31 -0
- data/rbi/moderation_api/internal/type/union.rbi +128 -0
- data/rbi/moderation_api/internal/type/unknown.rbi +58 -0
- data/rbi/moderation_api/internal/util.rbi +487 -0
- data/rbi/moderation_api/internal.rbi +18 -0
- data/rbi/moderation_api/models/account_list_params.rbi +32 -0
- data/rbi/moderation_api/models/account_list_response.rbi +115 -0
- data/rbi/moderation_api/models/action_create_params.rbi +433 -0
- data/rbi/moderation_api/models/action_create_response.rbi +354 -0
- data/rbi/moderation_api/models/action_delete_params.rbi +32 -0
- data/rbi/moderation_api/models/action_delete_response.rbi +36 -0
- data/rbi/moderation_api/models/action_list_params.rbi +41 -0
- data/rbi/moderation_api/models/action_list_response.rbi +450 -0
- data/rbi/moderation_api/models/action_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/action_retrieve_response.rbi +442 -0
- data/rbi/moderation_api/models/action_update_params.rbi +436 -0
- data/rbi/moderation_api/models/action_update_response.rbi +354 -0
- data/rbi/moderation_api/models/actions/execute_execute_by_id_params.rbi +84 -0
- data/rbi/moderation_api/models/actions/execute_execute_by_id_response.rbi +54 -0
- data/rbi/moderation_api/models/actions/execute_execute_params.rbi +103 -0
- data/rbi/moderation_api/models/actions/execute_execute_response.rbi +33 -0
- data/rbi/moderation_api/models/auth_create_params.rbi +32 -0
- data/rbi/moderation_api/models/auth_create_response.rbi +48 -0
- data/rbi/moderation_api/models/auth_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/auth_retrieve_response.rbi +36 -0
- data/rbi/moderation_api/models/author_create_params.rbi +184 -0
- data/rbi/moderation_api/models/author_create_response.rbi +467 -0
- data/rbi/moderation_api/models/author_delete_params.rbi +32 -0
- data/rbi/moderation_api/models/author_delete_response.rbi +26 -0
- data/rbi/moderation_api/models/author_list_params.rbi +213 -0
- data/rbi/moderation_api/models/author_list_response.rbi +593 -0
- data/rbi/moderation_api/models/author_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/author_retrieve_response.rbi +472 -0
- data/rbi/moderation_api/models/author_update_params.rbi +176 -0
- data/rbi/moderation_api/models/author_update_response.rbi +467 -0
- data/rbi/moderation_api/models/content_submit_params.rbi +1641 -0
- data/rbi/moderation_api/models/content_submit_response.rbi +1456 -0
- data/rbi/moderation_api/models/queue/item_list_params.rbi +237 -0
- data/rbi/moderation_api/models/queue/item_list_response.rbi +440 -0
- data/rbi/moderation_api/models/queue/item_resolve_params.rbi +59 -0
- data/rbi/moderation_api/models/queue/item_resolve_response.rbi +55 -0
- data/rbi/moderation_api/models/queue/item_unresolve_params.rbi +59 -0
- data/rbi/moderation_api/models/queue/item_unresolve_response.rbi +52 -0
- data/rbi/moderation_api/models/queue_get_stats_params.rbi +49 -0
- data/rbi/moderation_api/models/queue_get_stats_response.rbi +466 -0
- data/rbi/moderation_api/models/queue_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/queue_retrieve_response.rbi +411 -0
- data/rbi/moderation_api/models/wordlist/word_add_params.rbi +48 -0
- data/rbi/moderation_api/models/wordlist/word_add_response.rbi +58 -0
- data/rbi/moderation_api/models/wordlist/word_remove_params.rbi +48 -0
- data/rbi/moderation_api/models/wordlist/word_remove_response.rbi +58 -0
- data/rbi/moderation_api/models/wordlist_get_embedding_status_params.rbi +32 -0
- data/rbi/moderation_api/models/wordlist_get_embedding_status_response.rbi +53 -0
- data/rbi/moderation_api/models/wordlist_list_params.rbi +32 -0
- data/rbi/moderation_api/models/wordlist_list_response.rbi +80 -0
- data/rbi/moderation_api/models/wordlist_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/wordlist_retrieve_response.rbi +88 -0
- data/rbi/moderation_api/models/wordlist_update_params.rbi +95 -0
- data/rbi/moderation_api/models/wordlist_update_response.rbi +88 -0
- data/rbi/moderation_api/models.rbi +50 -0
- data/rbi/moderation_api/request_options.rbi +59 -0
- data/rbi/moderation_api/resources/account.rbi +21 -0
- data/rbi/moderation_api/resources/actions/execute.rbi +69 -0
- data/rbi/moderation_api/resources/actions.rbi +164 -0
- data/rbi/moderation_api/resources/auth.rbi +28 -0
- data/rbi/moderation_api/resources/authors.rbi +143 -0
- data/rbi/moderation_api/resources/content.rbi +84 -0
- data/rbi/moderation_api/resources/queue/items.rbi +95 -0
- data/rbi/moderation_api/resources/queue.rbi +47 -0
- data/rbi/moderation_api/resources/wordlist/words.rbi +48 -0
- data/rbi/moderation_api/resources/wordlist.rbi +82 -0
- data/rbi/moderation_api/version.rbi +5 -0
- data/sig/moderation_api/client.rbs +38 -0
- data/sig/moderation_api/errors.rbs +117 -0
- data/sig/moderation_api/file_part.rbs +21 -0
- data/sig/moderation_api/internal/transport/base_client.rbs +133 -0
- data/sig/moderation_api/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/moderation_api/internal/type/array_of.rbs +48 -0
- data/sig/moderation_api/internal/type/base_model.rbs +104 -0
- data/sig/moderation_api/internal/type/base_page.rbs +24 -0
- data/sig/moderation_api/internal/type/boolean.rbs +26 -0
- data/sig/moderation_api/internal/type/converter.rbs +79 -0
- data/sig/moderation_api/internal/type/enum.rbs +32 -0
- data/sig/moderation_api/internal/type/file_input.rbs +25 -0
- data/sig/moderation_api/internal/type/hash_of.rbs +48 -0
- data/sig/moderation_api/internal/type/request_parameters.rbs +19 -0
- data/sig/moderation_api/internal/type/union.rbs +52 -0
- data/sig/moderation_api/internal/type/unknown.rbs +26 -0
- data/sig/moderation_api/internal/util.rbs +185 -0
- data/sig/moderation_api/internal.rbs +10 -0
- data/sig/moderation_api/models/account_list_params.rbs +15 -0
- data/sig/moderation_api/models/account_list_response.rbs +56 -0
- data/sig/moderation_api/models/action_create_params.rbs +195 -0
- data/sig/moderation_api/models/action_create_response.rbs +143 -0
- data/sig/moderation_api/models/action_delete_params.rbs +15 -0
- data/sig/moderation_api/models/action_delete_response.rbs +15 -0
- data/sig/moderation_api/models/action_list_params.rbs +25 -0
- data/sig/moderation_api/models/action_list_response.rbs +190 -0
- data/sig/moderation_api/models/action_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/action_retrieve_response.rbs +185 -0
- data/sig/moderation_api/models/action_update_params.rbs +197 -0
- data/sig/moderation_api/models/action_update_response.rbs +143 -0
- data/sig/moderation_api/models/actions/execute_execute_by_id_params.rbs +51 -0
- data/sig/moderation_api/models/actions/execute_execute_by_id_response.rbs +28 -0
- data/sig/moderation_api/models/actions/execute_execute_params.rbs +63 -0
- data/sig/moderation_api/models/actions/execute_execute_response.rbs +15 -0
- data/sig/moderation_api/models/auth_create_params.rbs +15 -0
- data/sig/moderation_api/models/auth_create_response.rbs +18 -0
- data/sig/moderation_api/models/auth_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/auth_retrieve_response.rbs +15 -0
- data/sig/moderation_api/models/author_create_params.rbs +106 -0
- data/sig/moderation_api/models/author_create_response.rbs +195 -0
- data/sig/moderation_api/models/author_delete_params.rbs +15 -0
- data/sig/moderation_api/models/author_delete_response.rbs +13 -0
- data/sig/moderation_api/models/author_list_params.rbs +110 -0
- data/sig/moderation_api/models/author_list_response.rbs +254 -0
- data/sig/moderation_api/models/author_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/author_retrieve_response.rbs +195 -0
- data/sig/moderation_api/models/author_update_params.rbs +101 -0
- data/sig/moderation_api/models/author_update_response.rbs +195 -0
- data/sig/moderation_api/models/content_submit_params.rbs +733 -0
- data/sig/moderation_api/models/content_submit_response.rbs +599 -0
- data/sig/moderation_api/models/queue/item_list_params.rbs +127 -0
- data/sig/moderation_api/models/queue/item_list_response.rbs +209 -0
- data/sig/moderation_api/models/queue/item_resolve_params.rbs +32 -0
- data/sig/moderation_api/models/queue/item_resolve_response.rbs +26 -0
- data/sig/moderation_api/models/queue/item_unresolve_params.rbs +32 -0
- data/sig/moderation_api/models/queue/item_unresolve_response.rbs +24 -0
- data/sig/moderation_api/models/queue_get_stats_params.rbs +26 -0
- data/sig/moderation_api/models/queue_get_stats_response.rbs +207 -0
- data/sig/moderation_api/models/queue_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/queue_retrieve_response.rbs +207 -0
- data/sig/moderation_api/models/wordlist/word_add_params.rbs +26 -0
- data/sig/moderation_api/models/wordlist/word_add_response.rbs +28 -0
- data/sig/moderation_api/models/wordlist/word_remove_params.rbs +26 -0
- data/sig/moderation_api/models/wordlist/word_remove_response.rbs +32 -0
- data/sig/moderation_api/models/wordlist_get_embedding_status_params.rbs +15 -0
- data/sig/moderation_api/models/wordlist_get_embedding_status_response.rbs +26 -0
- data/sig/moderation_api/models/wordlist_list_params.rbs +15 -0
- data/sig/moderation_api/models/wordlist_list_response.rbs +45 -0
- data/sig/moderation_api/models/wordlist_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/wordlist_retrieve_response.rbs +50 -0
- data/sig/moderation_api/models/wordlist_update_params.rbs +56 -0
- data/sig/moderation_api/models/wordlist_update_response.rbs +50 -0
- data/sig/moderation_api/models.rbs +47 -0
- data/sig/moderation_api/request_options.rbs +36 -0
- data/sig/moderation_api/resources/account.rbs +11 -0
- data/sig/moderation_api/resources/actions/execute.rbs +28 -0
- data/sig/moderation_api/resources/actions.rbs +57 -0
- data/sig/moderation_api/resources/auth.rbs +15 -0
- data/sig/moderation_api/resources/authors.rbs +54 -0
- data/sig/moderation_api/resources/content.rbs +20 -0
- data/sig/moderation_api/resources/queue/items.rbs +39 -0
- data/sig/moderation_api/resources/queue.rbs +20 -0
- data/sig/moderation_api/resources/wordlist/words.rbs +21 -0
- data/sig/moderation_api/resources/wordlist.rbs +33 -0
- data/sig/moderation_api/version.rbs +3 -0
- metadata +277 -299
- data/Gemfile +0 -9
- data/Rakefile +0 -10
- data/docs/AccountApi.md +0 -74
- data/docs/AccountGet200Response.md +0 -26
- data/docs/AccountGet200ResponseCurrentProject.md +0 -20
- data/docs/ActionsCreateRequest.md +0 -36
- data/docs/ActionsCreateRequestWebhooksInner.md +0 -24
- data/docs/ActionsDelete200Response.md +0 -20
- data/docs/ActionsExecute200Response.md +0 -22
- data/docs/ActionsExecuteDeprecatedRequest.md +0 -22
- data/docs/ActionsExecuteRequest.md +0 -24
- data/docs/ActionsGet200Response.md +0 -40
- data/docs/ActionsGet200ResponseWebhooksInner.md +0 -26
- data/docs/ActionsList200ResponseInner.md +0 -38
- data/docs/ActionsList200ResponseInnerPossibleValuesInner.md +0 -18
- data/docs/ActionsList400Response.md +0 -22
- data/docs/ActionsList400ResponseIssuesInner.md +0 -18
- data/docs/ActionsUpdateRequest.md +0 -36
- data/docs/ModerateApi.md +0 -357
- data/docs/ModerationAudioRequest.md +0 -28
- data/docs/ModerationImage200Response.md +0 -28
- data/docs/ModerationImage200ResponseLabelsInner.md +0 -20
- data/docs/ModerationImageRequest.md +0 -28
- data/docs/ModerationObject200Response.md +0 -36
- data/docs/ModerationObject200ResponseAllOfEntitiesInner.md +0 -22
- data/docs/ModerationObject200ResponseAllOfFieldsInner.md +0 -22
- data/docs/ModerationObject200ResponseAllOfLabelsInner.md +0 -22
- data/docs/ModerationObjectRequest.md +0 -28
- data/docs/ModerationObjectRequestValue.md +0 -20
- data/docs/ModerationObjectRequestValueDataValue.md +0 -22
- data/docs/ModerationText200Response.md +0 -64
- data/docs/ModerationText200ResponseAllOfAddress.md +0 -28
- data/docs/ModerationText200ResponseAllOfEmail.md +0 -28
- data/docs/ModerationText200ResponseAllOfName.md +0 -28
- data/docs/ModerationText200ResponseAllOfNsfw.md +0 -26
- data/docs/ModerationText200ResponseAllOfNsfwLabelScores.md +0 -22
- data/docs/ModerationText200ResponseAllOfPhone.md +0 -28
- data/docs/ModerationText200ResponseAllOfProfanity.md +0 -28
- data/docs/ModerationText200ResponseAllOfPropriety.md +0 -26
- data/docs/ModerationText200ResponseAllOfProprietyLabelScores.md +0 -22
- data/docs/ModerationText200ResponseAllOfQuality.md +0 -26
- data/docs/ModerationText200ResponseAllOfQualityLabelScores.md +0 -24
- data/docs/ModerationText200ResponseAllOfRequest.md +0 -20
- data/docs/ModerationText200ResponseAllOfSensitive.md +0 -28
- data/docs/ModerationText200ResponseAllOfSentiment.md +0 -26
- data/docs/ModerationText200ResponseAllOfSentimentLabelScores.md +0 -22
- data/docs/ModerationText200ResponseAllOfToxicity.md +0 -26
- data/docs/ModerationText200ResponseAllOfToxicityLabelScores.md +0 -30
- data/docs/ModerationText200ResponseAllOfUrl.md +0 -28
- data/docs/ModerationText200ResponseAllOfUsername.md +0 -28
- data/docs/ModerationText200ResponseAllOfWordlist.md +0 -28
- data/docs/ModerationText200ResponseAllOfWordlistsInner.md +0 -36
- data/docs/ModerationTextRequest.md +0 -28
- data/docs/ModerationVideo200Response.md +0 -24
- data/docs/ModerationVideoRequest.md +0 -28
- data/docs/QueueActionsApi.md +0 -503
- data/git_push.sh +0 -57
- data/lib/moderation_api/api/account_api.rb +0 -79
- data/lib/moderation_api/api/moderate_api.rb +0 -362
- data/lib/moderation_api/api/queue_actions_api.rb +0 -492
- data/lib/moderation_api/api_client.rb +0 -437
- data/lib/moderation_api/api_error.rb +0 -58
- data/lib/moderation_api/configuration.rb +0 -392
- data/lib/moderation_api/models/account_get200_response.rb +0 -278
- data/lib/moderation_api/models/account_get200_response_current_project.rb +0 -237
- data/lib/moderation_api/models/actions_create_request.rb +0 -374
- data/lib/moderation_api/models/actions_create_request_webhooks_inner.rb +0 -260
- data/lib/moderation_api/models/actions_delete200_response.rb +0 -239
- data/lib/moderation_api/models/actions_execute200_response.rb +0 -258
- data/lib/moderation_api/models/actions_execute_deprecated_request.rb +0 -244
- data/lib/moderation_api/models/actions_execute_request.rb +0 -261
- data/lib/moderation_api/models/actions_get200_response.rb +0 -408
- data/lib/moderation_api/models/actions_get200_response_webhooks_inner.rb +0 -278
- data/lib/moderation_api/models/actions_list200_response_inner.rb +0 -396
- data/lib/moderation_api/models/actions_list200_response_inner_possible_values_inner.rb +0 -222
- data/lib/moderation_api/models/actions_list400_response.rb +0 -248
- data/lib/moderation_api/models/actions_list400_response_issues_inner.rb +0 -221
- data/lib/moderation_api/models/actions_update_request.rb +0 -367
- data/lib/moderation_api/models/moderation_audio_request.rb +0 -302
- data/lib/moderation_api/models/moderation_image200_response.rb +0 -296
- data/lib/moderation_api/models/moderation_image200_response_labels_inner.rb +0 -301
- data/lib/moderation_api/models/moderation_image_request.rb +0 -302
- data/lib/moderation_api/models/moderation_object200_response.rb +0 -368
- data/lib/moderation_api/models/moderation_object200_response_all_of_entities_inner.rb +0 -251
- data/lib/moderation_api/models/moderation_object200_response_all_of_fields_inner.rb +0 -258
- data/lib/moderation_api/models/moderation_object200_response_all_of_labels_inner.rb +0 -284
- data/lib/moderation_api/models/moderation_object_request.rb +0 -301
- data/lib/moderation_api/models/moderation_object_request_value.rb +0 -275
- data/lib/moderation_api/models/moderation_object_request_value_data_value.rb +0 -285
- data/lib/moderation_api/models/moderation_text200_response.rb +0 -488
- data/lib/moderation_api/models/moderation_text200_response_all_of_address.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_email.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_name.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw_label_scores.rb +0 -235
- data/lib/moderation_api/models/moderation_text200_response_all_of_phone.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_profanity.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety_label_scores.rb +0 -235
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality_label_scores.rb +0 -245
- data/lib/moderation_api/models/moderation_text200_response_all_of_request.rb +0 -240
- data/lib/moderation_api/models/moderation_text200_response_all_of_sensitive.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment_label_scores.rb +0 -235
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity.rb +0 -262
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity_label_scores.rb +0 -275
- data/lib/moderation_api/models/moderation_text200_response_all_of_url.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_username.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlist.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlists_inner.rb +0 -377
- data/lib/moderation_api/models/moderation_text_request.rb +0 -330
- data/lib/moderation_api/models/moderation_video200_response.rb +0 -265
- data/lib/moderation_api/models/moderation_video_request.rb +0 -302
- data/lib/moderation_api/webhook.rb +0 -41
- data/moderation_api-1.2.0.gem +0 -0
- data/moderation_api.gemspec +0 -45
- data/spec/api/account_api_spec.rb +0 -46
- data/spec/api/moderate_api_spec.rb +0 -95
- data/spec/api/queue_actions_api_spec.rb +0 -121
- data/spec/models/account_get200_response_current_project_spec.rb +0 -42
- data/spec/models/account_get200_response_spec.rb +0 -60
- data/spec/models/actions_create_request_spec.rb +0 -98
- data/spec/models/actions_create_request_webhooks_inner_spec.rb +0 -54
- data/spec/models/actions_delete200_response_spec.rb +0 -42
- data/spec/models/actions_execute200_response_spec.rb +0 -48
- data/spec/models/actions_execute_deprecated_request_spec.rb +0 -48
- data/spec/models/actions_execute_request_spec.rb +0 -54
- data/spec/models/actions_get200_response_spec.rb +0 -110
- data/spec/models/actions_get200_response_webhooks_inner_spec.rb +0 -60
- data/spec/models/actions_list200_response_inner_possible_values_inner_spec.rb +0 -36
- data/spec/models/actions_list200_response_inner_spec.rb +0 -104
- data/spec/models/actions_list400_response_issues_inner_spec.rb +0 -36
- data/spec/models/actions_list400_response_spec.rb +0 -48
- data/spec/models/actions_update_request_spec.rb +0 -98
- data/spec/models/moderation_audio_request_spec.rb +0 -66
- data/spec/models/moderation_image200_response_labels_inner_spec.rb +0 -46
- data/spec/models/moderation_image200_response_spec.rb +0 -66
- data/spec/models/moderation_image_request_spec.rb +0 -66
- data/spec/models/moderation_object200_response_all_of_entities_inner_spec.rb +0 -48
- data/spec/models/moderation_object200_response_all_of_fields_inner_spec.rb +0 -48
- data/spec/models/moderation_object200_response_all_of_labels_inner_spec.rb +0 -48
- data/spec/models/moderation_object200_response_spec.rb +0 -90
- data/spec/models/moderation_object_request_spec.rb +0 -66
- data/spec/models/moderation_object_request_value_data_value_spec.rb +0 -52
- data/spec/models/moderation_object_request_value_spec.rb +0 -46
- data/spec/models/moderation_text200_response_all_of_address_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_email_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_name_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_nsfw_label_scores_spec.rb +0 -48
- data/spec/models/moderation_text200_response_all_of_nsfw_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_phone_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_profanity_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_propriety_label_scores_spec.rb +0 -48
- data/spec/models/moderation_text200_response_all_of_propriety_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_quality_label_scores_spec.rb +0 -54
- data/spec/models/moderation_text200_response_all_of_quality_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_request_spec.rb +0 -42
- data/spec/models/moderation_text200_response_all_of_sensitive_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_sentiment_label_scores_spec.rb +0 -48
- data/spec/models/moderation_text200_response_all_of_sentiment_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_toxicity_label_scores_spec.rb +0 -72
- data/spec/models/moderation_text200_response_all_of_toxicity_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_url_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_username_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_wordlist_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_wordlists_inner_spec.rb +0 -94
- data/spec/models/moderation_text200_response_spec.rb +0 -174
- data/spec/models/moderation_text_request_spec.rb +0 -66
- data/spec/models/moderation_video200_response_spec.rb +0 -54
- data/spec/models/moderation_video_request_spec.rb +0 -66
- data/spec/spec_helper.rb +0 -111
|
@@ -0,0 +1,1456 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
class ContentSubmitResponse < ModerationAPI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
ModerationAPI::Models::ContentSubmitResponse,
|
|
10
|
+
ModerationAPI::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The author of the content if your account has authors enabled. Requires you to
|
|
15
|
+
# send authorId when submitting content.
|
|
16
|
+
sig do
|
|
17
|
+
returns(T.nilable(ModerationAPI::Models::ContentSubmitResponse::Author))
|
|
18
|
+
end
|
|
19
|
+
attr_reader :author
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
author:
|
|
24
|
+
T.nilable(
|
|
25
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::OrHash
|
|
26
|
+
)
|
|
27
|
+
).void
|
|
28
|
+
end
|
|
29
|
+
attr_writer :author
|
|
30
|
+
|
|
31
|
+
# Potentially modified content.
|
|
32
|
+
sig { returns(ModerationAPI::Models::ContentSubmitResponse::Content) }
|
|
33
|
+
attr_reader :content
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
content: ModerationAPI::Models::ContentSubmitResponse::Content::OrHash
|
|
38
|
+
).void
|
|
39
|
+
end
|
|
40
|
+
attr_writer :content
|
|
41
|
+
|
|
42
|
+
# The evaluation of the content after running the channel policies.
|
|
43
|
+
sig { returns(ModerationAPI::Models::ContentSubmitResponse::Evaluation) }
|
|
44
|
+
attr_reader :evaluation
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
evaluation:
|
|
49
|
+
ModerationAPI::Models::ContentSubmitResponse::Evaluation::OrHash
|
|
50
|
+
).void
|
|
51
|
+
end
|
|
52
|
+
attr_writer :evaluation
|
|
53
|
+
|
|
54
|
+
# Results of all insights enabled in the channel.
|
|
55
|
+
sig do
|
|
56
|
+
returns(
|
|
57
|
+
T::Array[
|
|
58
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::Variants
|
|
59
|
+
]
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
attr_accessor :insights
|
|
63
|
+
|
|
64
|
+
# Metadata about the moderation request
|
|
65
|
+
sig { returns(ModerationAPI::Models::ContentSubmitResponse::Meta) }
|
|
66
|
+
attr_reader :meta
|
|
67
|
+
|
|
68
|
+
sig do
|
|
69
|
+
params(
|
|
70
|
+
meta: ModerationAPI::Models::ContentSubmitResponse::Meta::OrHash
|
|
71
|
+
).void
|
|
72
|
+
end
|
|
73
|
+
attr_writer :meta
|
|
74
|
+
|
|
75
|
+
# Results of all policies in the channel. Sorted by highest probability.
|
|
76
|
+
sig do
|
|
77
|
+
returns(
|
|
78
|
+
T::Array[
|
|
79
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::Variants
|
|
80
|
+
]
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
attr_accessor :policies
|
|
84
|
+
|
|
85
|
+
# The recommendation for the content based on the evaluation.
|
|
86
|
+
sig do
|
|
87
|
+
returns(ModerationAPI::Models::ContentSubmitResponse::Recommendation)
|
|
88
|
+
end
|
|
89
|
+
attr_reader :recommendation
|
|
90
|
+
|
|
91
|
+
sig do
|
|
92
|
+
params(
|
|
93
|
+
recommendation:
|
|
94
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::OrHash
|
|
95
|
+
).void
|
|
96
|
+
end
|
|
97
|
+
attr_writer :recommendation
|
|
98
|
+
|
|
99
|
+
# Policies that had errors
|
|
100
|
+
sig do
|
|
101
|
+
returns(
|
|
102
|
+
T.nilable(
|
|
103
|
+
T::Array[ModerationAPI::Models::ContentSubmitResponse::Error]
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
attr_reader :errors
|
|
108
|
+
|
|
109
|
+
sig do
|
|
110
|
+
params(
|
|
111
|
+
errors:
|
|
112
|
+
T::Array[
|
|
113
|
+
ModerationAPI::Models::ContentSubmitResponse::Error::OrHash
|
|
114
|
+
]
|
|
115
|
+
).void
|
|
116
|
+
end
|
|
117
|
+
attr_writer :errors
|
|
118
|
+
|
|
119
|
+
sig do
|
|
120
|
+
params(
|
|
121
|
+
author:
|
|
122
|
+
T.nilable(
|
|
123
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::OrHash
|
|
124
|
+
),
|
|
125
|
+
content:
|
|
126
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::OrHash,
|
|
127
|
+
evaluation:
|
|
128
|
+
ModerationAPI::Models::ContentSubmitResponse::Evaluation::OrHash,
|
|
129
|
+
insights:
|
|
130
|
+
T::Array[
|
|
131
|
+
T.any(
|
|
132
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::OrHash,
|
|
133
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::LanguageInsight::OrHash
|
|
134
|
+
)
|
|
135
|
+
],
|
|
136
|
+
meta: ModerationAPI::Models::ContentSubmitResponse::Meta::OrHash,
|
|
137
|
+
policies:
|
|
138
|
+
T::Array[
|
|
139
|
+
T.any(
|
|
140
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::OrHash,
|
|
141
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::OrHash
|
|
142
|
+
)
|
|
143
|
+
],
|
|
144
|
+
recommendation:
|
|
145
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::OrHash,
|
|
146
|
+
errors:
|
|
147
|
+
T::Array[
|
|
148
|
+
ModerationAPI::Models::ContentSubmitResponse::Error::OrHash
|
|
149
|
+
]
|
|
150
|
+
).returns(T.attached_class)
|
|
151
|
+
end
|
|
152
|
+
def self.new(
|
|
153
|
+
# The author of the content if your account has authors enabled. Requires you to
|
|
154
|
+
# send authorId when submitting content.
|
|
155
|
+
author:,
|
|
156
|
+
# Potentially modified content.
|
|
157
|
+
content:,
|
|
158
|
+
# The evaluation of the content after running the channel policies.
|
|
159
|
+
evaluation:,
|
|
160
|
+
# Results of all insights enabled in the channel.
|
|
161
|
+
insights:,
|
|
162
|
+
# Metadata about the moderation request
|
|
163
|
+
meta:,
|
|
164
|
+
# Results of all policies in the channel. Sorted by highest probability.
|
|
165
|
+
policies:,
|
|
166
|
+
# The recommendation for the content based on the evaluation.
|
|
167
|
+
recommendation:,
|
|
168
|
+
# Policies that had errors
|
|
169
|
+
errors: nil
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
sig do
|
|
174
|
+
override.returns(
|
|
175
|
+
{
|
|
176
|
+
author:
|
|
177
|
+
T.nilable(ModerationAPI::Models::ContentSubmitResponse::Author),
|
|
178
|
+
content: ModerationAPI::Models::ContentSubmitResponse::Content,
|
|
179
|
+
evaluation:
|
|
180
|
+
ModerationAPI::Models::ContentSubmitResponse::Evaluation,
|
|
181
|
+
insights:
|
|
182
|
+
T::Array[
|
|
183
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::Variants
|
|
184
|
+
],
|
|
185
|
+
meta: ModerationAPI::Models::ContentSubmitResponse::Meta,
|
|
186
|
+
policies:
|
|
187
|
+
T::Array[
|
|
188
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::Variants
|
|
189
|
+
],
|
|
190
|
+
recommendation:
|
|
191
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation,
|
|
192
|
+
errors:
|
|
193
|
+
T::Array[ModerationAPI::Models::ContentSubmitResponse::Error]
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
end
|
|
197
|
+
def to_hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
class Author < ModerationAPI::Internal::Type::BaseModel
|
|
201
|
+
OrHash =
|
|
202
|
+
T.type_alias do
|
|
203
|
+
T.any(
|
|
204
|
+
ModerationAPI::Models::ContentSubmitResponse::Author,
|
|
205
|
+
ModerationAPI::Internal::AnyHash
|
|
206
|
+
)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Author ID in Moderation API
|
|
210
|
+
sig { returns(String) }
|
|
211
|
+
attr_accessor :id
|
|
212
|
+
|
|
213
|
+
# Block or suspension details, if applicable. Null if the author is enabled.
|
|
214
|
+
sig do
|
|
215
|
+
returns(
|
|
216
|
+
T.nilable(
|
|
217
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Block
|
|
218
|
+
)
|
|
219
|
+
)
|
|
220
|
+
end
|
|
221
|
+
attr_reader :block
|
|
222
|
+
|
|
223
|
+
sig do
|
|
224
|
+
params(
|
|
225
|
+
block:
|
|
226
|
+
T.nilable(
|
|
227
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Block::OrHash
|
|
228
|
+
)
|
|
229
|
+
).void
|
|
230
|
+
end
|
|
231
|
+
attr_writer :block
|
|
232
|
+
|
|
233
|
+
# Current author status
|
|
234
|
+
sig do
|
|
235
|
+
returns(
|
|
236
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status::TaggedSymbol
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
attr_accessor :status
|
|
240
|
+
|
|
241
|
+
sig do
|
|
242
|
+
returns(
|
|
243
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::TrustLevel
|
|
244
|
+
)
|
|
245
|
+
end
|
|
246
|
+
attr_reader :trust_level
|
|
247
|
+
|
|
248
|
+
sig do
|
|
249
|
+
params(
|
|
250
|
+
trust_level:
|
|
251
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::TrustLevel::OrHash
|
|
252
|
+
).void
|
|
253
|
+
end
|
|
254
|
+
attr_writer :trust_level
|
|
255
|
+
|
|
256
|
+
# The author's ID from your system
|
|
257
|
+
sig { returns(T.nilable(String)) }
|
|
258
|
+
attr_accessor :external_id
|
|
259
|
+
|
|
260
|
+
# The author of the content if your account has authors enabled. Requires you to
|
|
261
|
+
# send authorId when submitting content.
|
|
262
|
+
sig do
|
|
263
|
+
params(
|
|
264
|
+
id: String,
|
|
265
|
+
block:
|
|
266
|
+
T.nilable(
|
|
267
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Block::OrHash
|
|
268
|
+
),
|
|
269
|
+
status:
|
|
270
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status::OrSymbol,
|
|
271
|
+
trust_level:
|
|
272
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::TrustLevel::OrHash,
|
|
273
|
+
external_id: T.nilable(String)
|
|
274
|
+
).returns(T.attached_class)
|
|
275
|
+
end
|
|
276
|
+
def self.new(
|
|
277
|
+
# Author ID in Moderation API
|
|
278
|
+
id:,
|
|
279
|
+
# Block or suspension details, if applicable. Null if the author is enabled.
|
|
280
|
+
block:,
|
|
281
|
+
# Current author status
|
|
282
|
+
status:,
|
|
283
|
+
trust_level:,
|
|
284
|
+
# The author's ID from your system
|
|
285
|
+
external_id: nil
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
sig do
|
|
290
|
+
override.returns(
|
|
291
|
+
{
|
|
292
|
+
id: String,
|
|
293
|
+
block:
|
|
294
|
+
T.nilable(
|
|
295
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Block
|
|
296
|
+
),
|
|
297
|
+
status:
|
|
298
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status::TaggedSymbol,
|
|
299
|
+
trust_level:
|
|
300
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::TrustLevel,
|
|
301
|
+
external_id: T.nilable(String)
|
|
302
|
+
}
|
|
303
|
+
)
|
|
304
|
+
end
|
|
305
|
+
def to_hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
class Block < ModerationAPI::Internal::Type::BaseModel
|
|
309
|
+
OrHash =
|
|
310
|
+
T.type_alias do
|
|
311
|
+
T.any(
|
|
312
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Block,
|
|
313
|
+
ModerationAPI::Internal::AnyHash
|
|
314
|
+
)
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# The moderators reason why the author was blocked or suspended.
|
|
318
|
+
sig { returns(T.nilable(String)) }
|
|
319
|
+
attr_accessor :reason
|
|
320
|
+
|
|
321
|
+
# The timestamp until which they are blocked if the author is suspended.
|
|
322
|
+
sig { returns(T.nilable(Float)) }
|
|
323
|
+
attr_accessor :until_
|
|
324
|
+
|
|
325
|
+
# Block or suspension details, if applicable. Null if the author is enabled.
|
|
326
|
+
sig do
|
|
327
|
+
params(reason: T.nilable(String), until_: T.nilable(Float)).returns(
|
|
328
|
+
T.attached_class
|
|
329
|
+
)
|
|
330
|
+
end
|
|
331
|
+
def self.new(
|
|
332
|
+
# The moderators reason why the author was blocked or suspended.
|
|
333
|
+
reason: nil,
|
|
334
|
+
# The timestamp until which they are blocked if the author is suspended.
|
|
335
|
+
until_: nil
|
|
336
|
+
)
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
sig do
|
|
340
|
+
override.returns(
|
|
341
|
+
{ reason: T.nilable(String), until_: T.nilable(Float) }
|
|
342
|
+
)
|
|
343
|
+
end
|
|
344
|
+
def to_hash
|
|
345
|
+
end
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Current author status
|
|
349
|
+
module Status
|
|
350
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
351
|
+
|
|
352
|
+
TaggedSymbol =
|
|
353
|
+
T.type_alias do
|
|
354
|
+
T.all(
|
|
355
|
+
Symbol,
|
|
356
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status
|
|
357
|
+
)
|
|
358
|
+
end
|
|
359
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
360
|
+
|
|
361
|
+
ENABLED =
|
|
362
|
+
T.let(
|
|
363
|
+
:enabled,
|
|
364
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status::TaggedSymbol
|
|
365
|
+
)
|
|
366
|
+
SUSPENDED =
|
|
367
|
+
T.let(
|
|
368
|
+
:suspended,
|
|
369
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status::TaggedSymbol
|
|
370
|
+
)
|
|
371
|
+
BLOCKED =
|
|
372
|
+
T.let(
|
|
373
|
+
:blocked,
|
|
374
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status::TaggedSymbol
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
sig do
|
|
378
|
+
override.returns(
|
|
379
|
+
T::Array[
|
|
380
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::Status::TaggedSymbol
|
|
381
|
+
]
|
|
382
|
+
)
|
|
383
|
+
end
|
|
384
|
+
def self.values
|
|
385
|
+
end
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
class TrustLevel < ModerationAPI::Internal::Type::BaseModel
|
|
389
|
+
OrHash =
|
|
390
|
+
T.type_alias do
|
|
391
|
+
T.any(
|
|
392
|
+
ModerationAPI::Models::ContentSubmitResponse::Author::TrustLevel,
|
|
393
|
+
ModerationAPI::Internal::AnyHash
|
|
394
|
+
)
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# Author trust level (-1, 0, 1, 2, 3, or 4)
|
|
398
|
+
sig { returns(Float) }
|
|
399
|
+
attr_accessor :level
|
|
400
|
+
|
|
401
|
+
# True if the trust level was set manually by a moderator
|
|
402
|
+
sig { returns(T::Boolean) }
|
|
403
|
+
attr_accessor :manual
|
|
404
|
+
|
|
405
|
+
sig do
|
|
406
|
+
params(level: Float, manual: T::Boolean).returns(T.attached_class)
|
|
407
|
+
end
|
|
408
|
+
def self.new(
|
|
409
|
+
# Author trust level (-1, 0, 1, 2, 3, or 4)
|
|
410
|
+
level:,
|
|
411
|
+
# True if the trust level was set manually by a moderator
|
|
412
|
+
manual:
|
|
413
|
+
)
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
sig { override.returns({ level: Float, manual: T::Boolean }) }
|
|
417
|
+
def to_hash
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
class Content < ModerationAPI::Internal::Type::BaseModel
|
|
423
|
+
OrHash =
|
|
424
|
+
T.type_alias do
|
|
425
|
+
T.any(
|
|
426
|
+
ModerationAPI::Models::ContentSubmitResponse::Content,
|
|
427
|
+
ModerationAPI::Internal::AnyHash
|
|
428
|
+
)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# The unique identifier for the content. Either the contentId provided by you or
|
|
432
|
+
# an autogenerated ID.
|
|
433
|
+
sig { returns(String) }
|
|
434
|
+
attr_accessor :id
|
|
435
|
+
|
|
436
|
+
# Whether any values have been masked.
|
|
437
|
+
sig { returns(T::Boolean) }
|
|
438
|
+
attr_accessor :masked
|
|
439
|
+
|
|
440
|
+
# The modified content, if any.
|
|
441
|
+
sig do
|
|
442
|
+
returns(
|
|
443
|
+
T.nilable(
|
|
444
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::Variants
|
|
445
|
+
)
|
|
446
|
+
)
|
|
447
|
+
end
|
|
448
|
+
attr_accessor :modified
|
|
449
|
+
|
|
450
|
+
# Potentially modified content.
|
|
451
|
+
sig do
|
|
452
|
+
params(
|
|
453
|
+
id: String,
|
|
454
|
+
masked: T::Boolean,
|
|
455
|
+
modified:
|
|
456
|
+
T.nilable(
|
|
457
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::Variants
|
|
458
|
+
)
|
|
459
|
+
).returns(T.attached_class)
|
|
460
|
+
end
|
|
461
|
+
def self.new(
|
|
462
|
+
# The unique identifier for the content. Either the contentId provided by you or
|
|
463
|
+
# an autogenerated ID.
|
|
464
|
+
id:,
|
|
465
|
+
# Whether any values have been masked.
|
|
466
|
+
masked:,
|
|
467
|
+
# The modified content, if any.
|
|
468
|
+
modified:
|
|
469
|
+
)
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
sig do
|
|
473
|
+
override.returns(
|
|
474
|
+
{
|
|
475
|
+
id: String,
|
|
476
|
+
masked: T::Boolean,
|
|
477
|
+
modified:
|
|
478
|
+
T.nilable(
|
|
479
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::Variants
|
|
480
|
+
)
|
|
481
|
+
}
|
|
482
|
+
)
|
|
483
|
+
end
|
|
484
|
+
def to_hash
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
# The modified content, if any.
|
|
488
|
+
module Modified
|
|
489
|
+
extend ModerationAPI::Internal::Type::Union
|
|
490
|
+
|
|
491
|
+
Variants =
|
|
492
|
+
T.type_alias do
|
|
493
|
+
T.any(
|
|
494
|
+
String,
|
|
495
|
+
T::Hash[
|
|
496
|
+
Symbol,
|
|
497
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Variants
|
|
498
|
+
]
|
|
499
|
+
)
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
# Text
|
|
503
|
+
module UnionMember1
|
|
504
|
+
extend ModerationAPI::Internal::Type::Union
|
|
505
|
+
|
|
506
|
+
Variants =
|
|
507
|
+
T.type_alias do
|
|
508
|
+
T.any(
|
|
509
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Text,
|
|
510
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Image,
|
|
511
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Video,
|
|
512
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Audio
|
|
513
|
+
)
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
class Text < ModerationAPI::Internal::Type::BaseModel
|
|
517
|
+
OrHash =
|
|
518
|
+
T.type_alias do
|
|
519
|
+
T.any(
|
|
520
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Text,
|
|
521
|
+
ModerationAPI::Internal::AnyHash
|
|
522
|
+
)
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
# The content text
|
|
526
|
+
sig { returns(String) }
|
|
527
|
+
attr_accessor :text
|
|
528
|
+
|
|
529
|
+
sig { returns(Symbol) }
|
|
530
|
+
attr_accessor :type
|
|
531
|
+
|
|
532
|
+
# Text
|
|
533
|
+
sig do
|
|
534
|
+
params(text: String, type: Symbol).returns(T.attached_class)
|
|
535
|
+
end
|
|
536
|
+
def self.new(
|
|
537
|
+
# The content text
|
|
538
|
+
text:,
|
|
539
|
+
type: :text
|
|
540
|
+
)
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
sig { override.returns({ text: String, type: Symbol }) }
|
|
544
|
+
def to_hash
|
|
545
|
+
end
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
class Image < ModerationAPI::Internal::Type::BaseModel
|
|
549
|
+
OrHash =
|
|
550
|
+
T.type_alias do
|
|
551
|
+
T.any(
|
|
552
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Image,
|
|
553
|
+
ModerationAPI::Internal::AnyHash
|
|
554
|
+
)
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
sig { returns(Symbol) }
|
|
558
|
+
attr_accessor :type
|
|
559
|
+
|
|
560
|
+
# A public URL of the image content
|
|
561
|
+
sig { returns(String) }
|
|
562
|
+
attr_accessor :url
|
|
563
|
+
|
|
564
|
+
# Image
|
|
565
|
+
sig do
|
|
566
|
+
params(url: String, type: Symbol).returns(T.attached_class)
|
|
567
|
+
end
|
|
568
|
+
def self.new(
|
|
569
|
+
# A public URL of the image content
|
|
570
|
+
url:,
|
|
571
|
+
type: :image
|
|
572
|
+
)
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
sig { override.returns({ type: Symbol, url: String }) }
|
|
576
|
+
def to_hash
|
|
577
|
+
end
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
class Video < ModerationAPI::Internal::Type::BaseModel
|
|
581
|
+
OrHash =
|
|
582
|
+
T.type_alias do
|
|
583
|
+
T.any(
|
|
584
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Video,
|
|
585
|
+
ModerationAPI::Internal::AnyHash
|
|
586
|
+
)
|
|
587
|
+
end
|
|
588
|
+
|
|
589
|
+
sig { returns(Symbol) }
|
|
590
|
+
attr_accessor :type
|
|
591
|
+
|
|
592
|
+
# A public URL of the video content
|
|
593
|
+
sig { returns(String) }
|
|
594
|
+
attr_accessor :url
|
|
595
|
+
|
|
596
|
+
# Video
|
|
597
|
+
sig do
|
|
598
|
+
params(url: String, type: Symbol).returns(T.attached_class)
|
|
599
|
+
end
|
|
600
|
+
def self.new(
|
|
601
|
+
# A public URL of the video content
|
|
602
|
+
url:,
|
|
603
|
+
type: :video
|
|
604
|
+
)
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
sig { override.returns({ type: Symbol, url: String }) }
|
|
608
|
+
def to_hash
|
|
609
|
+
end
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
class Audio < ModerationAPI::Internal::Type::BaseModel
|
|
613
|
+
OrHash =
|
|
614
|
+
T.type_alias do
|
|
615
|
+
T.any(
|
|
616
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Audio,
|
|
617
|
+
ModerationAPI::Internal::AnyHash
|
|
618
|
+
)
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
sig { returns(Symbol) }
|
|
622
|
+
attr_accessor :type
|
|
623
|
+
|
|
624
|
+
# The URL of the audio content
|
|
625
|
+
sig { returns(String) }
|
|
626
|
+
attr_accessor :url
|
|
627
|
+
|
|
628
|
+
# Audio
|
|
629
|
+
sig do
|
|
630
|
+
params(url: String, type: Symbol).returns(T.attached_class)
|
|
631
|
+
end
|
|
632
|
+
def self.new(
|
|
633
|
+
# The URL of the audio content
|
|
634
|
+
url:,
|
|
635
|
+
type: :audio
|
|
636
|
+
)
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
sig { override.returns({ type: Symbol, url: String }) }
|
|
640
|
+
def to_hash
|
|
641
|
+
end
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
sig do
|
|
645
|
+
override.returns(
|
|
646
|
+
T::Array[
|
|
647
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1::Variants
|
|
648
|
+
]
|
|
649
|
+
)
|
|
650
|
+
end
|
|
651
|
+
def self.variants
|
|
652
|
+
end
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
sig do
|
|
656
|
+
override.returns(
|
|
657
|
+
T::Array[
|
|
658
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::Variants
|
|
659
|
+
]
|
|
660
|
+
)
|
|
661
|
+
end
|
|
662
|
+
def self.variants
|
|
663
|
+
end
|
|
664
|
+
|
|
665
|
+
UnionMember1Map =
|
|
666
|
+
T.let(
|
|
667
|
+
ModerationAPI::Internal::Type::HashOf[
|
|
668
|
+
union:
|
|
669
|
+
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::UnionMember1
|
|
670
|
+
],
|
|
671
|
+
ModerationAPI::Internal::Type::Converter
|
|
672
|
+
)
|
|
673
|
+
end
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
class Evaluation < ModerationAPI::Internal::Type::BaseModel
|
|
677
|
+
OrHash =
|
|
678
|
+
T.type_alias do
|
|
679
|
+
T.any(
|
|
680
|
+
ModerationAPI::Models::ContentSubmitResponse::Evaluation,
|
|
681
|
+
ModerationAPI::Internal::AnyHash
|
|
682
|
+
)
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# The probability that the content should be flagged.
|
|
686
|
+
sig { returns(Float) }
|
|
687
|
+
attr_accessor :flag_probability
|
|
688
|
+
|
|
689
|
+
# Whether the content was flagged by any policy.
|
|
690
|
+
sig { returns(T::Boolean) }
|
|
691
|
+
attr_accessor :flagged
|
|
692
|
+
|
|
693
|
+
# The severity score of the content. A higher score indicates more severe content.
|
|
694
|
+
sig { returns(Float) }
|
|
695
|
+
attr_accessor :severity_score
|
|
696
|
+
|
|
697
|
+
# Whether the content was flagged for Unicode spoofing.
|
|
698
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
699
|
+
attr_reader :unicode_spoofed
|
|
700
|
+
|
|
701
|
+
sig { params(unicode_spoofed: T::Boolean).void }
|
|
702
|
+
attr_writer :unicode_spoofed
|
|
703
|
+
|
|
704
|
+
# The evaluation of the content after running the channel policies.
|
|
705
|
+
sig do
|
|
706
|
+
params(
|
|
707
|
+
flag_probability: Float,
|
|
708
|
+
flagged: T::Boolean,
|
|
709
|
+
severity_score: Float,
|
|
710
|
+
unicode_spoofed: T::Boolean
|
|
711
|
+
).returns(T.attached_class)
|
|
712
|
+
end
|
|
713
|
+
def self.new(
|
|
714
|
+
# The probability that the content should be flagged.
|
|
715
|
+
flag_probability:,
|
|
716
|
+
# Whether the content was flagged by any policy.
|
|
717
|
+
flagged:,
|
|
718
|
+
# The severity score of the content. A higher score indicates more severe content.
|
|
719
|
+
severity_score:,
|
|
720
|
+
# Whether the content was flagged for Unicode spoofing.
|
|
721
|
+
unicode_spoofed: nil
|
|
722
|
+
)
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
sig do
|
|
726
|
+
override.returns(
|
|
727
|
+
{
|
|
728
|
+
flag_probability: Float,
|
|
729
|
+
flagged: T::Boolean,
|
|
730
|
+
severity_score: Float,
|
|
731
|
+
unicode_spoofed: T::Boolean
|
|
732
|
+
}
|
|
733
|
+
)
|
|
734
|
+
end
|
|
735
|
+
def to_hash
|
|
736
|
+
end
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# Sentiment insight
|
|
740
|
+
module Insight
|
|
741
|
+
extend ModerationAPI::Internal::Type::Union
|
|
742
|
+
|
|
743
|
+
Variants =
|
|
744
|
+
T.type_alias do
|
|
745
|
+
T.any(
|
|
746
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight,
|
|
747
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::LanguageInsight
|
|
748
|
+
)
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
class SentimentInsight < ModerationAPI::Internal::Type::BaseModel
|
|
752
|
+
OrHash =
|
|
753
|
+
T.type_alias do
|
|
754
|
+
T.any(
|
|
755
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight,
|
|
756
|
+
ModerationAPI::Internal::AnyHash
|
|
757
|
+
)
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
sig { returns(Symbol) }
|
|
761
|
+
attr_accessor :id
|
|
762
|
+
|
|
763
|
+
sig { returns(Float) }
|
|
764
|
+
attr_accessor :probability
|
|
765
|
+
|
|
766
|
+
sig { returns(Symbol) }
|
|
767
|
+
attr_accessor :type
|
|
768
|
+
|
|
769
|
+
sig do
|
|
770
|
+
returns(
|
|
771
|
+
T.nilable(
|
|
772
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value::TaggedSymbol
|
|
773
|
+
)
|
|
774
|
+
)
|
|
775
|
+
end
|
|
776
|
+
attr_accessor :value
|
|
777
|
+
|
|
778
|
+
# Sentiment insight
|
|
779
|
+
sig do
|
|
780
|
+
params(
|
|
781
|
+
probability: Float,
|
|
782
|
+
value:
|
|
783
|
+
T.nilable(
|
|
784
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value::OrSymbol
|
|
785
|
+
),
|
|
786
|
+
id: Symbol,
|
|
787
|
+
type: Symbol
|
|
788
|
+
).returns(T.attached_class)
|
|
789
|
+
end
|
|
790
|
+
def self.new(probability:, value:, id: :sentiment, type: :insight)
|
|
791
|
+
end
|
|
792
|
+
|
|
793
|
+
sig do
|
|
794
|
+
override.returns(
|
|
795
|
+
{
|
|
796
|
+
id: Symbol,
|
|
797
|
+
probability: Float,
|
|
798
|
+
type: Symbol,
|
|
799
|
+
value:
|
|
800
|
+
T.nilable(
|
|
801
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value::TaggedSymbol
|
|
802
|
+
)
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
end
|
|
806
|
+
def to_hash
|
|
807
|
+
end
|
|
808
|
+
|
|
809
|
+
module Value
|
|
810
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
811
|
+
|
|
812
|
+
TaggedSymbol =
|
|
813
|
+
T.type_alias do
|
|
814
|
+
T.all(
|
|
815
|
+
Symbol,
|
|
816
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value
|
|
817
|
+
)
|
|
818
|
+
end
|
|
819
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
820
|
+
|
|
821
|
+
POSITIVE =
|
|
822
|
+
T.let(
|
|
823
|
+
:positive,
|
|
824
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value::TaggedSymbol
|
|
825
|
+
)
|
|
826
|
+
NEUTRAL =
|
|
827
|
+
T.let(
|
|
828
|
+
:neutral,
|
|
829
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value::TaggedSymbol
|
|
830
|
+
)
|
|
831
|
+
NEGATIVE =
|
|
832
|
+
T.let(
|
|
833
|
+
:negative,
|
|
834
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value::TaggedSymbol
|
|
835
|
+
)
|
|
836
|
+
|
|
837
|
+
sig do
|
|
838
|
+
override.returns(
|
|
839
|
+
T::Array[
|
|
840
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight::Value::TaggedSymbol
|
|
841
|
+
]
|
|
842
|
+
)
|
|
843
|
+
end
|
|
844
|
+
def self.values
|
|
845
|
+
end
|
|
846
|
+
end
|
|
847
|
+
end
|
|
848
|
+
|
|
849
|
+
class LanguageInsight < ModerationAPI::Internal::Type::BaseModel
|
|
850
|
+
OrHash =
|
|
851
|
+
T.type_alias do
|
|
852
|
+
T.any(
|
|
853
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::LanguageInsight,
|
|
854
|
+
ModerationAPI::Internal::AnyHash
|
|
855
|
+
)
|
|
856
|
+
end
|
|
857
|
+
|
|
858
|
+
sig { returns(Symbol) }
|
|
859
|
+
attr_accessor :id
|
|
860
|
+
|
|
861
|
+
sig { returns(Float) }
|
|
862
|
+
attr_accessor :probability
|
|
863
|
+
|
|
864
|
+
sig { returns(Symbol) }
|
|
865
|
+
attr_accessor :type
|
|
866
|
+
|
|
867
|
+
sig { returns(T.nilable(String)) }
|
|
868
|
+
attr_accessor :value
|
|
869
|
+
|
|
870
|
+
# Language insight
|
|
871
|
+
sig do
|
|
872
|
+
params(
|
|
873
|
+
probability: Float,
|
|
874
|
+
value: T.nilable(String),
|
|
875
|
+
id: Symbol,
|
|
876
|
+
type: Symbol
|
|
877
|
+
).returns(T.attached_class)
|
|
878
|
+
end
|
|
879
|
+
def self.new(probability:, value:, id: :language, type: :insight)
|
|
880
|
+
end
|
|
881
|
+
|
|
882
|
+
sig do
|
|
883
|
+
override.returns(
|
|
884
|
+
{
|
|
885
|
+
id: Symbol,
|
|
886
|
+
probability: Float,
|
|
887
|
+
type: Symbol,
|
|
888
|
+
value: T.nilable(String)
|
|
889
|
+
}
|
|
890
|
+
)
|
|
891
|
+
end
|
|
892
|
+
def to_hash
|
|
893
|
+
end
|
|
894
|
+
end
|
|
895
|
+
|
|
896
|
+
sig do
|
|
897
|
+
override.returns(
|
|
898
|
+
T::Array[
|
|
899
|
+
ModerationAPI::Models::ContentSubmitResponse::Insight::Variants
|
|
900
|
+
]
|
|
901
|
+
)
|
|
902
|
+
end
|
|
903
|
+
def self.variants
|
|
904
|
+
end
|
|
905
|
+
end
|
|
906
|
+
|
|
907
|
+
class Meta < ModerationAPI::Internal::Type::BaseModel
|
|
908
|
+
OrHash =
|
|
909
|
+
T.type_alias do
|
|
910
|
+
T.any(
|
|
911
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta,
|
|
912
|
+
ModerationAPI::Internal::AnyHash
|
|
913
|
+
)
|
|
914
|
+
end
|
|
915
|
+
|
|
916
|
+
# The unique key of the channel where the content was handled. Either the channel
|
|
917
|
+
# provided by you or automatically routed.
|
|
918
|
+
sig { returns(String) }
|
|
919
|
+
attr_accessor :channel_key
|
|
920
|
+
|
|
921
|
+
sig do
|
|
922
|
+
returns(
|
|
923
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta::Status::TaggedSymbol
|
|
924
|
+
)
|
|
925
|
+
end
|
|
926
|
+
attr_accessor :status
|
|
927
|
+
|
|
928
|
+
sig { returns(Float) }
|
|
929
|
+
attr_accessor :timestamp
|
|
930
|
+
|
|
931
|
+
sig { returns(Float) }
|
|
932
|
+
attr_accessor :usage
|
|
933
|
+
|
|
934
|
+
sig { returns(T.nilable(String)) }
|
|
935
|
+
attr_reader :processing_time
|
|
936
|
+
|
|
937
|
+
sig { params(processing_time: String).void }
|
|
938
|
+
attr_writer :processing_time
|
|
939
|
+
|
|
940
|
+
# Metadata about the moderation request
|
|
941
|
+
sig do
|
|
942
|
+
params(
|
|
943
|
+
channel_key: String,
|
|
944
|
+
status:
|
|
945
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta::Status::OrSymbol,
|
|
946
|
+
timestamp: Float,
|
|
947
|
+
usage: Float,
|
|
948
|
+
processing_time: String
|
|
949
|
+
).returns(T.attached_class)
|
|
950
|
+
end
|
|
951
|
+
def self.new(
|
|
952
|
+
# The unique key of the channel where the content was handled. Either the channel
|
|
953
|
+
# provided by you or automatically routed.
|
|
954
|
+
channel_key:,
|
|
955
|
+
status:,
|
|
956
|
+
timestamp:,
|
|
957
|
+
usage:,
|
|
958
|
+
processing_time: nil
|
|
959
|
+
)
|
|
960
|
+
end
|
|
961
|
+
|
|
962
|
+
sig do
|
|
963
|
+
override.returns(
|
|
964
|
+
{
|
|
965
|
+
channel_key: String,
|
|
966
|
+
status:
|
|
967
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta::Status::TaggedSymbol,
|
|
968
|
+
timestamp: Float,
|
|
969
|
+
usage: Float,
|
|
970
|
+
processing_time: String
|
|
971
|
+
}
|
|
972
|
+
)
|
|
973
|
+
end
|
|
974
|
+
def to_hash
|
|
975
|
+
end
|
|
976
|
+
|
|
977
|
+
module Status
|
|
978
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
979
|
+
|
|
980
|
+
TaggedSymbol =
|
|
981
|
+
T.type_alias do
|
|
982
|
+
T.all(
|
|
983
|
+
Symbol,
|
|
984
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta::Status
|
|
985
|
+
)
|
|
986
|
+
end
|
|
987
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
988
|
+
|
|
989
|
+
SUCCESS =
|
|
990
|
+
T.let(
|
|
991
|
+
:success,
|
|
992
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta::Status::TaggedSymbol
|
|
993
|
+
)
|
|
994
|
+
PARTIAL_SUCCESS =
|
|
995
|
+
T.let(
|
|
996
|
+
:partial_success,
|
|
997
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta::Status::TaggedSymbol
|
|
998
|
+
)
|
|
999
|
+
|
|
1000
|
+
sig do
|
|
1001
|
+
override.returns(
|
|
1002
|
+
T::Array[
|
|
1003
|
+
ModerationAPI::Models::ContentSubmitResponse::Meta::Status::TaggedSymbol
|
|
1004
|
+
]
|
|
1005
|
+
)
|
|
1006
|
+
end
|
|
1007
|
+
def self.values
|
|
1008
|
+
end
|
|
1009
|
+
end
|
|
1010
|
+
end
|
|
1011
|
+
|
|
1012
|
+
# Policy output schema.
|
|
1013
|
+
module Policy
|
|
1014
|
+
extend ModerationAPI::Internal::Type::Union
|
|
1015
|
+
|
|
1016
|
+
Variants =
|
|
1017
|
+
T.type_alias do
|
|
1018
|
+
T.any(
|
|
1019
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput,
|
|
1020
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput
|
|
1021
|
+
)
|
|
1022
|
+
end
|
|
1023
|
+
|
|
1024
|
+
class ClassifierOutput < ModerationAPI::Internal::Type::BaseModel
|
|
1025
|
+
OrHash =
|
|
1026
|
+
T.type_alias do
|
|
1027
|
+
T.any(
|
|
1028
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput,
|
|
1029
|
+
ModerationAPI::Internal::AnyHash
|
|
1030
|
+
)
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
# The unique identifier for the classifier output.
|
|
1034
|
+
sig { returns(String) }
|
|
1035
|
+
attr_accessor :id
|
|
1036
|
+
|
|
1037
|
+
sig { returns(T::Boolean) }
|
|
1038
|
+
attr_accessor :flagged
|
|
1039
|
+
|
|
1040
|
+
sig { returns(Float) }
|
|
1041
|
+
attr_accessor :probability
|
|
1042
|
+
|
|
1043
|
+
sig { returns(Symbol) }
|
|
1044
|
+
attr_accessor :type
|
|
1045
|
+
|
|
1046
|
+
# The keys of the flagged fields if submitting an object.
|
|
1047
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1048
|
+
attr_reader :flagged_fields
|
|
1049
|
+
|
|
1050
|
+
sig { params(flagged_fields: T::Array[String]).void }
|
|
1051
|
+
attr_writer :flagged_fields
|
|
1052
|
+
|
|
1053
|
+
sig do
|
|
1054
|
+
returns(
|
|
1055
|
+
T.nilable(
|
|
1056
|
+
T::Array[
|
|
1057
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label
|
|
1058
|
+
]
|
|
1059
|
+
)
|
|
1060
|
+
)
|
|
1061
|
+
end
|
|
1062
|
+
attr_reader :labels
|
|
1063
|
+
|
|
1064
|
+
sig do
|
|
1065
|
+
params(
|
|
1066
|
+
labels:
|
|
1067
|
+
T::Array[
|
|
1068
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label::OrHash
|
|
1069
|
+
]
|
|
1070
|
+
).void
|
|
1071
|
+
end
|
|
1072
|
+
attr_writer :labels
|
|
1073
|
+
|
|
1074
|
+
# Classifier policy.
|
|
1075
|
+
sig do
|
|
1076
|
+
params(
|
|
1077
|
+
id: String,
|
|
1078
|
+
flagged: T::Boolean,
|
|
1079
|
+
probability: Float,
|
|
1080
|
+
flagged_fields: T::Array[String],
|
|
1081
|
+
labels:
|
|
1082
|
+
T::Array[
|
|
1083
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label::OrHash
|
|
1084
|
+
],
|
|
1085
|
+
type: Symbol
|
|
1086
|
+
).returns(T.attached_class)
|
|
1087
|
+
end
|
|
1088
|
+
def self.new(
|
|
1089
|
+
# The unique identifier for the classifier output.
|
|
1090
|
+
id:,
|
|
1091
|
+
flagged:,
|
|
1092
|
+
probability:,
|
|
1093
|
+
# The keys of the flagged fields if submitting an object.
|
|
1094
|
+
flagged_fields: nil,
|
|
1095
|
+
labels: nil,
|
|
1096
|
+
type: :classifier
|
|
1097
|
+
)
|
|
1098
|
+
end
|
|
1099
|
+
|
|
1100
|
+
sig do
|
|
1101
|
+
override.returns(
|
|
1102
|
+
{
|
|
1103
|
+
id: String,
|
|
1104
|
+
flagged: T::Boolean,
|
|
1105
|
+
probability: Float,
|
|
1106
|
+
type: Symbol,
|
|
1107
|
+
flagged_fields: T::Array[String],
|
|
1108
|
+
labels:
|
|
1109
|
+
T::Array[
|
|
1110
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label
|
|
1111
|
+
]
|
|
1112
|
+
}
|
|
1113
|
+
)
|
|
1114
|
+
end
|
|
1115
|
+
def to_hash
|
|
1116
|
+
end
|
|
1117
|
+
|
|
1118
|
+
class Label < ModerationAPI::Internal::Type::BaseModel
|
|
1119
|
+
OrHash =
|
|
1120
|
+
T.type_alias do
|
|
1121
|
+
T.any(
|
|
1122
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label,
|
|
1123
|
+
ModerationAPI::Internal::AnyHash
|
|
1124
|
+
)
|
|
1125
|
+
end
|
|
1126
|
+
|
|
1127
|
+
sig { returns(String) }
|
|
1128
|
+
attr_accessor :id
|
|
1129
|
+
|
|
1130
|
+
sig { returns(T::Boolean) }
|
|
1131
|
+
attr_accessor :flagged
|
|
1132
|
+
|
|
1133
|
+
sig { returns(Float) }
|
|
1134
|
+
attr_accessor :probability
|
|
1135
|
+
|
|
1136
|
+
sig do
|
|
1137
|
+
params(
|
|
1138
|
+
id: String,
|
|
1139
|
+
flagged: T::Boolean,
|
|
1140
|
+
probability: Float
|
|
1141
|
+
).returns(T.attached_class)
|
|
1142
|
+
end
|
|
1143
|
+
def self.new(id:, flagged:, probability:)
|
|
1144
|
+
end
|
|
1145
|
+
|
|
1146
|
+
sig do
|
|
1147
|
+
override.returns(
|
|
1148
|
+
{ id: String, flagged: T::Boolean, probability: Float }
|
|
1149
|
+
)
|
|
1150
|
+
end
|
|
1151
|
+
def to_hash
|
|
1152
|
+
end
|
|
1153
|
+
end
|
|
1154
|
+
end
|
|
1155
|
+
|
|
1156
|
+
class EntityMatcherOutput < ModerationAPI::Internal::Type::BaseModel
|
|
1157
|
+
OrHash =
|
|
1158
|
+
T.type_alias do
|
|
1159
|
+
T.any(
|
|
1160
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput,
|
|
1161
|
+
ModerationAPI::Internal::AnyHash
|
|
1162
|
+
)
|
|
1163
|
+
end
|
|
1164
|
+
|
|
1165
|
+
sig { returns(String) }
|
|
1166
|
+
attr_accessor :id
|
|
1167
|
+
|
|
1168
|
+
sig { returns(T::Boolean) }
|
|
1169
|
+
attr_accessor :flagged
|
|
1170
|
+
|
|
1171
|
+
sig do
|
|
1172
|
+
returns(
|
|
1173
|
+
T::Array[
|
|
1174
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match
|
|
1175
|
+
]
|
|
1176
|
+
)
|
|
1177
|
+
end
|
|
1178
|
+
attr_accessor :matches
|
|
1179
|
+
|
|
1180
|
+
sig { returns(Float) }
|
|
1181
|
+
attr_accessor :probability
|
|
1182
|
+
|
|
1183
|
+
sig { returns(Symbol) }
|
|
1184
|
+
attr_accessor :type
|
|
1185
|
+
|
|
1186
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1187
|
+
attr_reader :flagged_fields
|
|
1188
|
+
|
|
1189
|
+
sig { params(flagged_fields: T::Array[String]).void }
|
|
1190
|
+
attr_writer :flagged_fields
|
|
1191
|
+
|
|
1192
|
+
# Entity matcher policy.
|
|
1193
|
+
sig do
|
|
1194
|
+
params(
|
|
1195
|
+
id: String,
|
|
1196
|
+
flagged: T::Boolean,
|
|
1197
|
+
matches:
|
|
1198
|
+
T::Array[
|
|
1199
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::OrHash
|
|
1200
|
+
],
|
|
1201
|
+
probability: Float,
|
|
1202
|
+
flagged_fields: T::Array[String],
|
|
1203
|
+
type: Symbol
|
|
1204
|
+
).returns(T.attached_class)
|
|
1205
|
+
end
|
|
1206
|
+
def self.new(
|
|
1207
|
+
id:,
|
|
1208
|
+
flagged:,
|
|
1209
|
+
matches:,
|
|
1210
|
+
probability:,
|
|
1211
|
+
flagged_fields: nil,
|
|
1212
|
+
type: :entity_matcher
|
|
1213
|
+
)
|
|
1214
|
+
end
|
|
1215
|
+
|
|
1216
|
+
sig do
|
|
1217
|
+
override.returns(
|
|
1218
|
+
{
|
|
1219
|
+
id: String,
|
|
1220
|
+
flagged: T::Boolean,
|
|
1221
|
+
matches:
|
|
1222
|
+
T::Array[
|
|
1223
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match
|
|
1224
|
+
],
|
|
1225
|
+
probability: Float,
|
|
1226
|
+
type: Symbol,
|
|
1227
|
+
flagged_fields: T::Array[String]
|
|
1228
|
+
}
|
|
1229
|
+
)
|
|
1230
|
+
end
|
|
1231
|
+
def to_hash
|
|
1232
|
+
end
|
|
1233
|
+
|
|
1234
|
+
class Match < ModerationAPI::Internal::Type::BaseModel
|
|
1235
|
+
OrHash =
|
|
1236
|
+
T.type_alias do
|
|
1237
|
+
T.any(
|
|
1238
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match,
|
|
1239
|
+
ModerationAPI::Internal::AnyHash
|
|
1240
|
+
)
|
|
1241
|
+
end
|
|
1242
|
+
|
|
1243
|
+
sig { returns(String) }
|
|
1244
|
+
attr_accessor :match
|
|
1245
|
+
|
|
1246
|
+
sig { returns(Float) }
|
|
1247
|
+
attr_accessor :probability
|
|
1248
|
+
|
|
1249
|
+
sig { returns(T::Array[Integer]) }
|
|
1250
|
+
attr_accessor :span
|
|
1251
|
+
|
|
1252
|
+
sig do
|
|
1253
|
+
params(
|
|
1254
|
+
match: String,
|
|
1255
|
+
probability: Float,
|
|
1256
|
+
span: T::Array[Integer]
|
|
1257
|
+
).returns(T.attached_class)
|
|
1258
|
+
end
|
|
1259
|
+
def self.new(match:, probability:, span:)
|
|
1260
|
+
end
|
|
1261
|
+
|
|
1262
|
+
sig do
|
|
1263
|
+
override.returns(
|
|
1264
|
+
{ match: String, probability: Float, span: T::Array[Integer] }
|
|
1265
|
+
)
|
|
1266
|
+
end
|
|
1267
|
+
def to_hash
|
|
1268
|
+
end
|
|
1269
|
+
end
|
|
1270
|
+
end
|
|
1271
|
+
|
|
1272
|
+
sig do
|
|
1273
|
+
override.returns(
|
|
1274
|
+
T::Array[
|
|
1275
|
+
ModerationAPI::Models::ContentSubmitResponse::Policy::Variants
|
|
1276
|
+
]
|
|
1277
|
+
)
|
|
1278
|
+
end
|
|
1279
|
+
def self.variants
|
|
1280
|
+
end
|
|
1281
|
+
end
|
|
1282
|
+
|
|
1283
|
+
class Recommendation < ModerationAPI::Internal::Type::BaseModel
|
|
1284
|
+
OrHash =
|
|
1285
|
+
T.type_alias do
|
|
1286
|
+
T.any(
|
|
1287
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation,
|
|
1288
|
+
ModerationAPI::Internal::AnyHash
|
|
1289
|
+
)
|
|
1290
|
+
end
|
|
1291
|
+
|
|
1292
|
+
# The action to take based on the recommendation
|
|
1293
|
+
sig do
|
|
1294
|
+
returns(
|
|
1295
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action::TaggedSymbol
|
|
1296
|
+
)
|
|
1297
|
+
end
|
|
1298
|
+
attr_accessor :action
|
|
1299
|
+
|
|
1300
|
+
# The reason code for the recommendation. Can be used to display a reason to the
|
|
1301
|
+
# user.
|
|
1302
|
+
sig do
|
|
1303
|
+
returns(
|
|
1304
|
+
T::Array[
|
|
1305
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1306
|
+
]
|
|
1307
|
+
)
|
|
1308
|
+
end
|
|
1309
|
+
attr_accessor :reason_codes
|
|
1310
|
+
|
|
1311
|
+
# The recommendation for the content based on the evaluation.
|
|
1312
|
+
sig do
|
|
1313
|
+
params(
|
|
1314
|
+
action:
|
|
1315
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action::OrSymbol,
|
|
1316
|
+
reason_codes:
|
|
1317
|
+
T::Array[
|
|
1318
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::OrSymbol
|
|
1319
|
+
]
|
|
1320
|
+
).returns(T.attached_class)
|
|
1321
|
+
end
|
|
1322
|
+
def self.new(
|
|
1323
|
+
# The action to take based on the recommendation
|
|
1324
|
+
action:,
|
|
1325
|
+
# The reason code for the recommendation. Can be used to display a reason to the
|
|
1326
|
+
# user.
|
|
1327
|
+
reason_codes:
|
|
1328
|
+
)
|
|
1329
|
+
end
|
|
1330
|
+
|
|
1331
|
+
sig do
|
|
1332
|
+
override.returns(
|
|
1333
|
+
{
|
|
1334
|
+
action:
|
|
1335
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action::TaggedSymbol,
|
|
1336
|
+
reason_codes:
|
|
1337
|
+
T::Array[
|
|
1338
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1339
|
+
]
|
|
1340
|
+
}
|
|
1341
|
+
)
|
|
1342
|
+
end
|
|
1343
|
+
def to_hash
|
|
1344
|
+
end
|
|
1345
|
+
|
|
1346
|
+
# The action to take based on the recommendation
|
|
1347
|
+
module Action
|
|
1348
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
1349
|
+
|
|
1350
|
+
TaggedSymbol =
|
|
1351
|
+
T.type_alias do
|
|
1352
|
+
T.all(
|
|
1353
|
+
Symbol,
|
|
1354
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action
|
|
1355
|
+
)
|
|
1356
|
+
end
|
|
1357
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1358
|
+
|
|
1359
|
+
REVIEW =
|
|
1360
|
+
T.let(
|
|
1361
|
+
:review,
|
|
1362
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action::TaggedSymbol
|
|
1363
|
+
)
|
|
1364
|
+
ALLOW =
|
|
1365
|
+
T.let(
|
|
1366
|
+
:allow,
|
|
1367
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action::TaggedSymbol
|
|
1368
|
+
)
|
|
1369
|
+
REJECT =
|
|
1370
|
+
T.let(
|
|
1371
|
+
:reject,
|
|
1372
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action::TaggedSymbol
|
|
1373
|
+
)
|
|
1374
|
+
|
|
1375
|
+
sig do
|
|
1376
|
+
override.returns(
|
|
1377
|
+
T::Array[
|
|
1378
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action::TaggedSymbol
|
|
1379
|
+
]
|
|
1380
|
+
)
|
|
1381
|
+
end
|
|
1382
|
+
def self.values
|
|
1383
|
+
end
|
|
1384
|
+
end
|
|
1385
|
+
|
|
1386
|
+
module ReasonCode
|
|
1387
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
1388
|
+
|
|
1389
|
+
TaggedSymbol =
|
|
1390
|
+
T.type_alias do
|
|
1391
|
+
T.all(
|
|
1392
|
+
Symbol,
|
|
1393
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode
|
|
1394
|
+
)
|
|
1395
|
+
end
|
|
1396
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1397
|
+
|
|
1398
|
+
SEVERITY_REJECT =
|
|
1399
|
+
T.let(
|
|
1400
|
+
:severity_reject,
|
|
1401
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1402
|
+
)
|
|
1403
|
+
SEVERITY_REVIEW =
|
|
1404
|
+
T.let(
|
|
1405
|
+
:severity_review,
|
|
1406
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1407
|
+
)
|
|
1408
|
+
AUTHOR_BLOCK =
|
|
1409
|
+
T.let(
|
|
1410
|
+
:author_block,
|
|
1411
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1412
|
+
)
|
|
1413
|
+
DRY_RUN =
|
|
1414
|
+
T.let(
|
|
1415
|
+
:dry_run,
|
|
1416
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1417
|
+
)
|
|
1418
|
+
|
|
1419
|
+
sig do
|
|
1420
|
+
override.returns(
|
|
1421
|
+
T::Array[
|
|
1422
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1423
|
+
]
|
|
1424
|
+
)
|
|
1425
|
+
end
|
|
1426
|
+
def self.values
|
|
1427
|
+
end
|
|
1428
|
+
end
|
|
1429
|
+
end
|
|
1430
|
+
|
|
1431
|
+
class Error < ModerationAPI::Internal::Type::BaseModel
|
|
1432
|
+
OrHash =
|
|
1433
|
+
T.type_alias do
|
|
1434
|
+
T.any(
|
|
1435
|
+
ModerationAPI::Models::ContentSubmitResponse::Error,
|
|
1436
|
+
ModerationAPI::Internal::AnyHash
|
|
1437
|
+
)
|
|
1438
|
+
end
|
|
1439
|
+
|
|
1440
|
+
sig { returns(String) }
|
|
1441
|
+
attr_accessor :id
|
|
1442
|
+
|
|
1443
|
+
sig { returns(String) }
|
|
1444
|
+
attr_accessor :message
|
|
1445
|
+
|
|
1446
|
+
sig { params(id: String, message: String).returns(T.attached_class) }
|
|
1447
|
+
def self.new(id:, message:)
|
|
1448
|
+
end
|
|
1449
|
+
|
|
1450
|
+
sig { override.returns({ id: String, message: String }) }
|
|
1451
|
+
def to_hash
|
|
1452
|
+
end
|
|
1453
|
+
end
|
|
1454
|
+
end
|
|
1455
|
+
end
|
|
1456
|
+
end
|