NAME
Google::Cloud::Retail::V2::Safety - Compiled Protocol Buffers messages for google/cloud/retail/v2/safety.proto
SYNOPSIS
use Google::Cloud::Retail::V2::Safety;
my $msg = Google::Cloud::Retail::V2::Safety::SafetySetting->new({
category => $category,
threshold => $threshold,
method => $method,
});
# Read or update a field
my $val = $msg->category();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Retail::V2::Safety::SafetySetting->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/retail/v2/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::Retail::V2::Safety::SafetySetting
Safety settings.
Inherits from Protobuf::Message.
Accessors
$msg->category()/$msg->category($value)Type:
Enum(Google::Cloud::Retail::V2::HarmCategory)Harm category.
$msg->threshold()/$msg->threshold($value)Type:
Enum(Google::Cloud::Retail::V2::SafetySetting::HarmBlockThreshold)The harm block threshold.
$msg->method()/$msg->method($value)Type:
Enum(Google::Cloud::Retail::V2::SafetySetting::HarmBlockMethod)Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
Enum: SafetySetting::HarmBlockThreshold
HARM_BLOCK_THRESHOLD_UNSPECIFIED=>0BLOCK_LOW_AND_ABOVE=>1BLOCK_MEDIUM_AND_ABOVE=>2BLOCK_ONLY_HIGH=>3BLOCK_NONE=>4OFF=>5
Enum: SafetySetting::HarmBlockMethod
HARM_BLOCK_METHOD_UNSPECIFIED=>0SEVERITY=>1PROBABILITY=>2
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Retail::V2::Safety::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.