Refactoring file structure for protobufs.

Change-Id: I50daf100d54750f97158304d87813e67861b1422
diff --git a/incubator/protobuf/models/src/main/proto/ConnectPointProto.proto b/incubator/protobuf/models/src/main/proto/ConnectPointProto.proto
new file mode 100644
index 0000000..ecc1362
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/ConnectPointProto.proto
@@ -0,0 +1,15 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package ConnectPoint;
+
+message ConnectPoint {
+    oneof element_id {
+        // DeviceID as String DeviceId#toString
+        string device_id = 1;
+
+        // TODO add support to other element_id if required
+    }
+    // PortNumber as String PortNumber#toString
+    string port_number = 2;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/DeviceDescriptionProto.proto b/incubator/protobuf/models/src/main/proto/DeviceDescriptionProto.proto
new file mode 100644
index 0000000..b620bfa
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/DeviceDescriptionProto.proto
@@ -0,0 +1,18 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Device;
+
+import "DeviceEnums.proto";
+
+message DeviceDescription {
+    string device_Uri = 1;
+    Device.DeviceType type = 2;
+    string manufacturer = 3;
+    string hw_version = 4;
+    string sw_version = 5;
+    string serial_number = 6;
+    string chassis_id = 7;
+    map<string, string> annotations = 8;
+    bool is_default_available = 9;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/DeviceEnums.proto b/incubator/protobuf/models/src/main/proto/DeviceEnums.proto
new file mode 100644
index 0000000..7fb1f08
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/DeviceEnums.proto
@@ -0,0 +1,39 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Device;
+
+enum MastershipRole {
+    NONE = 0;
+    MASTER = 1;
+    STANDBY = 2;
+}
+
+enum DeviceType {
+    OTHER = 0;
+    SWITCH = 1;
+    ROUTER = 2;
+    ROADM = 3;
+    OTN = 4;
+    ROADM_OTN = 5;
+    FIREWALL = 6;
+    BALANCER = 7;
+    IPS = 8;
+    IDS = 9;
+    CONTROLLER = 10;
+    VIRTUAL = 11;
+    FIBER_SWITCH = 12;
+    MICROWAVE = 13;
+}
+
+enum DeviceEventType {
+    DEVICE_ADDED = 0;
+    DEVICE_UPDATED = 1;
+    DEVICE_REMOVED = 2;
+    DEVICE_SUSPENDED = 3;
+    DEVICE_AVAILABILITY_CHANGED = 4;
+    PORT_ADDED = 5;
+    PORT_UPDATED = 6;
+    PORT_REMOVED = 7;
+    PORT_STATS_UPDATED = 8;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/DeviceEventProto.proto b/incubator/protobuf/models/src/main/proto/DeviceEventProto.proto
new file mode 100644
index 0000000..9cbbf60
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/DeviceEventProto.proto
@@ -0,0 +1,16 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+
+import "DeviceProto.proto";
+import "DeviceEnums.proto";
+import "PortProto.proto";
+
+package Device;
+
+// Corresponds to org.onosproject.net.device.DeviceEvent.
+message DeviceNotification {
+    Device.DeviceProto device = 1;
+    Device.DeviceEventType deviceEventType = 2;
+    Port.PortProto port = 3;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/DeviceProto.proto b/incubator/protobuf/models/src/main/proto/DeviceProto.proto
new file mode 100644
index 0000000..f4a81d1
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/DeviceProto.proto
@@ -0,0 +1,18 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Device;
+
+import "DeviceEnums.proto";
+
+// Corresponds to org.onosproject.net.Device.
+message DeviceProto {
+    string deviceId = 1;
+    Device.DeviceType type = 2;
+    string manufacturer = 3;
+    string hw_version = 4;
+    string sw_version = 5;
+    string serial_number = 6;
+    string chassis_id = 7;
+    map<string, string> annotations = 8;
+}
diff --git a/incubator/protobuf/models/src/main/proto/LinkDescriptionProto.proto b/incubator/protobuf/models/src/main/proto/LinkDescriptionProto.proto
new file mode 100644
index 0000000..16fe534
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/LinkDescriptionProto.proto
@@ -0,0 +1,14 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Link;
+
+import "ConnectPointProto.proto";
+import "LinkEnums.proto";
+
+message LinkDescription {
+    ConnectPoint.ConnectPoint src = 1;
+    ConnectPoint.ConnectPoint dst = 2;
+    Link.LinkType type = 3;
+    map<string, string> annotations = 4;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/LinkEnums.proto b/incubator/protobuf/models/src/main/proto/LinkEnums.proto
new file mode 100644
index 0000000..fa5f5ac
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/LinkEnums.proto
@@ -0,0 +1,40 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Link;
+
+enum LinkType {
+    // Signifies that this is a direct single-segment link.
+    DIRECT = 0;
+
+    // Signifies that this link is potentially comprised from multiple
+    // underlying segments or hops, and as such should be used to tag
+    // links traversing optical paths, tunnels or intervening 'dark'
+    // switches.
+    INDIRECT = 1;
+
+    // Signifies that this link is an edge, i.e. host link.
+    EDGE = 2;
+
+    // Signifies that this link represents a logical link backed by
+    // some form of a tunnel, e.g., GRE, MPLS, ODUk, OCH.
+    TUNNEL = 3;
+
+    // Signifies that this link is realized by fiber (either single channel or WDM).
+    OPTICAL = 4;
+
+    // Signifies that this link is a virtual link or a pseudo-wire.
+    VIRTUAL = 5;
+}
+
+enum LinkState {
+    ACTIVE = 0;
+    INACTIVE = 1;
+}
+
+// Link Event Types
+enum LinkEventType {
+    LINK_ADDED = 0;
+    LINK_UPDATED = 1;
+    LINK_REMOVED = 2;
+}
diff --git a/incubator/protobuf/models/src/main/proto/LinkEventProto.proto b/incubator/protobuf/models/src/main/proto/LinkEventProto.proto
new file mode 100644
index 0000000..be1ee41
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/LinkEventProto.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Link;
+
+import "LinkProto.proto";
+import "LinkEnums.proto";
+
+// Corresponds to org.onosproject.net.link.LinkEvent.
+message LinkNotification {
+    Link.LinkEventType linkEventType = 2;
+    Link.LinkProto link = 3;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/LinkProto.proto b/incubator/protobuf/models/src/main/proto/LinkProto.proto
new file mode 100644
index 0000000..2355618
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/LinkProto.proto
@@ -0,0 +1,18 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Link;
+
+import "LinkEnums.proto";
+import "ConnectPointProto.proto";
+
+// Corresponds to org.onosproject.net.Link.
+message LinkProto {
+    Link.LinkState state = 1;
+    ConnectPoint.ConnectPoint src = 2;
+    ConnectPoint.ConnectPoint dst = 3;
+    Link.LinkType type = 4;
+    map<string, string> annotations = 5;
+}
+
+
diff --git a/incubator/protobuf/models/src/main/proto/PortDescriptionProto.proto b/incubator/protobuf/models/src/main/proto/PortDescriptionProto.proto
new file mode 100644
index 0000000..065ef67
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/PortDescriptionProto.proto
@@ -0,0 +1,15 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Port;
+
+import "PortEnums.proto";
+
+message PortDescription {
+    // PortNumber as String PortNumber#toString
+    string port_number = 1;
+    bool is_enabled = 2;
+    Port.PortType type = 3;
+    int64 port_speed = 4;
+    map<string, string> annotations = 8;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/PortEnums.proto b/incubator/protobuf/models/src/main/proto/PortEnums.proto
new file mode 100644
index 0000000..b05efc4
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/PortEnums.proto
@@ -0,0 +1,23 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Port;
+
+enum PortType {
+    // Signifies copper-based connectivity.
+    COPPER = 0;
+    // Signifies optical fiber-based connectivity.
+    FIBER = 1;
+    // Signifies optical fiber-based packet port.
+    PACKET = 2;
+    // Signifies optical fiber-based optical tributary port (called T-port).
+    //The signal from the client side will be formed into a ITU G.709 (OTN) frame.
+    ODUCLT = 3;
+    // Signifies optical fiber-based Line-side port (called L-port).
+    OCH = 4;
+    // Signifies optical fiber-based WDM port (called W-port).
+    //Optical Multiplexing Section (See ITU G.709).
+    OMS = 5;
+    // Signifies virtual port.
+    VIRTUAL = 6;
+}
\ No newline at end of file
diff --git a/incubator/protobuf/models/src/main/proto/PortProto.proto b/incubator/protobuf/models/src/main/proto/PortProto.proto
new file mode 100644
index 0000000..309e50b
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/PortProto.proto
@@ -0,0 +1,16 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Port;
+
+import "PortEnums.proto";
+
+// Corresponds to org.onosproject.net.Port.
+message PortProto {
+    string port_number = 1;
+    bool is_enabled = 2;
+    Port.PortType type = 3;
+    int64 port_speed = 4;
+    map<string, string> annotations = 5;
+}
+
diff --git a/incubator/protobuf/models/src/main/proto/PortStatisticsProto.proto b/incubator/protobuf/models/src/main/proto/PortStatisticsProto.proto
new file mode 100644
index 0000000..964d47c
--- /dev/null
+++ b/incubator/protobuf/models/src/main/proto/PortStatisticsProto.proto
@@ -0,0 +1,20 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net.models";
+
+package Port;
+
+message PortStatistics {
+    int32 port = 1;
+    int64 packets_received = 2;
+    int64 packets_sent = 3;
+    int64 bytes_received = 4;
+    int64 bytes_sent = 5;
+    int64 packets_rx_dropped = 6;
+    int64 packets_tx_dropped = 7;
+    int64 packets_rx_errors = 8;
+    int64 packets_tx_errors = 9;
+    int64 duration_sec = 10;
+    int64 duration_nano = 11;
+    bool is_zero = 12;
+    // TODO add all other fields
+}