# Google Cloud Web Risk V1 Client - Class Confidence (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 Confidence.

Confidence that a URI is unsafe.

Generated from protobuf message `google.cloud.webrisk.v1.ThreatInfo.Confidence`

## Namespace

Google \\ Cloud \\ WebRisk \\ V1 \\ ThreatInfo

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ score` | `float` A decimal representation of confidence in the range of 0 to 1 where 0 indicates no confidence and 1 indicates complete confidence. |
| `↳ level` | `int` Enum representation of confidence. |

### getScore

A decimal representation of confidence in the range of 0
to 1 where 0 indicates no confidence and 1 indicates
complete confidence.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasScore

### setScore

A decimal representation of confidence in the range of 0
to 1 where 0 indicates no confidence and 1 indicates
complete confidence.

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

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

### getLevel

Enum representation of confidence.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ConfidenceLevel](https://docs.cloud.google.com/php/docs/reference/cloud-web-risk/latest/V1.ThreatInfo.Confidence.ConfidenceLevel). |

### hasLevel

### setLevel

Enum representation of confidence.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ConfidenceLevel](https://docs.cloud.google.com/php/docs/reference/cloud-web-risk/latest/V1.ThreatInfo.Confidence.ConfidenceLevel). |

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

### getValue

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