Service Client: Google::Cloud::Webrisk::V1beta1::Webrisk::WebRiskServiceV1Beta1Client
Client stub representing the remote WebRiskServiceV1Beta1 gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to webrisk.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Webrisk::V1beta1::Webrisk - Compiled Protocol Buffers messages for google/cloud/webrisk/v1beta1/webrisk.proto
SYNOPSIS
use Google::Cloud::Webrisk::V1beta1::Webrisk;
my $msg = Google::Cloud::Webrisk::V1beta1::Webrisk::ComputeThreatListDiffRequest->new({
threat_type => $threat_type,
version_token => $version_token,
constraints => $constraints,
});
# Read or update a field
my $val = $msg->threat_type();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Webrisk::V1beta1::Webrisk::ComputeThreatListDiffRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/webrisk/v1beta1/webrisk.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::Webrisk::V1beta1::Webrisk::ComputeThreatListDiffRequest
Describes an API diff request.
Inherits from Protobuf::Message.
Accessors
$msg->threat_type()/$msg->threat_type($value)Type:
Enum(Google::Cloud::Webrisk::V1beta1::ThreatType)The ThreatList to update.
$msg->version_token()/$msg->version_token($value)Type:
BytesThe current version token of the client for the requested list (the client version that was received from the last successful diff).
$msg->constraints()/$msg->constraints($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::ComputeThreatListDiffRequest::Constraints)Required. The constraints associated with this request.
Google::Cloud::Webrisk::V1beta1::Webrisk::ComputeThreatListDiffResponse
Inherits from Protobuf::Message.
Accessors
$msg->response_type()/$msg->response_type($value)Type:
Enum(Google::Cloud::Webrisk::V1beta1::ComputeThreatListDiffResponse::ResponseType)The type of response. This may indicate that an action must be taken by the client when the response is received.
$msg->additions()/$msg->additions($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::ThreatEntryAdditions)A set of entries to add to a local threat type's list.
$msg->removals()/$msg->removals($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::ThreatEntryRemovals)A set of entries to remove from a local threat type's list. This field may be empty.
$msg->new_version_token()/$msg->new_version_token($value)Type:
BytesThe new opaque client version token.
$msg->checksum()/$msg->checksum($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::ComputeThreatListDiffResponse::Checksum)The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided diff. If the client state doesn't match the expected state, the client must disregard this diff and retry later.
$msg->recommended_next_diff()/$msg->recommended_next_diff($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The soonest the client should wait before issuing any diff request. Querying sooner is unlikely to produce a meaningful diff. Waiting longer is acceptable considering the use case. If this field is not set clients may update as soon as they want.
Enum: ComputeThreatListDiffResponse::ResponseType
RESPONSE_TYPE_UNSPECIFIED=>0DIFF=>1RESET=>2
Google::Cloud::Webrisk::V1beta1::Webrisk::SearchUrisRequest
Request to check URI entries against threatLists.
Inherits from Protobuf::Message.
Accessors
$msg->uri()/$msg->uri($value)Type:
StringRequired. The URI to be checked for matches.
$msg->threat_types()/$msg->threat_types($value)Type:
Enum(Google::Cloud::Webrisk::V1beta1::ThreatType)Required. The ThreatLists to search in.
Google::Cloud::Webrisk::V1beta1::Webrisk::SearchUrisResponse
Inherits from Protobuf::Message.
Accessors
$msg->threat()/$msg->threat($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::SearchUrisResponse::ThreatUri)The threat list matches. This may be empty if the URI is on no list.
Google::Cloud::Webrisk::V1beta1::Webrisk::SearchHashesRequest
Request to return full hashes matched by the provided hash prefixes.
Inherits from Protobuf::Message.
Accessors
$msg->hash_prefix()/$msg->hash_prefix($value)Type:
BytesA hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. For JSON requests, this field is base64-encoded.
$msg->threat_types()/$msg->threat_types($value)Type:
Enum(Google::Cloud::Webrisk::V1beta1::ThreatType)Required. The ThreatLists to search in.
Google::Cloud::Webrisk::V1beta1::Webrisk::SearchHashesResponse
Inherits from Protobuf::Message.
Accessors
$msg->threats()/$msg->threats($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::SearchHashesResponse::ThreatHash)The full hashes that matched the requested prefixes. The hash will be populated in the key.
$msg->negative_expire_time()/$msg->negative_expire_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)For requested entities that did not match the threat list, how long to cache the response until.
Google::Cloud::Webrisk::V1beta1::Webrisk::ThreatEntryAdditions
Contains the set of entries to add to a local database. May contain a combination of compressed and raw data in a single response.
Inherits from Protobuf::Message.
Accessors
$msg->raw_hashes()/$msg->raw_hashes($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::RawHashes)The raw SHA256-formatted entries. Repeated to allow returning sets of hashes with different prefix sizes.
$msg->rice_hashes()/$msg->rice_hashes($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::RiceDeltaEncoding)The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data.
Google::Cloud::Webrisk::V1beta1::Webrisk::ThreatEntryRemovals
Contains the set of entries to remove from a local database.
Inherits from Protobuf::Message.
Accessors
$msg->raw_indices()/$msg->raw_indices($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::RawIndices)The raw removal indices for a local list.
$msg->rice_indices()/$msg->rice_indices($value)Type:
Message(Google::Cloud::Webrisk::V1beta1::Webrisk::RiceDeltaEncoding)The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data.
Google::Cloud::Webrisk::V1beta1::Webrisk::RawIndices
A set of raw indices to remove from a local list.
Inherits from Protobuf::Message.
Accessors
$msg->indices()/$msg->indices($value)Type:
Int32The indices to remove from a lexicographically-sorted local list.
Google::Cloud::Webrisk::V1beta1::Webrisk::RawHashes
The uncompressed threat entries in hash format. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URI.
Used for sending ThreatEntryAdditons to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.
Inherits from Protobuf::Message.
Accessors
$msg->prefix_size()/$msg->prefix_size($value)Type:
Int32The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
$msg->raw_hashes()/$msg->raw_hashes($value)Type:
BytesThe hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.
Google::Cloud::Webrisk::V1beta1::Webrisk::RiceDeltaEncoding
The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.
Inherits from Protobuf::Message.
Accessors
$msg->first_value()/$msg->first_value($value)Type:
Int64The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. If the field is empty or missing, assume zero.
$msg->rice_parameter()/$msg->rice_parameter($value)Type:
Int32The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero.
$msg->entry_count()/$msg->entry_count($value)Type:
Int32The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`.
$msg->encoded_data()/$msg->encoded_data($value)Type:
BytesThe encoded deltas that are encoded using the Golomb-Rice coder.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Webrisk::V1beta1::Webrisk::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.