Merge "Update cm-data-subscriptions model"
[cps.git] / cps-ncmp-events / src / main / resources / schemas / cmnotificationsubscription / cm-notification-subscription-dmi-in-event-schema-1.0.0.json
1 {
2   "$schema": "https://json-schema.org/draft/2019-09/schema",
3   "$id": "urn:cps:org.onap.cps.ncmp.events:cm-notification-subscription-dmi-in-event-schema:1.0.0",
4   "$ref": "#/definitions/CmNotificationSubscriptionDmiInEvent",
5   "definitions": {
6     "CmNotificationSubscriptionDmiInEvent": {
7       "description": "The payload for cm notification subscription event incoming message from NCMP.",
8       "type": "object",
9       "javaType": "org.onap.cps.ncmp.events.cmnotificationsubscription_merge1_0_0.ncmp_to_dmi.CmNotificationSubscriptionDmiInEvent",
10       "additionalProperties": false,
11       "properties": {
12         "data": {
13           "$ref": "#/definitions/data"
14         }
15       },
16       "required": [
17         "data"
18       ]
19     },
20     "data": {
21       "type": "object",
22       "description": "Information about the targets and subscription",
23       "additionalProperties": false,
24       "properties": {
25         "cmhandles": {
26           "type": "array",
27           "items": {
28             "type": "object",
29             "description": "Details for the target cmhandles",
30             "additionalProperties": false,
31             "properties": {
32               "cmhandleId": {
33                 "type": "string"
34               },
35               "private-properties": {
36                 "type": "object",
37                 "existingJavaType": "java.util.Map<String,String>",
38                 "items": {
39                   "type": "string"
40                 }
41               }
42             }
43           }
44         },
45         "predicates": {
46           "type": "array",
47           "description": "Additional values to be added into the subscription",
48           "items": {
49             "type": "object",
50             "properties": {
51               "targetFilter": {
52                 "description": "CM Handles to be targeted by the subscription",
53                 "type": "array",
54                 "items": {
55                   "type": "string"
56                 }
57               },
58               "scopeFilter": {
59                 "type": "object",
60                 "properties": {
61                   "datastore": {
62                     "description": "Datastore which is to be used by the subscription",
63                     "type": "string",
64                     "enum": ["ncmp-datastore:passthrough-operational", "ncmp-datastore:passthrough-running"]
65                   },
66                   "xpath-filter": {
67                     "description": "Filter to be applied to the CM Handles through this event",
68                     "type": "array",
69                     "items": {
70                       "type": "string"
71                     }
72                   }
73                 },
74                 "additionalProperties": false,
75                 "required": [
76                   "xpath-filter"
77                 ]
78               }
79             },
80             "additionalProperties": false,
81             "required": [
82               "targetFilter"
83             ]
84           },
85           "additionalProperties": false
86         }
87       },
88       "required": [
89         "cmhandles",
90         "predicates"
91       ]
92     }
93   }
94 }