# Google Cloud Security Command Center V2 Client - Class DataRetentionDeletionEvent (2.5.1)

2.5.1 (latest) 2.5.0 2.4.2 2.3.0 2.2.1 2.1.1 2.0.4 1.32.0 1.31.0 1.30.0 1.29.0 1.28.2 1.21.0 1.20.2 1.19.1 1.18.0 1.17.0 1.16.0 1.15.1 1.14.2 1.13.1 Reference documentation and code samples for the Google Cloud Security Command Center V2 Client class DataRetentionDeletionEvent.

Details about data retention deletion violations, in which the data is
non-compliant based on their retention or deletion time, as defined in the
applicable data security policy. The Data Retention Deletion (DRD) control is
a control of the DSPM (Data Security Posture Management) suite that enables
organizations to manage data retention and deletion policies in compliance
with regulations, such as GDPR and CRPA. DRD supports two primary policy
types: maximum storage length (max TTL) and minimum storage length (min TTL).

Both are aimed at helping organizations meet regulatory and data management
commitments.

Generated from protobuf message `google.cloud.securitycenter.v2.DataRetentionDeletionEvent`

## Namespace

Google \\ Cloud \\ SecurityCenter \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ event_detection_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Timestamp indicating when the event was detected. |
| `↳ data_object_count` | `int|string` Number of objects that violated the policy for this resource. If the number is less than 1,000, then the value of this field is the exact number. If the number of objects that violated the policy is greater than or equal to 1,000, then the value of this field is 1000. |
| `↳ max_retention_allowed` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Maximum duration of retention allowed from the DRD control. This comes from the DRD control where users set a max TTL for their data. For example, suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days. However, an object in that bucket is 100 days old. In this case, a DataRetentionDeletionEvent will be generated for that Cloud Storage bucket, and the max_retention_allowed is 90 days. |
| `↳ event_type` | `int` Type of the DRD event. |

### getEventDetectionTime

Timestamp indicating when the event was detected.

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

### hasEventDetectionTime

### clearEventDetectionTime

### setEventDetectionTime

Timestamp indicating when the event was detected.

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

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

### getDataObjectCount

Number of objects that violated the policy for this resource. If the number
is less than 1,000, then the value of this field is the exact number. If
the number of objects that violated the policy is greater than or equal to
1,000, then the value of this field is 1000.

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

### setDataObjectCount

Number of objects that violated the policy for this resource. If the number
is less than 1,000, then the value of this field is the exact number. If
the number of objects that violated the policy is greater than or equal to
1,000, then the value of this field is 1000.

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

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

### getMaxRetentionAllowed

Maximum duration of retention allowed from the DRD control. This comes
from the DRD control where users set a max TTL for their data. For example,
suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.

However, an object in that bucket is 100 days old. In this case, a
DataRetentionDeletionEvent will be generated for that Cloud Storage bucket,
and the max_retention_allowed is 90 days.

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

### hasMaxRetentionAllowed

### clearMaxRetentionAllowed

### setMaxRetentionAllowed

Maximum duration of retention allowed from the DRD control. This comes
from the DRD control where users set a max TTL for their data. For example,
suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.

However, an object in that bucket is 100 days old. In this case, a
DataRetentionDeletionEvent will be generated for that Cloud Storage bucket,
and the max_retention_allowed is 90 days.

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

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

### getEventType

Type of the DRD event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [EventType](https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.DataRetentionDeletionEvent.EventType). |

### setEventType

Type of the DRD event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [EventType](https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.DataRetentionDeletionEvent.EventType). |

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