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
• 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
| Name | Type | Description |
|---|---|---|
properties? | $Properties | Properties to set |
Returns
RequestHeaderAnnotation & $Properties
RequestHeaderAnnotation instance
▸ create(properties?): RequestHeaderAnnotation
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): RequestHeaderAnnotation & $Properties
Decodes a RequestHeaderAnnotation message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | 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
▸ decodeDelimited(reader): RequestHeaderAnnotation & $Properties
Decodes a RequestHeaderAnnotation message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | 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
▸ encode(message, writer?): Writer
Encodes the specified RequestHeaderAnnotation message. Does not implicitly temporal.api.protometa.v1.RequestHeaderAnnotation.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | RequestHeaderAnnotation message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
message | $Properties | RequestHeaderAnnotation message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
RequestHeaderAnnotation
toObject
▸ toObject(message, options?): Object
Creates a plain object from a RequestHeaderAnnotation message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | RequestHeaderAnnotation | RequestHeaderAnnotation |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object