// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors
// Licensed under the MIT License:
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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.

package capnp.benchmark.protobuf;

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;
}