-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuilding.proto
155 lines (129 loc) · 3.03 KB
/
building.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
syntax = "proto3";
package buildingPackage;
service buildingManagement {
rpc GetBuilding(IN) returns (Building);
rpc GetRoom(IN) returns (Room);
rpc GetComponent(IN) returns (Component);
rpc GetBuildings(Empty) returns (Buildings);
rpc GetFilteredBuildings(FilterValues) returns (Buildings);
rpc GetRooms(IN) returns (Rooms);
rpc GetComponents(IN) returns (Components);
rpc GetNotifications(IN) returns (Notifications);
rpc GetFavorites(Owner) returns (Buildings);
rpc AddBuilding(Building) returns (Building);
rpc AddRoom(Room) returns (Room);
rpc AddComponent(Component) returns (Component);
rpc AddFavorite(Owner, Building) returns (Empty);
rpc UpdateBuilding(Building) returns (Building);
rpc UpdateRoom(Room) returns (Room);
rpc UpdateComponent(Component) returns (Component);
rpc Delete(IN) returns (Empty);
}
message Empty {}
message IN {
string in = 1;
}
message Building {
string name = 1;
string aoNumber = 2;
int32 numFloors = 3;
Position position = 4;
Components components = 5;
Notifications notifications = 6;
CampusLocation campusLocation = 7;
Rooms rooms = 8;
IN bin = 9;
}
message Buildings {
repeated Building buildings = 1;
}
message Owner {
string owner = 1;
}
message Room {
string name = 1;
string aoNumber = 2;
int32 floor = 3;
RoomCategory category = 4;
Components components = 5;
Notifications notifications = 6;
IN rin = 7;
IN parent = 8;
Position position = 9;
}
message Rooms {
repeated Room rooms = 1;
}
message RoomCategory {
enum RoomCategories {
SPORTS = 1;
CAFETERIA = 2;
RESTROOM = 3;
RESTROOM_HANDICAPPED = 4;
OFFICE = 5;
LECTURE_ROOM = 6;
SEMINAR_ROOM = 7;
LIBRARY = 8;
}
}
message RoomCategories {
repeated RoomCategory roomCategories = 1;
}
message Position {
int32 lon = 1;
int32 lat = 2;
}
message CampusLocation {
enum campus {
SOUTH_CAMPUS = 1;
NORTH_CAMPUS = 2;
EAST_CAMPUS = 3;
WEST_CAMPUS = 4;
}
}
message CampusLocations {
repeated CampusLocation locations = 1;
}
message Component {
ComponentType componentType = 1;
IN cin = 2;
IN parent = 3;
string description = 4;
Notifications notifications = 5;
Position position = 6;
}
message ComponentType {
enum ComponentType {
RAMP = 1;
ELEVATOR = 2;
}
}
message ComponentTypes {
repeated ComponentType componentTypes = 1;
}
message Components {
repeated Component components = 1;
}
message Notification {
string title = 1;
string description = 2;
Date date = 3;
IN nin = 4;
IN parent = 5;
}
message Notifications {
repeated Notification notification = 1;
}
message Date {
int32 year = 1;
int32 month = 2;
int32 day = 3;
}
message FilterValues {
oneof{
CampusLocations campusLocations = 1;
ComponentTypes componentTypes = 2;
RoomCategories roomCategories = 3;
string name = 4;
}
}