DigitalTwinAdapterInboundRoute

class oci.iot.models.DigitalTwinAdapterInboundRoute(**kwargs)

Bases: object

Defines how inbound device payloads should be routed and mapped within a digital twin context. Routes are evaluated in the order they are defined, and only the first matching condition is processed. A final default route (with a condition that always evaluates to true) is recommended for fallback handling.

Methods

__init__(**kwargs) Initializes a new DigitalTwinAdapterInboundRoute object with values from keyword arguments.

Attributes

condition [Required] Gets the condition of this DigitalTwinAdapterInboundRoute.
description Gets the description of this DigitalTwinAdapterInboundRoute.
payload_mapping Gets the payload_mapping of this DigitalTwinAdapterInboundRoute.
reference_payload Gets the reference_payload of this DigitalTwinAdapterInboundRoute.
__init__(**kwargs)

Initializes a new DigitalTwinAdapterInboundRoute object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • condition (str) – The value to assign to the condition property of this DigitalTwinAdapterInboundRoute.
  • reference_payload (oci.iot.models.DigitalTwinAdapterPayload) – The value to assign to the reference_payload property of this DigitalTwinAdapterInboundRoute.
  • payload_mapping (dict(str, str)) – The value to assign to the payload_mapping property of this DigitalTwinAdapterInboundRoute.
  • description (str) – The value to assign to the description property of this DigitalTwinAdapterInboundRoute.
condition

[Required] Gets the condition of this DigitalTwinAdapterInboundRoute. A boolean expression used to determine whether the following transformation should be processed for the incoming payload. This expression is typically based on fields defined at the inbound Envelope and is evaluated before applying the payloadMapping.

Returns:The condition of this DigitalTwinAdapterInboundRoute.
Return type:str
description

Gets the description of this DigitalTwinAdapterInboundRoute. Meaningful write up about the inbound route.

Returns:The description of this DigitalTwinAdapterInboundRoute.
Return type:str
payload_mapping

Gets the payload_mapping of this DigitalTwinAdapterInboundRoute. A set of key-value JQ expressions used to transform the incoming payload into a shape compatible with the digital twin model’s context or schema.

The keys are target fields (in the digital twin model), and values are JQ expressions pointing to data in the reference payload.

Example: Given payload: {

“time”: “<timestamp>”, “temp”: 65, “hum”: 55

} And mapping: {

“temperature”: “$.temp”, “humidity”: “$.hum”, “timeObserved”: “$.time”

} The output will be: {

“temperature”: 65, “humidity”: 55, “timeObserved”: “<timestamp>”

}

Returns:The payload_mapping of this DigitalTwinAdapterInboundRoute.
Return type:dict(str, str)
reference_payload

Gets the reference_payload of this DigitalTwinAdapterInboundRoute.

Returns:The reference_payload of this DigitalTwinAdapterInboundRoute.
Return type:oci.iot.models.DigitalTwinAdapterPayload