Skip to main content

Class: TemplateButton

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

Represents a TemplateButton.

Implements

Constructors

new TemplateButton()

new TemplateButton(properties?): TemplateButton

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

Constructs a new TemplateButton.

Parameters

properties?

ITemplateButton

Properties to set

Returns

TemplateButton

Properties

button?

optional button: "quickReplyButton" | "urlButton" | "callButton"

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

TemplateButton button.


callButton?

optional callButton: null | ICallButton

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

TemplateButton callButton.

Implementation of

ITemplateButton.callButton


index?

optional index: null | number

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

TemplateButton index.

Implementation of

ITemplateButton.index


quickReplyButton?

optional quickReplyButton: null | IQuickReplyButton

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

TemplateButton quickReplyButton.

Implementation of

ITemplateButton.quickReplyButton


urlButton?

optional urlButton: null | IURLButton

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

TemplateButton urlButton.

Implementation of

ITemplateButton.urlButton

Methods

toJSON()

toJSON(): object

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

Converts this TemplateButton to JSON.

Returns

object

JSON object


create()

static create(properties?): TemplateButton

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

Creates a new TemplateButton instance using the specified properties.

Parameters

properties?

ITemplateButton

Properties to set

Returns

TemplateButton

TemplateButton instance


decode()

static decode(reader, length?): TemplateButton

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

Decodes a TemplateButton 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

TemplateButton

TemplateButton

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited()

static decodeDelimited(reader): TemplateButton

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

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

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

Returns

TemplateButton

TemplateButton

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:47795

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

Parameters

message

ITemplateButton

TemplateButton 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:47803

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

Parameters

message

ITemplateButton

TemplateButton message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


fromObject()

static fromObject(object): TemplateButton

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

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

Parameters

object

Plain object

Returns

TemplateButton

TemplateButton


getTypeUrl()

static getTypeUrl(typeUrlPrefix?): string

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

Gets the default type url for TemplateButton

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:47844

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

Parameters

message

TemplateButton

TemplateButton

options?

IConversionOptions

Conversion options

Returns

object

Plain object


verify()

static verify(message): null | string

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

Verifies a TemplateButton message.

Parameters

message

Plain object to verify

Returns

null | string

null if valid, otherwise the reason why it is not