# Google Cloud Security Command Center V2 Client - Class DataAccessEvent (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 DataAccessEvent.

Details about a data access attempt made by a principal not authorized under
applicable data security policy.

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

## Namespace

Google \\ Cloud \\ SecurityCenter \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ event_id` | `string` Unique identifier for data access event. |
| `↳ principal_email` | `string` The email address of the principal that accessed the data. The principal could be a user account, service account, Google group, or other. |
| `↳ operation` | `int` The operation performed by the principal to access the data. |
| `↳ event_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Timestamp of data access event. |

### getEventId

Unique identifier for data access event.

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

### setEventId

Unique identifier for data access event.

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

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

### getPrincipalEmail

The email address of the principal that accessed the data. The principal
could be a user account, service account, Google group, or other.

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

### setPrincipalEmail

The email address of the principal that accessed the data. The principal
could be a user account, service account, Google group, or other.

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

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

### getOperation

The operation performed by the principal to access the data.

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

### setOperation

The operation performed by the principal to access the data.

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

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

### getEventTime

Timestamp of data access event.

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

### hasEventTime

### clearEventTime

### setEventTime

Timestamp of data access event.

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

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