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

# ProtocolMessage

> Protobuf class ProtocolMessage generated from WAProto.

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

## Implements

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

## Constructors

### new ProtocolMessage()

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

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

#### Parameters

##### p?

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

#### Returns

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

## Properties

### aiPsiMetadata?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`aiPsiMetadata`](/proto-reference/Message/interfaces/IProtocolMessage#aipsimetadata)

***

### aiQueryFanout?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`aiQueryFanout`](/proto-reference/Message/interfaces/IProtocolMessage#aiqueryfanout)

***

### appStateFatalExceptionNotification?

> `optional` **appStateFatalExceptionNotification**: `null` | [`IAppStateFatalExceptionNotification`](/proto-reference/Message/interfaces/IAppStateFatalExceptionNotification)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`appStateFatalExceptionNotification`](/proto-reference/Message/interfaces/IProtocolMessage#appstatefatalexceptionnotification)

***

### appStateSyncKeyRequest?

> `optional` **appStateSyncKeyRequest**: `null` | [`IAppStateSyncKeyRequest`](/proto-reference/Message/interfaces/IAppStateSyncKeyRequest)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`appStateSyncKeyRequest`](/proto-reference/Message/interfaces/IProtocolMessage#appstatesynckeyrequest)

***

### appStateSyncKeyShare?

> `optional` **appStateSyncKeyShare**: `null` | [`IAppStateSyncKeyShare`](/proto-reference/Message/interfaces/IAppStateSyncKeyShare)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`appStateSyncKeyShare`](/proto-reference/Message/interfaces/IProtocolMessage#appstatesynckeyshare)

***

### botFeedbackMessage?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`botFeedbackMessage`](/proto-reference/Message/interfaces/IProtocolMessage#botfeedbackmessage)

***

### cloudApiThreadControlNotification?

> `optional` **cloudApiThreadControlNotification**: `null` | [`ICloudAPIThreadControlNotification`](/proto-reference/Message/interfaces/ICloudAPIThreadControlNotification)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`cloudApiThreadControlNotification`](/proto-reference/Message/interfaces/IProtocolMessage#cloudapithreadcontrolnotification)

***

### disappearingMode?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`disappearingMode`](/proto-reference/Message/interfaces/IProtocolMessage#disappearingmode)

***

### editedMessage?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`editedMessage`](/proto-reference/Message/interfaces/IProtocolMessage#editedmessage)

***

### ephemeralExpiration?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`ephemeralExpiration`](/proto-reference/Message/interfaces/IProtocolMessage#ephemeralexpiration)

***

### ephemeralSettingTimestamp?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`ephemeralSettingTimestamp`](/proto-reference/Message/interfaces/IProtocolMessage#ephemeralsettingtimestamp)

***

### historySyncNotification?

> `optional` **historySyncNotification**: `null` | [`IHistorySyncNotification`](/proto-reference/Message/interfaces/IHistorySyncNotification)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`historySyncNotification`](/proto-reference/Message/interfaces/IProtocolMessage#historysyncnotification)

***

### initialSecurityNotificationSettingSync?

> `optional` **initialSecurityNotificationSettingSync**: `null` | [`IInitialSecurityNotificationSettingSync`](/proto-reference/Message/interfaces/IInitialSecurityNotificationSettingSync)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`initialSecurityNotificationSettingSync`](/proto-reference/Message/interfaces/IProtocolMessage#initialsecuritynotificationsettingsync)

***

### invokerJid?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`invokerJid`](/proto-reference/Message/interfaces/IProtocolMessage#invokerjid)

***

### key?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`key`](/proto-reference/Message/interfaces/IProtocolMessage#key)

***

### lidMigrationMappingSyncMessage?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`lidMigrationMappingSyncMessage`](/proto-reference/Message/interfaces/IProtocolMessage#lidmigrationmappingsyncmessage)

***

### limitSharing?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`limitSharing`](/proto-reference/Message/interfaces/IProtocolMessage#limitsharing)

***

### mediaNotifyMessage?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`mediaNotifyMessage`](/proto-reference/Message/interfaces/IProtocolMessage#medianotifymessage)

***

### memberLabel?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`memberLabel`](/proto-reference/Message/interfaces/IProtocolMessage#memberlabel)

***

### peerDataOperationRequestMessage?

> `optional` **peerDataOperationRequestMessage**: `null` | [`IPeerDataOperationRequestMessage`](/proto-reference/Message/interfaces/IPeerDataOperationRequestMessage)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`peerDataOperationRequestMessage`](/proto-reference/Message/interfaces/IProtocolMessage#peerdataoperationrequestmessage)

***

### peerDataOperationRequestResponseMessage?

> `optional` **peerDataOperationRequestResponseMessage**: `null` | [`IPeerDataOperationRequestResponseMessage`](/proto-reference/Message/interfaces/IPeerDataOperationRequestResponseMessage)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`peerDataOperationRequestResponseMessage`](/proto-reference/Message/interfaces/IProtocolMessage#peerdataoperationrequestresponsemessage)

***

### requestWelcomeMessageMetadata?

> `optional` **requestWelcomeMessageMetadata**: `null` | [`IRequestWelcomeMessageMetadata`](/proto-reference/Message/interfaces/IRequestWelcomeMessageMetadata)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`requestWelcomeMessageMetadata`](/proto-reference/Message/interfaces/IProtocolMessage#requestwelcomemessagemetadata)

***

### timestampMs?

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

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`timestampMs`](/proto-reference/Message/interfaces/IProtocolMessage#timestampms)

***

### type?

> `optional` **type**: `null` | [`Type`](/proto-reference/Message/ProtocolMessage/enumerations/Type)

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

#### Implementation of

[`IProtocolMessage`](/proto-reference/Message/interfaces/IProtocolMessage).[`type`](/proto-reference/Message/interfaces/IProtocolMessage#type)

## Methods

### create()

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

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

#### Parameters

##### properties?

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

#### Returns

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

***

### decode()

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

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

#### Parameters

##### r

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

##### l?

`number`

#### Returns

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

***

### encode()

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

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

#### Parameters

##### m

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

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

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

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

#### Parameters

##### d

#### Returns

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

***

### getTypeUrl()

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

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

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

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

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

#### Returns

`object`

***

### toObject()

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

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

#### Parameters

##### m

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

##### o?

`IConversionOptions`

#### Returns

`object`
