carsales.proto 2.3 KB
Newer Older
Kenton Varda's avatar
Kenton Varda committed
1 2
// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors
// Licensed under the MIT License:
3
//
Kenton Varda's avatar
Kenton Varda committed
4 5 6 7 8 9
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
10
//
Kenton Varda's avatar
Kenton Varda committed
11 12
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
13
//
Kenton Varda's avatar
Kenton Varda committed
14 15 16 17 18 19 20
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
21

22
package capnp.benchmark.protobuf;
23

Kenton Varda's avatar
Kenton Varda committed
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
message ParkingLot {
  repeated Car car = 1;
}

message TotalValue {
  required uint64 amount = 1;
}

message Car {
  optional string make = 1;
  optional string model = 2;
  optional Color color = 3;
  optional uint32 seats = 4;
  optional uint32 doors = 5;
  repeated Wheel wheel = 6;
  optional uint32 length = 7;
  optional uint32 width = 8;
  optional uint32 height = 9;
  optional uint32 weight = 10;
  optional Engine engine = 11;
  optional float fuel_capacity = 12;
  optional float fuel_level = 13;
  optional bool has_power_windows = 14;
  optional bool has_power_steering = 15;
  optional bool has_cruise_control = 16;
  optional uint32 cup_holders = 17;
  optional bool has_nav_system = 18;
}

enum Color {
  BLACK = 0;
  WHITE = 1;
  RED = 2;
  GREEN = 3;
  BLUE = 4;
  CYAN = 5;
  MAGENTA = 6;
  YELLOW = 7;
  SILVER = 8;
}

message Wheel {
  optional uint32 diameter = 1;
  optional float air_pressure = 2;
  optional bool snow_tires = 3;
}

message Engine {
  optional uint32 horsepower = 1;
  optional uint32 cylinders = 2;
  optional uint32 cc = 3;
  optional bool uses_gas = 4;
  optional bool uses_electric = 5;
}