# Google Cloud Web Security Scanner V1 Client - Class ScanConfigError (1.2.0)

1.2.0 (latest) 1.1.2 1.0.5 0.8.5 0.7.18 Reference documentation and code samples for the Google Cloud Web Security Scanner V1 Client class ScanConfigError.

Defines a custom error message used by CreateScanConfig and UpdateScanConfig
APIs when scan configuration validation fails. It is also reported as part of
a ScanRunErrorTrace message if scan validation fails due to a scan
configuration error.

Generated from protobuf message `google.cloud.websecurityscanner.v1.ScanConfigError`

## Namespace

Google \\ Cloud \\ WebSecurityScanner \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` Output only. Indicates the reason code for a configuration failure. |
| `↳ field_name` | `string` Output only. Indicates the full name of the ScanConfig field that triggers this error, for example "scan_config.max_qps". This field is provided for troubleshooting purposes only and its actual value can change in the future. |

### getCode

Output only. Indicates the reason code for a configuration failure.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest/V1.ScanConfigError.Code). |

### setCode

Output only. Indicates the reason code for a configuration failure.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest/V1.ScanConfigError.Code). |

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

### getFieldName

Output only. Indicates the full name of the ScanConfig field that triggers this error,
for example "scan_config.max_qps". This field is provided for
troubleshooting purposes only and its actual value can change in the
future.

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

### setFieldName

Output only. Indicates the full name of the ScanConfig field that triggers this error,
for example "scan_config.max_qps". This field is provided for
troubleshooting purposes only and its actual value can change in the
future.

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

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