# Google Cloud Container V1 Client - Class DisruptionEvent (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class DisruptionEvent.

DisruptionEvent is a notification sent to customers about the disruption
event of a resource.

Generated from protobuf message `google.container.v1.DisruptionEvent`

## Namespace

Google \\ Cloud \\ Container \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ disruption_type` | `int` The type of the disruption event. |
| `↳ pdb_blocked_node` | `string` The node whose drain is blocked by PDB. This field is set for both POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event. |
| `↳ pdb_blocked_pod` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.DisruptionEvent.PdbBlockedPod>` The pods whose evictions are blocked by PDB. This field is set for both POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event. |
| `↳ pdb_violation_timeout` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` The timeout in seconds for which the node drain is blocked by PDB. After this timeout, pods are forcefully evicted. This field is only populated when event_type is POD_PDB_VIOLATION. |

### getDisruptionType

The type of the disruption event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [DisruptionType](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.DisruptionEvent.DisruptionType). |

### setDisruptionType

The type of the disruption event.

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

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

### getPdbBlockedNode

The node whose drain is blocked by PDB. This field is set for both
POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event.

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

### setPdbBlockedNode

The node whose drain is blocked by PDB. This field is set for both
POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event.

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

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

### getPdbBlockedPod

The pods whose evictions are blocked by PDB. This field is set for
both POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.DisruptionEvent.PdbBlockedPod>` |   |

### setPdbBlockedPod

The pods whose evictions are blocked by PDB. This field is set for
both POD_PDB_VIOLATION and POD_NOT_ENOUGH_PDB event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.DisruptionEvent.PdbBlockedPod>` |

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

### getPdbViolationTimeout

The timeout in seconds for which the node drain is blocked by PDB.

After this timeout, pods are forcefully evicted.
This field is only populated when event_type is
POD_PDB_VIOLATION.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasPdbViolationTimeout

### clearPdbViolationTimeout

### setPdbViolationTimeout

The timeout in seconds for which the node drain is blocked by PDB.

After this timeout, pods are forcefully evicted.
This field is only populated when event_type is
POD_PDB_VIOLATION.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

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