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
| Name | Type | Description |
|---|---|---|
properties? | IRequestHeaderAnnotation | Properties to set |
Returns
Properties
header
• 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
| Name | Type | Description |
|---|---|---|
properties? | IRequestHeaderAnnotation | Properties to set |
Returns
RequestHeaderAnnotation instance
decode
▸ decode(reader, length?): RequestHeaderAnnotation
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
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
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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 | IRequestHeaderAnnotation | 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 | IRequestHeaderAnnotation | 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
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for RequestHeaderAnnotation
Parameters
| Name | Type | Description |
|---|---|---|
typeUrlPrefix? | string | your 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
| Name | Type | Description |
|---|---|---|
message | RequestHeaderAnnotation | RequestHeaderAnnotation |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object