Skip to main content

Class: RequestHeaderAnnotation

protometa.v1.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​

▸ create(properties?): RequestHeaderAnnotation & $Properties

Creates a new RequestHeaderAnnotation instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

RequestHeaderAnnotation & $Properties

RequestHeaderAnnotation instance

▸ create(properties?): RequestHeaderAnnotation

Parameters​

NameType
properties?$Properties

Returns​

RequestHeaderAnnotation


decode​

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

Decodes a RequestHeaderAnnotation message from the specified reader or buffer.

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage 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​

▸ decodeDelimited(reader): RequestHeaderAnnotation & $Properties

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader 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​

▸ encode(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesRequestHeaderAnnotation message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


encodeDelimited​

▸ encodeDelimited(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesRequestHeaderAnnotation message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


fromObject​

▸ fromObject(object): RequestHeaderAnnotation

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

Parameters​

NameTypeDescription
objectObjectPlain object

Returns​

RequestHeaderAnnotation

RequestHeaderAnnotation


toObject​

▸ toObject(message, options?): Object

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

Parameters​

NameTypeDescription
messageRequestHeaderAnnotationRequestHeaderAnnotation
options?IConversionOptionsConversion options

Returns​

Object

Plain object