# DocumentGenerated

Output payload for the document-generated platform event, carrying the created file's identifiers and Resource.

> Kind: Apex type · Updated: 2026-07-01

This custom Apex type represents the output that Platform Events and the Platform Events Apex Handler methods return for the document-generated platform event type. It exposes the parent record, the generated ContentVersion, the file name, and the resulting Resource.

## Fields

### Output fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| ParentId | String | optional | Id of the record the generated document is attached to. |
| ContentVersionId | String | optional | Id of the ContentVersion created for the generated document. |
| Name | String | optional | Name of the generated document. |
| file | <a href="#/apex-type-resource">Resource</a> | optional | The generated document as a Resource. |
