# Google Cloud Web Risk V1 Client - Class SearchHashesRequest (2.3.0)

2.3.0 (latest) 2.2.2 2.1.1 2.0.3 1.5.5 1.4.4 1.3.0 1.2.7 Reference documentation and code samples for the Google Cloud Web Risk V1 Client class SearchHashesRequest.

Request to return full hashes matched by the provided hash prefixes.

Generated from protobuf message `google.cloud.webrisk.v1.SearchHashesRequest`

## Namespace

Google \\ Cloud \\ WebRisk \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ hash_prefix` | `string` A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. For JSON requests, this field is base64-encoded. Note that if this parameter is provided by a URI, it must be encoded using the web safe base64 variant (RFC 4648). |
| `↳ threat_types` | `int[]` Required. The ThreatLists to search in. Multiple ThreatLists may be specified. |

### getHashPrefix

A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
hash. For JSON requests, this field is base64-encoded.

Note that if this parameter is provided by a URI, it must be encoded using
the web safe base64 variant (RFC 4648).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setHashPrefix

A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
hash. For JSON requests, this field is base64-encoded.

Note that if this parameter is provided by a URI, it must be encoded using
the web safe base64 variant (RFC 4648).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getThreatTypes

Required. The ThreatLists to search in. Multiple ThreatLists may be
specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setThreatTypes

Required. The ThreatLists to search in. Multiple ThreatLists may be
specified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `hashPrefix` | `string` A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. For JSON requests, this field is base64-encoded. Note that if this parameter is provided by a URI, it must be encoded using the web safe base64 variant (RFC 4648). |
| `threatTypes` | `int[]` Required. The ThreatLists to search in. Multiple ThreatLists may be specified. For allowed values, use constants defined on [ThreatType](https://docs.cloud.google.com/php/docs/reference/cloud-web-risk/latest/V1.ThreatType) |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-web-risk/latest/V1.SearchHashesRequest` |   |