> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# DocumentMessage

> Protobuf class DocumentMessage generated from WAProto.

Defined in: [WAProto/index.d.ts:6058](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6058)

## Implements

* [`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage)

## Constructors

### new DocumentMessage()

> **new DocumentMessage**(`p`?): [`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

Defined in: [WAProto/index.d.ts:6059](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6059)

#### Parameters

##### p?

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage)

#### Returns

[`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

## Properties

### accessibilityLabel?

> `optional` **accessibilityLabel**: `null` | `string`

Defined in: [WAProto/index.d.ts:6080](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6080)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`accessibilityLabel`](/proto-reference/Message/interfaces/IDocumentMessage#accessibilitylabel)

***

### caption?

> `optional` **caption**: `null` | `string`

Defined in: [WAProto/index.d.ts:6079](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6079)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`caption`](/proto-reference/Message/interfaces/IDocumentMessage#caption)

***

### contactVcard?

> `optional` **contactVcard**: `null` | `boolean`

Defined in: [WAProto/index.d.ts:6071](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6071)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`contactVcard`](/proto-reference/Message/interfaces/IDocumentMessage#contactvcard)

***

### contextInfo?

> `optional` **contextInfo**: `null` | [`IContextInfo`](/proto-reference/interfaces/IContextInfo)

Defined in: [WAProto/index.d.ts:6076](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6076)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`contextInfo`](/proto-reference/Message/interfaces/IDocumentMessage#contextinfo)

***

### directPath?

> `optional` **directPath**: `null` | `string`

Defined in: [WAProto/index.d.ts:6069](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6069)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`directPath`](/proto-reference/Message/interfaces/IDocumentMessage#directpath)

***

### fileEncSha256?

> `optional` **fileEncSha256**: `null` | `Uint8Array`\<`ArrayBufferLike`>

Defined in: [WAProto/index.d.ts:6068](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6068)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`fileEncSha256`](/proto-reference/Message/interfaces/IDocumentMessage#fileencsha256)

***

### fileLength?

> `optional` **fileLength**: `null` | `number` | `Long`

Defined in: [WAProto/index.d.ts:6064](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6064)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`fileLength`](/proto-reference/Message/interfaces/IDocumentMessage#filelength)

***

### fileName?

> `optional` **fileName**: `null` | `string`

Defined in: [WAProto/index.d.ts:6067](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6067)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`fileName`](/proto-reference/Message/interfaces/IDocumentMessage#filename)

***

### fileSha256?

> `optional` **fileSha256**: `null` | `Uint8Array`\<`ArrayBufferLike`>

Defined in: [WAProto/index.d.ts:6063](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6063)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`fileSha256`](/proto-reference/Message/interfaces/IDocumentMessage#filesha256)

***

### jpegThumbnail?

> `optional` **jpegThumbnail**: `null` | `Uint8Array`\<`ArrayBufferLike`>

Defined in: [WAProto/index.d.ts:6075](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6075)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`jpegThumbnail`](/proto-reference/Message/interfaces/IDocumentMessage#jpegthumbnail)

***

### mediaKey?

> `optional` **mediaKey**: `null` | `Uint8Array`\<`ArrayBufferLike`>

Defined in: [WAProto/index.d.ts:6066](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6066)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`mediaKey`](/proto-reference/Message/interfaces/IDocumentMessage#mediakey)

***

### mediaKeyDomain?

> `optional` **mediaKeyDomain**: `null` | [`MediaKeyDomain`](/proto-reference/Message/enumerations/MediaKeyDomain)

Defined in: [WAProto/index.d.ts:6081](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6081)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`mediaKeyDomain`](/proto-reference/Message/interfaces/IDocumentMessage#mediakeydomain)

***

### mediaKeyTimestamp?

> `optional` **mediaKeyTimestamp**: `null` | `number` | `Long`

Defined in: [WAProto/index.d.ts:6070](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6070)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`mediaKeyTimestamp`](/proto-reference/Message/interfaces/IDocumentMessage#mediakeytimestamp)

***

### mimetype?

> `optional` **mimetype**: `null` | `string`

Defined in: [WAProto/index.d.ts:6061](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6061)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`mimetype`](/proto-reference/Message/interfaces/IDocumentMessage#mimetype)

***

### pageCount?

> `optional` **pageCount**: `null` | `number`

Defined in: [WAProto/index.d.ts:6065](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6065)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`pageCount`](/proto-reference/Message/interfaces/IDocumentMessage#pagecount)

***

### thumbnailDirectPath?

> `optional` **thumbnailDirectPath**: `null` | `string`

Defined in: [WAProto/index.d.ts:6072](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6072)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`thumbnailDirectPath`](/proto-reference/Message/interfaces/IDocumentMessage#thumbnaildirectpath)

***

### thumbnailEncSha256?

> `optional` **thumbnailEncSha256**: `null` | `Uint8Array`\<`ArrayBufferLike`>

Defined in: [WAProto/index.d.ts:6074](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6074)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`thumbnailEncSha256`](/proto-reference/Message/interfaces/IDocumentMessage#thumbnailencsha256)

***

### thumbnailHeight?

> `optional` **thumbnailHeight**: `null` | `number`

Defined in: [WAProto/index.d.ts:6077](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6077)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`thumbnailHeight`](/proto-reference/Message/interfaces/IDocumentMessage#thumbnailheight)

***

### thumbnailSha256?

> `optional` **thumbnailSha256**: `null` | `Uint8Array`\<`ArrayBufferLike`>

Defined in: [WAProto/index.d.ts:6073](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6073)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`thumbnailSha256`](/proto-reference/Message/interfaces/IDocumentMessage#thumbnailsha256)

***

### thumbnailWidth?

> `optional` **thumbnailWidth**: `null` | `number`

Defined in: [WAProto/index.d.ts:6078](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6078)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`thumbnailWidth`](/proto-reference/Message/interfaces/IDocumentMessage#thumbnailwidth)

***

### title?

> `optional` **title**: `null` | `string`

Defined in: [WAProto/index.d.ts:6062](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6062)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`title`](/proto-reference/Message/interfaces/IDocumentMessage#title)

***

### url?

> `optional` **url**: `null` | `string`

Defined in: [WAProto/index.d.ts:6060](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6060)

#### Implementation of

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage).[`url`](/proto-reference/Message/interfaces/IDocumentMessage#url)

## Methods

### create()

> `static` **create**(`properties`?): [`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

Defined in: [WAProto/index.d.ts:6082](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6082)

#### Parameters

##### properties?

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage)

