Message

enfonica.messaging.v1. Message

Represents a Message.

Constructor

new Message(propertiesopt)

Constructs a new Message.

Parameters:
Name Type Attributes Description
properties enfonica.messaging.v1.IMessage <optional>

Properties to set

Implements:
  • IMessage

Members

Direction

Direction enum.

Properties:
Name Type Description
DIRECTION_UNSPECIFIED number

DIRECTION_UNSPECIFIED value

OUTGOING number

OUTGOING value

INCOMING number

INCOMING value

MessageClassification

MessageClassification enum.

Properties:
Name Type Description
MESSAGE_CLASSIFICATION_UNSPECIFIED number

MESSAGE_CLASSIFICATION_UNSPECIFIED value

UNCLASSIFIED number

UNCLASSIFIED value

TRANSACTIONAL number

TRANSACTIONAL value

MARKETING number

MARKETING value

MessageEncoding

MessageEncoding enum.

Properties:
Name Type Description
MESSAGE_ENCODING_UNSPECIFIED number

MESSAGE_ENCODING_UNSPECIFIED value

GSM7 number

GSM7 value

UCS2 number

UCS2 value

Status

Status enum.

Properties:
Name Type Description
STATUS_UNSPECIFIED number

STATUS_UNSPECIFIED value

QUEUED number

QUEUED value

SENDING number

SENDING value

SENT number

SENT value

FAILED number

FAILED value

DELIVERED number

DELIVERED value

UNDELIVERED number

UNDELIVERED value

RECEIVED number

RECEIVED value

UnsubscribeContentBehavior

UnsubscribeContentBehavior enum.

Properties:
Name Type Description
UNSUBSCRIBE_CONTENT_BEHAVIOR_UNSPECIFIED number

UNSUBSCRIBE_CONTENT_BEHAVIOR_UNSPECIFIED value

NONE number

NONE value

APPEND_URL number

APPEND_URL value

body

Message body.

classification

Message classification.

createIdentity

Message createIdentity.

createTime

Message createTime.

deliverTime

Message deliverTime.

direction

Message direction.

encoding

Message encoding.

errorCode

Message errorCode.

errorMessage

Message errorMessage.

from

Message from.

labels

Message labels.

name

Message name.

price

Message price.

replyUrl

Message replyUrl.

segmentCount

Message segmentCount.

sendTime

Message sendTime.

smartEncoding

Message smartEncoding.

status

Message status.

statusUpdateUrl

Message statusUpdateUrl.

to

Message to.

unsubscribeContentBehavior

Message unsubscribeContentBehavior.

validityPeriodSeconds

Message validityPeriodSeconds.

Methods

(static) create(propertiesopt) → {enfonica.messaging.v1.Message}

Creates a new Message instance using the specified properties.

Parameters:
Name Type Attributes Description
properties enfonica.messaging.v1.IMessage <optional>

Properties to set

Returns:
Type Description
enfonica.messaging.v1.Message

Message instance

(static) decode(reader, lengthopt) → {enfonica.messaging.v1.Message}

Decodes a Message message from the specified reader or buffer.

Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

length number <optional>

Message length if known beforehand

Returns:
Type Description
enfonica.messaging.v1.Message

Message

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) decodeDelimited(reader) → {enfonica.messaging.v1.Message}

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

Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

Returns:
Type Description
enfonica.messaging.v1.Message

Message

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) encode(message, writeropt) → {$protobuf.Writer}

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

Parameters:
Name Type Attributes Description
message enfonica.messaging.v1.IMessage

Message message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

Returns:
Type Description
$protobuf.Writer

Writer

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

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

Parameters:
Name Type Attributes Description
message enfonica.messaging.v1.IMessage

Message message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

Returns:
Type Description
$protobuf.Writer

Writer

(static) fromObject(object) → {enfonica.messaging.v1.Message}

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

Parameters:
Name Type Description
object Object.<string, *>

Plain object

Returns:
Type Description
enfonica.messaging.v1.Message

Message

(static) toObject(message, optionsopt) → {Object.<string, *>}

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

Parameters:
Name Type Attributes Description
message enfonica.messaging.v1.Message

Message

options $protobuf.IConversionOptions <optional>

Conversion options

Returns:
Type Description
Object.<string, *>

Plain object

(static) verify(message) → {string|null}

Verifies a Message message.

Parameters:
Name Type Description
message Object.<string, *>

Plain object to verify

Returns:
Type Description
string | null

null if valid, otherwise the reason why it is not

toJSON() → {Object.<string, *>}

Converts this Message to JSON.

Returns:
Type Description
Object.<string, *>

JSON object