Class: TemplateButton
Defined in: WAProto/index.d.ts:50846
Represents a TemplateButton.
Implements
Constructors
new TemplateButton()
new TemplateButton(
properties
?):TemplateButton
Defined in: WAProto/index.d.ts:50852
Constructs a new TemplateButton.
Parameters
properties?
Properties to set
Returns
Properties
button?
optional
button:"quickReplyButton"
|"urlButton"
|"callButton"
Defined in: WAProto/index.d.ts:50867
TemplateButton button.
callButton?
optional
callButton:null
|ICallButton
Defined in: WAProto/index.d.ts:50864
TemplateButton callButton.
Implementation of
index?
optional
index:null
|number
Defined in: WAProto/index.d.ts:50855
TemplateButton index.
Implementation of
quickReplyButton?
optional
quickReplyButton:null
|IQuickReplyButton
Defined in: WAProto/index.d.ts:50858
TemplateButton quickReplyButton.
Implementation of
ITemplateButton
.quickReplyButton
urlButton?
optional
urlButton:null
|IURLButton
Defined in: WAProto/index.d.ts:50861
TemplateButton urlButton.
Implementation of
Methods
toJSON()
toJSON():
object
Defined in: WAProto/index.d.ts:50937
Converts this TemplateButton to JSON.
Returns
object
JSON object
create()
static
create(properties
?):TemplateButton
Defined in: WAProto/index.d.ts:50874
Creates a new TemplateButton instance using the specified properties.
Parameters
properties?
Properties to set
Returns
TemplateButton instance
decode()
static
decode(reader
,length
?):TemplateButton
Defined in: WAProto/index.d.ts:50900
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
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:50909
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
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:50882
Encodes the specified TemplateButton message. Does not implicitly verify messages.
Parameters
message
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:50890
Encodes the specified TemplateButton message, length delimited. Does not implicitly verify messages.
Parameters
message
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:50923
Creates a TemplateButton message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
TemplateButton
getTypeUrl()
static
getTypeUrl(typeUrlPrefix
?):string
Defined in: WAProto/index.d.ts:50944
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:50931
Creates a plain object from a TemplateButton message. Also converts values to other types if specified.
Parameters
message
TemplateButton
options?
IConversionOptions
Conversion options
Returns
object
Plain object
verify()
static
verify(message
):null
|string
Defined in: WAProto/index.d.ts:50916
Verifies a TemplateButton message.
Parameters
message
Plain object to verify
Returns
null
| string
null
if valid, otherwise the reason why it is not