Google Cloud Web Risk V1beta1 Client - Class ThreatHash (1.2.7)

Reference documentation and code samples for the Google Cloud Web Risk V1beta1 Client class ThreatHash.

Contains threat information on a matching hash.

Generated from protobuf message google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ threat_types array

The ThreatList this threat belongs to. This must contain at least one entry.

↳ hash string

A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.

↳ expire_time Google\Protobuf\Timestamp

The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.

getThreatTypes

The ThreatList this threat belongs to.

This must contain at least one entry.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setThreatTypes

The ThreatList this threat belongs to.

This must contain at least one entry.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getHash

A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.

Returns
TypeDescription
string

setHash

A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getExpireTime

The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasExpireTime

clearExpireTime

setExpireTime

The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this