# Google Cloud Service Management V1 Client - Class Diagnostic (2.2.0)

2.2.0 (latest) 2.1.2 2.0.5 1.3.5 1.2.2 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Service Management V1 Client class Diagnostic.

Represents a diagnostic message (error or warning)

Generated from protobuf message `google.api.servicemanagement.v1.Diagnostic`

## Namespace

Google \\ Cloud \\ ServiceManagement \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ location` | `string` File name and line number of the error or warning. |
| `↳ kind` | `int` The kind of diagnostic information provided. |
| `↳ message` | `string` Message describing the error or warning. |

### getLocation

File name and line number of the error or warning.

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

### setLocation

File name and line number of the error or warning.

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

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

### getKind

The kind of diagnostic information provided.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Kind](https://docs.cloud.google.com/php/docs/reference/cloud-service-management/latest/V1.Diagnostic.Kind). |

### setKind

The kind of diagnostic information provided.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Kind](https://docs.cloud.google.com/php/docs/reference/cloud-service-management/latest/V1.Diagnostic.Kind). |

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

### getMessage

Message describing the error or warning.

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

### setMessage

Message describing the error or warning.

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

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