|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +package upstream; |
| 4 | + |
| 5 | +// |
| 6 | +// This aims to be a larger, more representative benchmark |
| 7 | +// The messages intentionally use nesting and have many fields of |
| 8 | +// multiple different types. |
| 9 | +// |
| 10 | + |
| 11 | +message Position |
| 12 | +{ |
| 13 | + uint32 x = 1; |
| 14 | + uint32 y = 2; |
| 15 | + uint32 z = 3; |
| 16 | +} |
| 17 | + |
| 18 | +message TrunkItem |
| 19 | +{ |
| 20 | + enum ITEM_TYPE { |
| 21 | + LAPTOP = 0; |
| 22 | + DUFFEL_BAG = 1; |
| 23 | + GOLF_CLUBS = 2; |
| 24 | + BASEBALL_BAT = 3; |
| 25 | + SUITCASE = 4; |
| 26 | + BRICKS = 5; |
| 27 | + CROWBAR = 6; |
| 28 | + CASH = 7; |
| 29 | + POKEMON_CARDS = 8; |
| 30 | + } |
| 31 | + |
| 32 | + enum COUNTRY { |
| 33 | + NOT_US_OF_A = 0; // Zero |
| 34 | + US_OF_A = 1; // Number 1 |
| 35 | + CANADA = 2; |
| 36 | + } |
| 37 | + |
| 38 | + string id = 1; |
| 39 | + string owner_id = 2; |
| 40 | + COUNTRY made_in = 3; |
| 41 | + uint64 width = 4; |
| 42 | + uint64 height = 5; |
| 43 | + uint64 depth = 6; |
| 44 | + uint64 weight = 7; |
| 45 | + bool is_usbc = 8; |
| 46 | + Position pos = 9; |
| 47 | + bool is_umbrella = 10; |
| 48 | + double monetary_value = 11; |
| 49 | + ITEM_TYPE item_type = 12; |
| 50 | +} |
| 51 | + |
| 52 | +message Vehicle |
| 53 | +{ |
| 54 | + enum VEHICLE_TYPE { |
| 55 | + CAR = 0; |
| 56 | + SPORTS_CAR = 1; |
| 57 | + SUV = 2; |
| 58 | + PICKUP_TRUCK = 3; |
| 59 | + MINIVAN = 4; |
| 60 | + MOTORCYCLE = 5; |
| 61 | + } |
| 62 | + |
| 63 | + uint64 id = 1; |
| 64 | + string make = 2; |
| 65 | + string model = 3; |
| 66 | + uint64 owner_id = 4; |
| 67 | + uint32 year = 5; |
| 68 | + VEHICLE_TYPE type = 6; |
| 69 | + |
| 70 | + bool is_electric = 7; |
| 71 | + uint32 num_doors = 8; |
| 72 | + uint32 num_wheels = 9; |
| 73 | + uint32 num_windows = 10; |
| 74 | + uint32 wheel_size = 11; |
| 75 | + |
| 76 | + uint64 dry_weight = 12; |
| 77 | + uint64 trunk_volume = 13; |
| 78 | + double monetary_value = 14; |
| 79 | + |
| 80 | + // List of items in the trunk |
| 81 | + repeated TrunkItem trunk_items = 15; |
| 82 | + |
| 83 | + bool is_manual = 16; |
| 84 | +} |
| 85 | + |
| 86 | +message ParkingSpace |
| 87 | +{ |
| 88 | + Position pos = 1; |
| 89 | + bool has_electric_charger = 2; |
| 90 | + bool handicapped = 3; |
| 91 | + optional Vehicle vehicle = 4; |
| 92 | +} |
| 93 | + |
| 94 | +message ParkingFloor |
| 95 | +{ |
| 96 | + uint64 id = 1; |
| 97 | + |
| 98 | + uint32 num_cameras = 4; |
| 99 | + uint32 num_fire_exits = 5; |
| 100 | + uint32 num_sprinklers = 6; |
| 101 | + double area_sqft = 7; |
| 102 | + |
| 103 | + // inches because 'Murica |
| 104 | + // Also we don't want too many doubles because that |
| 105 | + // wouldn't be representative of most real-world use cases |
| 106 | + uint32 ceiling_height_inches = 8; |
| 107 | + |
| 108 | + // List of vehicles |
| 109 | + repeated ParkingSpace parking_spaces = 9; |
| 110 | +} |
| 111 | + |
| 112 | +message ParkingLot |
| 113 | +{ |
| 114 | + string name = 1; |
| 115 | + string district = 2; |
| 116 | + string phone_number = 3; |
| 117 | + uint64 id = 4; |
| 118 | + uint32 num_floors = 5; |
| 119 | + uint32 num_entrances = 6; |
| 120 | + uint32 num_attendants = 7; |
| 121 | + |
| 122 | + // List of floors |
| 123 | + repeated ParkingFloor floors = 8; |
| 124 | +} |
0 commit comments