Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::SafetyRating (v2.4.0)
Stay organized with collections
Save and categorize content based on your preferences.
Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::SafetyRating.
Safety rating corresponding to the generated content.
Extended By
-
Google::Protobuf::MessageExts::ClassMethods
Includes
-
Google::Protobuf::MessageExts
Methods
#blocked
def blocked() -> ::Boolean
Returns
-
(::Boolean) — Output only. Indicates whether the content was filtered out because of this
rating.
#category
def category() -> ::Google::Cloud::DiscoveryEngine::V1::HarmCategory
#probability
def probability() -> ::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmProbability
#probability_score
def probability_score() -> ::Float
Returns
-
(::Float) — Output only. Harm probability score.
#severity
def severity() -> ::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmSeverity
#severity_score
def severity_score() -> ::Float
Returns
-
(::Float) — Output only. Harm severity score.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::SafetyRating (v2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [2.3.1](/ruby/docs/reference/google-cloud-discovery_engine-v1/2.3.1/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [2.2.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/2.2.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [2.1.1](/ruby/docs/reference/google-cloud-discovery_engine-v1/2.1.1/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [2.0.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/2.0.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [1.5.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/1.5.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [1.4.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/1.4.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [1.3.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/1.3.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [1.2.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/1.2.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [1.1.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/1.1.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [1.0.2](/ruby/docs/reference/google-cloud-discovery_engine-v1/1.0.2/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.9.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.9.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.8.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.8.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.7.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.7.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.6.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.6.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.5.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.5.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.4.2](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.4.2/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.3.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.3.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.2.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.2.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating)\n- [0.1.0](/ruby/docs/reference/google-cloud-discovery_engine-v1/0.1.0/Google-Cloud-DiscoveryEngine-V1-SafetyRating) \nReference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::SafetyRating.\n\nSafety rating corresponding to the generated content. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #blocked\n\n def blocked() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Output only. Indicates whether the content was filtered out because of this rating.\n\n### #category\n\n def category() -\u003e ::Google::Cloud::DiscoveryEngine::V1::HarmCategory\n\n**Returns**\n\n- ([::Google::Cloud::DiscoveryEngine::V1::HarmCategory](./Google-Cloud-DiscoveryEngine-V1-HarmCategory)) --- Output only. Harm category.\n\n### #probability\n\n def probability() -\u003e ::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmProbability\n\n**Returns**\n\n- ([::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmProbability](./Google-Cloud-DiscoveryEngine-V1-SafetyRating-HarmProbability)) --- Output only. Harm probability levels in the content.\n\n### #probability_score\n\n def probability_score() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- Output only. Harm probability score.\n\n### #severity\n\n def severity() -\u003e ::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmSeverity\n\n**Returns**\n\n- ([::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmSeverity](./Google-Cloud-DiscoveryEngine-V1-SafetyRating-HarmSeverity)) --- Output only. Harm severity levels in the content.\n\n### #severity_score\n\n def severity_score() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- Output only. Harm severity score."]]