# Google Cloud Discovery Engine V1 Client - Class DocumentInfo (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class DocumentInfo.

Detailed document information associated with a user event.

Generated from protobuf message `google.cloud.discoveryengine.v1.DocumentInfo`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ id` | `string` The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) resource ID. |
| `↳ name` | `string` The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` |
| `↳ uri` | `string` The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) URI - only allowed for website data stores. |
| `↳ quantity` | `int` Quantity of the Document associated with the user event. Defaults to 1. For example, this field is 2 if two quantities of the same Document are involved in a `add-to-cart` event. Required for events of the following event types: \* \* `add-to-cart` \* \* `purchase` |
| `↳ promotion_ids` | `string[]` The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. |
| `↳ joined` | `bool` Output only. Whether the referenced Document can be found in the data store. |
| `↳ conversion_value` | `float` Optional. The conversion value associated with this Document. Must be set if [UserEvent.event_type](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.UserEvent#_Google_Cloud_DiscoveryEngine_V1_UserEvent__getEventType__) is "conversion". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the `watch` conversion type. |

### getId

The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) resource ID.

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

### hasId

### setId

The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) resource ID.

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

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

### getName

The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) resource full
name, of the form:
`projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`

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

### hasName

### setName

The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) resource full
name, of the form:
`projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`

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

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

### getUri

The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) URI - only
allowed for website data stores.

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

### hasUri

### setUri

The [Document](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Document) URI - only
allowed for website data stores.

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

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

### getQuantity

Quantity of the Document associated with the user event. Defaults to 1.

For example, this field is 2 if two quantities of the same Document
are involved in a `add-to-cart` event.
Required for events of the following event types:

- `add-to-cart`
- `purchase`

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

### hasQuantity

### clearQuantity

### setQuantity

Quantity of the Document associated with the user event. Defaults to 1.

For example, this field is 2 if two quantities of the same Document
are involved in a `add-to-cart` event.
Required for events of the following event types:

- `add-to-cart`
- `purchase`

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

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

### getPromotionIds

The promotion IDs associated with this Document.

Currently, this field is restricted to at most one ID.

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

### setPromotionIds

The promotion IDs associated with this Document.

Currently, this field is restricted to at most one ID.

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

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

### getJoined

Output only. Whether the referenced Document can be found in the data
store.

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

### setJoined

Output only. Whether the referenced Document can be found in the data
store.

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

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

### getConversionValue

Optional. The conversion value associated with this Document.

Must be set if
[UserEvent.event_type](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.UserEvent#_Google_Cloud_DiscoveryEngine_V1_UserEvent__getEventType__)
is "conversion".
For example, a value of 1000 signifies that 1000 seconds were spent viewing
a Document for the `watch` conversion type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasConversionValue

### clearConversionValue

### setConversionValue

Optional. The conversion value associated with this Document.

Must be set if
[UserEvent.event_type](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.UserEvent#_Google_Cloud_DiscoveryEngine_V1_UserEvent__getEventType__)
is "conversion".
For example, a value of 1000 signifies that 1000 seconds were spent viewing
a Document for the `watch` conversion type.

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

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

### getDocumentDescriptor

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