Google Cloud Web Risk V1 Client - Class ThreatHash (2.0.0-RC1)

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

Contains threat information on a matching hash.

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

Namespace

Google \ Cloud \ WebRisk \ V1 \ SearchHashesResponse

Methods

__construct

Constructor.

Parameters
Name Description
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
Type Description
Google\Protobuf\Internal\RepeatedField

setThreatTypes

The ThreatList this threat belongs to.

This must contain at least one entry.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getHash

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

Returns
Type Description
string

setHash

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

Parameter
Name Description
var string
Returns
Type Description
$this

getExpireTime

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

Returns
Type Description
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
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this