Skip to main content

Class: UserMetadata

sdk.v1.UserMetadata

Information a user can set, often for use by user interfaces.

Implements

Constructors

constructor

new UserMetadata(properties?): UserMetadata

Constructs a new UserMetadata.

Parameters

NameTypeDescription
properties?IUserMetadataProperties to set

Returns

UserMetadata

Properties

details

Optional details: null | IPayload

Long-form text that provides details. This payload should be a "json/plain"-encoded payload that is a single JSON string for use in user interfaces. User interface formatting may apply to this text in common use. The payload data section is limited to 20000 bytes by default.

Implementation of

IUserMetadata.details


summary

Optional summary: null | IPayload

Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload that is a single JSON string for use in user interfaces. User interface formatting may not apply to this text when used in "title" situations. The payload data section is limited to 400 bytes by default.

Implementation of

IUserMetadata.summary

Methods

toJSON

toJSON(): Object

Converts this UserMetadata to JSON.

Returns

Object

JSON object


create

create(properties?): UserMetadata

Creates a new UserMetadata instance using the specified properties.

Parameters

NameTypeDescription
properties?IUserMetadataProperties to set

Returns

UserMetadata

UserMetadata instance


decode

decode(reader, length?): UserMetadata

Decodes a UserMetadata message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

UserMetadata

UserMetadata

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): UserMetadata

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

UserMetadata

UserMetadata

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified UserMetadata message. Does not implicitly temporal.api.sdk.v1.UserMetadata.verify|verify messages.

Parameters

NameTypeDescription
messageIUserMetadataUserMetadata message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified UserMetadata message, length delimited. Does not implicitly temporal.api.sdk.v1.UserMetadata.verify|verify messages.

Parameters

NameTypeDescription
messageIUserMetadataUserMetadata message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): UserMetadata

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

UserMetadata

UserMetadata


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for UserMetadata

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageUserMetadataUserMetadata
options?IConversionOptionsConversion options

Returns

Object

Plain object