e687303f8669a9f8376312f5aa0aa6dc75000325
[cps.git] / cps-ncmp-events / src / main / resources / schemas / lcm / lcm-event-schema-v1.json
1 {
2
3   "$schema": "https://json-schema.org/draft/2019-09/schema",
4   "$id": "urn:cps:org.onap.ncmp.cmhandle.lcm-event:v1",
5
6   "$ref": "#/definitions/LcmEvent",
7
8   "definitions": {
9
10     "Values": {
11       "description": "Values that represents the state of a cmHandle",
12       "type": "object",
13       "properties": {
14         "dataSyncEnabled":{
15           "description": "Whether data sync enabled",
16           "type": "boolean"
17         },
18         "cmHandleState": {
19           "description": "State of cmHandle",
20           "type": "string",
21           "enum": ["ADVISED", "READY", "LOCKED", "DELETING", "DELETED"]
22         },
23         "cmHandleProperties": {
24           "description": "cmHandle properties",
25           "type": "object",
26           "default": null,
27           "existingJavaType": "java.util.List<java.util.Map<String,String>>",
28           "additionalProperties": false
29         }
30       },
31       "additionalProperties": false
32     },
33
34     "Event": {
35       "description": "The Payload of an event",
36       "type": "object",
37       "properties": {
38         "cmHandleId": {
39           "description": "cmHandle id",
40           "type": "string"
41         },
42         "alternateId": {
43           "description": "alternative id for cmHandle (e.g. 3GPP FDN)",
44           "type": "string"
45         },
46         "oldValues": {
47           "$ref": "#/definitions/Values"
48         },
49         "newValues": {
50           "$ref": "#/definitions/Values"
51         }
52       },
53       "required": [
54         "cmHandleId"
55       ],
56       "additionalProperties": false
57     },
58
59     "LcmEvent": {
60       "description": "The payload for LCM event",
61       "type": "object",
62       "javaType" : "org.onap.cps.ncmp.events.lcm.v1.LcmEvent",
63       "properties": {
64         "eventId": {
65           "description": "The unique id identifying the event",
66           "type": "string"
67         },
68         "eventCorrelationId": {
69           "description": "The id identifying the event",
70           "type": "string"
71         },
72         "eventTime": {
73           "description": "The timestamp when original event occurred",
74           "type": "string"
75         },
76         "eventSource": {
77           "description": "The source of the event",
78           "type": "string"
79         },
80         "eventType": {
81           "description": "The type of the event",
82           "type": "string"
83         },
84         "eventSchema": {
85           "description": "The schema that this event adheres to",
86           "type": "string"
87         },
88         "eventSchemaVersion": {
89           "description": "The version of the schema that this event adheres to",
90           "type": "string"
91         },
92         "event": {
93           "$ref": "#/definitions/Event"
94         }
95       },
96       "required": [
97         "eventId",
98         "eventCorrelationId",
99         "eventTime",
100         "eventSource",
101         "eventType",
102         "eventSchema",
103         "eventSchemaVersion",
104         "event"
105       ],
106       "additionalProperties": false
107     }
108
109   }
110 }