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

# Option

> Protobuf class Option generated from WAProto.

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

## Implements

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

## Constructors

### new Option()

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

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

#### Parameters

##### p?

[`IOption`](/proto-reference/Message/PollCreationMessage/interfaces/IOption)

#### Returns

[`Option`](/proto-reference/Message/PollCreationMessage/classes/Option)

## Properties

### optionHash?

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

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

#### Implementation of

[`IOption`](/proto-reference/Message/PollCreationMessage/interfaces/IOption).[`optionHash`](/proto-reference/Message/PollCreationMessage/interfaces/IOption#optionhash)

***

### optionName?

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

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

#### Implementation of

[`IOption`](/proto-reference/Message/PollCreationMessage/interfaces/IOption).[`optionName`](/proto-reference/Message/PollCreationMessage/interfaces/IOption#optionname)

## Methods

### create()

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

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

#### Parameters

##### properties?

[`IOption`](/proto-reference/Message/PollCreationMessage/interfaces/IOption)

#### Returns

[`Option`](/proto-reference/Message/PollCreationMessage/classes/Option)

***

### decode()

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

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

#### Parameters

##### r

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

##### l?

`number`

#### Returns

[`Option`](/proto-reference/Message/PollCreationMessage/classes/Option)

***

### encode()

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

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

#### Parameters

##### m

[`IOption`](/proto-reference/Message/PollCreationMessage/interfaces/IOption)

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

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

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

#### Parameters

##### d

#### Returns

[`Option`](/proto-reference/Message/PollCreationMessage/classes/Option)

***

### getTypeUrl()

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

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

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

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

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

#### Returns

`object`

***

### toObject()

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

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

#### Parameters

##### m

[`Option`](/proto-reference/Message/PollCreationMessage/classes/Option)

##### o?

`IConversionOptions`

#### Returns

`object`