#### Returns

[`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

***

### decode()

> `static` **decode**(`r`, `l`?): [`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

Defined in: [WAProto/index.d.ts:6084](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6084)

#### Parameters

##### r

`Uint8Array`\<`ArrayBufferLike`> | `Reader`

##### l?

`number`

#### Returns

[`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

***

### encode()

> `static` **encode**(`m`, `w`?): `Writer`

Defined in: [WAProto/index.d.ts:6083](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6083)

#### Parameters

##### m

[`IDocumentMessage`](/proto-reference/Message/interfaces/IDocumentMessage)

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

> `static` **fromObject**(`d`): [`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

Defined in: [WAProto/index.d.ts:6085](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6085)

#### Parameters

##### d

#### Returns

[`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

***

### getTypeUrl()

> `static` **getTypeUrl**(`typeUrlPrefix`?): `string`

Defined in: [WAProto/index.d.ts:6088](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6088)

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

> **toJSON**(): `object`

Defined in: [WAProto/index.d.ts:6087](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6087)

#### Returns

`object`

***

### toObject()

> `static` **toObject**(`m`, `o`?): `object`

Defined in: [WAProto/index.d.ts:6086](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L6086)

#### Parameters

##### m

[`DocumentMessage`](/proto-reference/Message/classes/DocumentMessage)

##### o?

`IConversionOptions`

#### Returns

`object`
