Skip to main content

Class: Chat

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

Represents a Chat.

Implements

Constructors

new Chat()

new Chat(properties?): Chat

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

Constructs a new Chat.

Parameters

properties?

IChat

Properties to set

Returns

Chat

Properties

displayName?

optional displayName: null | string

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

Chat displayName.

Implementation of

IChat.displayName


id?

optional id: null | string

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

Chat id.

Implementation of

IChat.id

Methods

toJSON()

toJSON(): object

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

Converts this Chat to JSON.

Returns

object

JSON object


create()

static create(properties?): Chat

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

Creates a new Chat instance using the specified properties.

Parameters

properties?

IChat

Properties to set

Returns

Chat

Chat instance


decode()

static decode(reader, length?): Chat

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

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

Chat

Chat

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited()

static decodeDelimited(reader): Chat

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

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

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

Returns

Chat

Chat

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

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

Parameters

message

IChat

Chat 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:21392

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

Parameters

message

IChat

Chat message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


fromObject()

static fromObject(object): Chat

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

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

Parameters

object

Plain object

Returns

Chat

Chat


getTypeUrl()

static getTypeUrl(typeUrlPrefix?): string

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

Gets the default type url for Chat

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

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

Parameters

message

Chat

Chat

options?

IConversionOptions

Conversion options

Returns

object

Plain object


verify()

static verify(message): null | string

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

Verifies a Chat message.

Parameters

message

Plain object to verify

Returns

null | string

null if valid, otherwise the reason why it is not