Merge "Bug 2003: CDS serialization improvements"
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / resources / Common.proto
1 package org.opendaylight.controller.mdsal;
2
3 option java_package = "org.opendaylight.controller.protobuff.messages.common";
4 option java_outer_classname = "NormalizedNodeMessages";
5
6
7 message Attribute{
8   required string name =1;
9   optional string value=2;
10   optional string type=3;
11 }
12
13 message PathArgumentAttribute{
14     optional QName name =1;
15     optional string value=2;
16     optional int32 type=3;
17 }
18
19
20 message QName {
21     optional string value=1; // @deprecated
22     optional int32 namespace=2;
23     optional int32 revision=3;
24     optional int32 localName=4;
25 }
26
27 message PathArgument {
28   optional string value=1; // @deprecated
29   optional string type=2; // @deprecated
30
31   optional QName nodeType=3;
32
33   repeated PathArgumentAttribute attribute=4;
34   repeated Attribute attributes=5; // @deprecated For backward compatibility (see InstanceIdentifierUtils)
35   optional int32 intType = 6;
36 }
37
38 message InstanceIdentifier {
39   repeated PathArgument arguments=1;
40   
41   // A list of string codes which can be used for any repeated strings in the path args. This is
42   // optional - an InstanceIdentifier may be encoded as part of another message, eg NormalizedNode,
43   // that contains the codes. 
44   repeated string code = 2;
45 }
46
47 message Node{
48   optional string path = 1; // @deprecated(use pathArgument)
49   optional string type = 2; // @deprecated(use intType)
50   optional PathArgument pathArgument = 3;
51   optional int32 intType = 4;
52
53   repeated Attribute attributes = 5;
54
55   repeated Node child = 6;
56
57   optional string value = 7;
58   optional string valueType = 8; // @deprecated(use intValueType)
59   optional int32 intValueType = 9; // instead of valueType
60
61   // Specific values
62   optional InstanceIdentifier instanceIdentifierValue = 10; // intValueType = YangInstanceIdentifier
63   repeated string bitsValue = 11; // intValueType = Bits
64
65   repeated string code = 12; // A list of string codes which can be used for any repeated strings in the NormalizedNode
66 }
67
68 message Container{
69   required string parentPath =1 ;
70   optional Node normalizedNode=2;
71 }
72
73 message NodeMapEntry{
74   required InstanceIdentifier instanceIdentifierPath =1;
75   optional Node normalizedNode=2;
76 }
77
78 message NodeMap{
79 repeated NodeMapEntry mapEntries=1;
80 }