# Google Cloud Document Ai V1 Client - Class Provenance (2.7.0)

2.7.0 (latest) 2.6.1 2.5.1 2.4.1 2.3.0 2.2.2 2.1.3 2.0.0 1.14.0 1.13.1 1.12.2 1.9.0 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.2 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Provenance.

Structure to identify provenance relationships between annotations in
different revisions.

Generated from protobuf message `google.cloud.documentai.v1.Document.Provenance`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1 \\ Document

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ revision` | `int` The index of the revision that produced this element. |
| `↳ id` | `int` The Id of this operation. Needs to be unique within the scope of the revision. |
| `↳ parents` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance.PBParent>` References to the original elements that are replaced. |
| `↳ type` | `int` The type of provenance operation. |

### getRevision

The index of the revision that produced this element.

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

### setRevision

The index of the revision that produced this element.

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

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

### getId

The Id of this operation. Needs to be unique within the scope of the
revision.

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

### setId

The Id of this operation. Needs to be unique within the scope of the
revision.

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

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

### getParents

References to the original elements that are replaced.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance.PBParent>` |   |

### setParents

References to the original elements that are replaced.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance.PBParent>` |

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

### getType

The type of provenance operation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [OperationType](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance.OperationType). |

### setType

The type of provenance operation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [OperationType](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Provenance.OperationType). |

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