Skip to main content

Class: RequestHeaderAnnotation

RequestHeaderAnnotation allows specifying that field values from a request should be propagated as outbound headers.

The value field supports template interpolation where field paths enclosed in braces will be replaced with the actual field values from the request. For example: value: "{workflow_execution.workflow_id}" value: "workflow-{workflow_execution.workflow_id}" value: "{namespace}/{workflow_execution.workflow_id}"

Properties​

header: string

The name of the header to set (e.g., "temporal-resource-id")


value​

value: string

A template string that may contain field paths in braces. Field paths use dot notation to traverse nested messages. Example: "{workflow_execution.workflow_id}"

Methods​

toJSON()​

toJSON(): object

Converts this RequestHeaderAnnotation to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): RequestHeaderAnnotation & $Properties

Creates a new RequestHeaderAnnotation instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

RequestHeaderAnnotation & $Properties

RequestHeaderAnnotation instance

Call Signature​

static create(properties?): RequestHeaderAnnotation

Creates a new RequestHeaderAnnotation instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

RequestHeaderAnnotation

RequestHeaderAnnotation instance


decode()​

static decode(reader, length?): RequestHeaderAnnotation & $Properties

Decodes a RequestHeaderAnnotation message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

RequestHeaderAnnotation & $Properties

RequestHeaderAnnotation

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): RequestHeaderAnnotation & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

RequestHeaderAnnotation & $Properties

RequestHeaderAnnotation

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified RequestHeaderAnnotation message. Does not implicitly temporal.api.protometa.v1.RequestHeaderAnnotation.verify|verify messages.

Parameters​

message​

$Properties

RequestHeaderAnnotation message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

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

Parameters​

message​

$Properties

RequestHeaderAnnotation message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): RequestHeaderAnnotation

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

RequestHeaderAnnotation

RequestHeaderAnnotation


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

RequestHeaderAnnotation

RequestHeaderAnnotation

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object