# Common Protos for Google Cloud APIs Client - Class TableDataRead (1.0.0)

1.0.0 (latest) 0.8.3 0.7.0 0.6.0 0.5.2 0.4.2 0.3.8 Reference documentation and code samples for the Common Protos for Google Cloud APIs Client class TableDataRead.

Table data read event.

Generated from protobuf message `google.cloud.audit.BigQueryAuditMetadata.TableDataRead`

## Namespace

Google \\ Cloud \\ Audit \\ BigQueryAuditMetadata

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ fields` | `string[]` List of the accessed fields. Entire list is truncated if the record size exceeds 100K. |
| `↳ fields_truncated` | `bool` True if the fields list was truncated. |
| `↳ policy_tags` | `string[]` List of the referenced policy tags. That is, policy tags attached to the accessed fields or their ancestors. Policy tag resource name is a string of the format: `projects/<project_id>/locations/<location_id>/taxonomies/<taxonomy_id>/policyTags/<policy_tag_id>` |
| `↳ policy_tags_truncated` | `bool` True if the policy tag list was truncated. At most 100 policy tags can be saved. |
| `↳ reason` | `int` Describes how the table data was read. |
| `↳ job_name` | `string` The URI of the job that read a table. Present if the reason is JOB but can be redacted for privacy reasons. Format: `projects/<project_id>/jobs/<job_id>`. |
| `↳ session_name` | `string` The URI of the read session that read a table. Present if the reason is CREATE_READ_SESSION. Format: `projects/<project_id>/locations/<location>/sessions/<session_id>`. |

### getFields

List of the accessed fields. Entire list is truncated if the record size
exceeds 100K.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setFields

List of the accessed fields. Entire list is truncated if the record size
exceeds 100K.

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

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

### getFieldsTruncated

True if the fields list was truncated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setFieldsTruncated

True if the fields list was truncated.

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

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

### getPolicyTags

List of the referenced policy tags. That is, policy tags attached to the
accessed fields or their ancestors.

Policy tag resource name is a string of the format:
`projects/<project_id>/locations/<location_id>/taxonomies/<taxonomy_id>/policyTags/<policy_tag_id>`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setPolicyTags

List of the referenced policy tags. That is, policy tags attached to the
accessed fields or their ancestors.

Policy tag resource name is a string of the format:
`projects/<project_id>/locations/<location_id>/taxonomies/<taxonomy_id>/policyTags/<policy_tag_id>`

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

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

### getPolicyTagsTruncated

True if the policy tag list was truncated. At most 100 policy tags can be
saved.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setPolicyTagsTruncated

True if the policy tag list was truncated. At most 100 policy tags can be
saved.

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

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

### getReason

Describes how the table data was read.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Reason](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.TableDataRead.Reason). |

### setReason

Describes how the table data was read.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Reason](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.BigQueryAuditMetadata.TableDataRead.Reason). |

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

### getJobName

The URI of the job that read a table.

Present if the reason is JOB but can be redacted for privacy reasons.
Format: `projects/<project_id>/jobs/<job_id>`.

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

### setJobName

The URI of the job that read a table.

Present if the reason is JOB but can be redacted for privacy reasons.
Format: `projects/<project_id>/jobs/<job_id>`.

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

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

### getSessionName

The URI of the read session that read a table.

Present if the reason is CREATE_READ_SESSION.
Format:
`projects/<project_id>/locations/<location>/sessions/<session_id>`.

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

### setSessionName

The URI of the read session that read a table.

Present if the reason is CREATE_READ_SESSION.
Format:
`projects/<project_id>/locations/<location>/sessions/<session_id>`.

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

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