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

# PrimaryVersionAction

> Protobuf class PrimaryVersionAction generated from WAProto.

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

## Implements

* [`IPrimaryVersionAction`](/proto-reference/SyncActionValue/interfaces/IPrimaryVersionAction)

## Constructors

### new PrimaryVersionAction()

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

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

#### Parameters

##### p?

[`IPrimaryVersionAction`](/proto-reference/SyncActionValue/interfaces/IPrimaryVersionAction)

#### Returns

[`PrimaryVersionAction`](/proto-reference/SyncActionValue/classes/PrimaryVersionAction)

## Properties

### version?

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

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

#### Implementation of

[`IPrimaryVersionAction`](/proto-reference/SyncActionValue/interfaces/IPrimaryVersionAction).[`version`](/proto-reference/SyncActionValue/interfaces/IPrimaryVersionAction#version)

## Methods

### create()

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

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

#### Parameters

##### properties?

[`IPrimaryVersionAction`](/proto-reference/SyncActionValue/interfaces/IPrimaryVersionAction)

#### Returns

[`PrimaryVersionAction`](/proto-reference/SyncActionValue/classes/PrimaryVersionAction)

***

### decode()

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

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

#### Parameters

##### r

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

##### l?

`number`

#### Returns

[`PrimaryVersionAction`](/proto-reference/SyncActionValue/classes/PrimaryVersionAction)

***

### encode()

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

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

#### Parameters

##### m

[`IPrimaryVersionAction`](/proto-reference/SyncActionValue/interfaces/IPrimaryVersionAction)

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

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

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

#### Parameters

##### d

#### Returns

[`PrimaryVersionAction`](/proto-reference/SyncActionValue/classes/PrimaryVersionAction)

***

### getTypeUrl()

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

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

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

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

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

#### Returns

`object`

***

### toObject()

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

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

#### Parameters

##### m

[`PrimaryVersionAction`](/proto-reference/SyncActionValue/classes/PrimaryVersionAction)

##### o?

`IConversionOptions`

#### Returns

`object`
