Skip to content

Commit 4e3028f

Browse files
chore: create model for relationship digital twins events
1 parent ca1929b commit 4e3028f

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* Copyright (c) 2023. Smart Operating Block
3+
*
4+
* Use of this source code is governed by an MIT-style
5+
* license that can be found in the LICENSE file or at
6+
* https://opensource.org/licenses/MIT.
7+
*/
8+
9+
package infrastructure.digitaltwins.events
10+
11+
/**
12+
* The model of Azure Digital Twins Update Events.
13+
*/
14+
object UpdateEvents {
15+
16+
/**
17+
* The patch section of the DT event.
18+
*/
19+
data class Patch(
20+
/**
21+
* The updated value.
22+
*/
23+
val value: Any,
24+
/**
25+
* The path of the operation.
26+
*/
27+
val path: String,
28+
/**
29+
* The type of operation on the value.
30+
*/
31+
val op: String,
32+
)
33+
34+
/**
35+
* The data section of the update DT event.
36+
*/
37+
data class UpdateEventData(
38+
/**
39+
* The model ID.
40+
*/
41+
val modelId: String,
42+
/**
43+
* The patch section.
44+
*/
45+
val patch: List<Patch>,
46+
)
47+
48+
/**
49+
* The event of update of a DT.
50+
*/
51+
data class UpdateTwinEvent(
52+
/**
53+
* The data section of the event.
54+
*/
55+
val data: UpdateEventData,
56+
/**
57+
* The type of the event.
58+
*/
59+
val contenttype: String,
60+
/**
61+
* The trace parent.
62+
*/
63+
val traceparent: String,
64+
/**
65+
* The id of event.
66+
*/
67+
val id: String,
68+
/**
69+
* The type of the event.
70+
*/
71+
val eventType: String,
72+
/**
73+
* The date and time of the event.
74+
*/
75+
val eventDateTime: String,
76+
)
77+
}

0 commit comments

Comments
 (0)