NAME
Google::Cloud::Discoveryengine::V1beta::Safety - Compiled Protocol Buffers messages for google/cloud/discoveryengine/v1beta/safety.proto
SYNOPSIS
use Google::Cloud::Discoveryengine::V1beta::Safety;
my $msg = Google::Cloud::Discoveryengine::V1beta::Safety::SafetyRating->new({
category => $category,
probability => $probability,
probability_score => $probability_score,
severity => $severity,
});
# Read or update a field
my $val = $msg->category();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Discoveryengine::V1beta::Safety::SafetyRating->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/discoveryengine/v1beta/safety.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Discoveryengine::V1beta::Safety::SafetyRating
Safety rating corresponding to the generated content.
Inherits from Protobuf::Message.
Accessors
$msg->category()/$msg->category($value)Type:
Enum(Google::Cloud::Discoveryengine::V1beta::HarmCategory)Output only. Harm category.
$msg->probability()/$msg->probability($value)Type:
Enum(Google::Cloud::Discoveryengine::V1beta::SafetyRating::HarmProbability)Output only. Harm probability levels in the content.
$msg->probability_score()/$msg->probability_score($value)Type:
FloatOutput only. Harm probability score.
$msg->severity()/$msg->severity($value)Type:
Enum(Google::Cloud::Discoveryengine::V1beta::SafetyRating::HarmSeverity)Output only. Harm severity levels in the content.
$msg->severity_score()/$msg->severity_score($value)Type:
FloatOutput only. Harm severity score.
$msg->blocked()/$msg->blocked($value)Type:
BoolOutput only. Indicates whether the content was filtered out because of this rating.
Enum: SafetyRating::HarmProbability
HARM_PROBABILITY_UNSPECIFIED=>0NEGLIGIBLE=>1LOW=>2MEDIUM=>3HIGH=>4
Enum: SafetyRating::HarmSeverity
HARM_SEVERITY_UNSPECIFIED=>0HARM_SEVERITY_NEGLIGIBLE=>1HARM_SEVERITY_LOW=>2HARM_SEVERITY_MEDIUM=>3HARM_SEVERITY_HIGH=>4
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Discoveryengine::V1beta::Safety::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.