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}"

Implements

Constructors

constructor

new RequestHeaderAnnotation(properties?): RequestHeaderAnnotation

Constructs a new RequestHeaderAnnotation.

Parameters

NameTypeDescription
properties?IRequestHeaderAnnotationProperties to set

Returns

RequestHeaderAnnotation

Properties

header: string

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

Implementation of

IRequestHeaderAnnotation.header


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}"

Implementation of

IRequestHeaderAnnotation.value

Methods

toJSON

toJSON(): Object

Converts this RequestHeaderAnnotation to JSON.

Returns

Object

JSON object


create

create(properties?): RequestHeaderAnnotation

Creates a new RequestHeaderAnnotation instance using the specified properties.

Parameters

NameTypeDescription
properties?IRequestHeaderAnnotationProperties to set

Returns

RequestHeaderAnnotation

RequestHeaderAnnotation instance


decode

decode(reader, length?): RequestHeaderAnnotation

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

RequestHeaderAnnotation

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): RequestHeaderAnnotation

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

RequestHeaderAnnotation

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
messageIRequestHeaderAnnotationRequestHeaderAnnotation 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
messageIRequestHeaderAnnotationRequestHeaderAnnotation 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


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for RequestHeaderAnnotation

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 RequestHeaderAnnotation message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageRequestHeaderAnnotationRequestHeaderAnnotation
options?IConversionOptionsConversion options

Returns

Object

Plain object