Skip to content

Commit ca1929b

Browse files
chore: create model for relationship digital twins events
1 parent 666405e commit ca1929b

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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 Relationship Events.
13+
*/
14+
object RelationshipEvents {
15+
16+
/**
17+
* The section data of DT relationship events.
18+
*/
19+
data class RelationshipEventData(
20+
/**
21+
* The id of the relationship.
22+
*/
23+
val relationshipId: String,
24+
/**
25+
* The DT etag.
26+
*/
27+
val etag: String,
28+
/**
29+
* The source ID of the DT.
30+
*/
31+
val sourceId: String,
32+
/**
33+
* The name of the relationship.
34+
*/
35+
val relationshipName: String,
36+
/**
37+
* The target id of the relationship.
38+
*/
39+
val targetId: String,
40+
41+
/**
42+
* The model of the relationship source.
43+
*/
44+
val sourceModel: String
45+
)
46+
47+
/**
48+
* The event of creation or delete of a relationship between DT.
49+
*/
50+
data class RelationshipEvent(
51+
52+
/** The section data. **/
53+
val data: RelationshipEventData,
54+
/**
55+
* The type of the event.
56+
*/
57+
val contenttype: String,
58+
/**
59+
* The trace parent of the event.
60+
*/
61+
val traceparent: String,
62+
/**
63+
* The id of the event.
64+
*/
65+
val id: String,
66+
/**
67+
* The type of the event.
68+
*/
69+
val eventType: String,
70+
/**
71+
* The date and time of the event.
72+
*/
73+
val eventDateTime: String
74+
)
75+
}

0 commit comments

Comments
 (0)