Skip to main content

Class: ButtonsMessage

Defined in: WAProto/index.d.ts:20285

Represents a ButtonsMessage.

Implements

Constructors

new ButtonsMessage()

new ButtonsMessage(properties?): ButtonsMessage

Defined in: WAProto/index.d.ts:20291

Constructs a new ButtonsMessage.

Parameters

properties?

IButtonsMessage

Properties to set

Returns

ButtonsMessage

Properties

buttons

buttons: IButton[]

Defined in: WAProto/index.d.ts:20303

ButtonsMessage buttons.

Implementation of

IButtonsMessage.buttons


contentText?

optional contentText: null | string

Defined in: WAProto/index.d.ts:20294

ButtonsMessage contentText.

Implementation of

IButtonsMessage.contentText


contextInfo?

optional contextInfo: null | IContextInfo

Defined in: WAProto/index.d.ts:20300

ButtonsMessage contextInfo.

Implementation of

IButtonsMessage.contextInfo


documentMessage?

optional documentMessage: null | IDocumentMessage

Defined in: WAProto/index.d.ts:20312

ButtonsMessage documentMessage.

Implementation of

IButtonsMessage.documentMessage


footerText?

optional footerText: null | string

Defined in: WAProto/index.d.ts:20297

ButtonsMessage footerText.

Implementation of

IButtonsMessage.footerText


optional header: "text" | "imageMessage" | "locationMessage" | "documentMessage" | "videoMessage"

Defined in: WAProto/index.d.ts:20324

ButtonsMessage header.


headerType?

optional headerType: null | HeaderType

Defined in: WAProto/index.d.ts:20306

ButtonsMessage headerType.

Implementation of

IButtonsMessage.headerType


imageMessage?

optional imageMessage: null | IImageMessage

Defined in: WAProto/index.d.ts:20315

ButtonsMessage imageMessage.

Implementation of

IButtonsMessage.imageMessage


locationMessage?

optional locationMessage: null | ILocationMessage

Defined in: WAProto/index.d.ts:20321

ButtonsMessage locationMessage.

Implementation of

IButtonsMessage.locationMessage


text?

optional text: null | string

Defined in: WAProto/index.d.ts:20309

ButtonsMessage text.

Implementation of

IButtonsMessage.text


videoMessage?

optional videoMessage: null | IVideoMessage

Defined in: WAProto/index.d.ts:20318

ButtonsMessage videoMessage.

Implementation of

IButtonsMessage.videoMessage

Methods

toJSON()

toJSON(): object

Defined in: WAProto/index.d.ts:20394

Converts this ButtonsMessage to JSON.

Returns

object

JSON object


create()

static create(properties?): ButtonsMessage

Defined in: WAProto/index.d.ts:20331

Creates a new ButtonsMessage instance using the specified properties.

Parameters

properties?

IButtonsMessage

Properties to set

Returns

ButtonsMessage

ButtonsMessage instance


decode()

static decode(reader, length?): ButtonsMessage

Defined in: WAProto/index.d.ts:20357

Decodes a ButtonsMessage message from the specified reader or buffer.

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

length?

number

Message length if known beforehand

Returns

ButtonsMessage

ButtonsMessage

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited()

static decodeDelimited(reader): ButtonsMessage

Defined in: WAProto/index.d.ts:20366

Decodes a ButtonsMessage message from the specified reader or buffer, length delimited.

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

Returns

ButtonsMessage

ButtonsMessage

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode()

static encode(message, writer?): Writer

Defined in: WAProto/index.d.ts:20339

Encodes the specified ButtonsMessage message. Does not implicitly verify messages.

Parameters

message

IButtonsMessage

ButtonsMessage message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


encodeDelimited()

static encodeDelimited(message, writer?): Writer

Defined in: WAProto/index.d.ts:20347

Encodes the specified ButtonsMessage message, length delimited. Does not implicitly verify messages.

Parameters

message

IButtonsMessage

ButtonsMessage message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


fromObject()

static fromObject(object): ButtonsMessage

Defined in: WAProto/index.d.ts:20380

Creates a ButtonsMessage message from a plain object. Also converts values to their respective internal types.

Parameters

object

Plain object

Returns

ButtonsMessage

ButtonsMessage


getTypeUrl()

static getTypeUrl(typeUrlPrefix?): string

Defined in: WAProto/index.d.ts:20401

Gets the default type url for ButtonsMessage

Parameters

typeUrlPrefix?

string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject()

static toObject(message, options?): object

Defined in: WAProto/index.d.ts:20388

Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified.

Parameters

message

ButtonsMessage

ButtonsMessage

options?

IConversionOptions

Conversion options

Returns

object

Plain object


verify()

static verify(message): null | string

Defined in: WAProto/index.d.ts:20373

Verifies a ButtonsMessage message.

Parameters

message

Plain object to verify

Returns

null | string

null if valid, otherwise the reason why it is not