syntax = "proto3";

package test.syntax3;

import "common.proto";
import "external.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";

message Empty {}

message KitchenSink {
  // Standard enum
  enum Value {
    VALUE_UNKNOWN = 0;
    VALUE_A = 45;
    VALUE_B = 63;
  }

  // An enumeration without prefixed variants
  enum Prefix {
    UNKNOWN = 0;
    A = 66;
    B = 20;
  }

  enum MixedCase {
    MixedCaseUnknown = 0;
    MixedCASEA = 1;
    MixEdCaseB = 2;
    c = 3;
  }

  int32 i32 = 1;
  optional int32 optional_i32 = 2;
  repeated int32 repeated_i32 = 3;

  uint32 u32 = 4;
  optional uint32 optional_u32 = 5;
  repeated uint32 repeated_u32 = 6;

  int64 i64 = 7;
  optional int64 optional_i64 = 8;
  repeated int64 repeated_i64 = 9;

  uint64 u64 = 10;
  optional uint64 optional_u64 = 11;
  repeated uint64 repeated_u64 = 12;

  Value value = 13;
  optional Value optional_value = 14;
  repeated Value repeated_value = 15;

  Prefix prefix = 16;
  Empty empty = 17;

  map<string, string> string_dict = 18;
  map<string, Empty> message_dict = 19;
  map<string, Prefix> enum_dict = 20;
  map<int64, Prefix> int64_dict = 21;
  map<int32, Prefix> int32_dict = 22;
  map<int32, uint64> integer_dict = 23;

  bool bool = 24;
  optional bool optional_bool = 25;
  repeated bool repeated_bool = 26;

  oneof one_of {
    int32 one_of_i32 = 27;
    bool one_of_bool = 28;
    Value one_of_value = 29;
    Empty one_of_message = 30;
  }

  bytes bytes = 31;
  optional bytes optional_bytes = 32;
  repeated bytes repeated_bytes = 33;

  string string = 35;
  optional string optional_string = 36;

  google.protobuf.Duration duration = 37;
  google.protobuf.Timestamp timestamp = 38;

  // An externally defined message
  test.external.ExternMessage external_message = 39;
  test.external.ExternEnumeration external_enum = 40;

  // Messages from an external package
  test.common.CommonMessage common_message = 41;
  test.common.CommonEnumeration common_enum = 42;

  MixedCase mixed_case = 43;

  map<string, bytes> string_bytes_dict = 44;
  map<int32, bytes> int_bytes_dict = 45;

  // https://github.com/influxdata/pbjson/issues/27
  // map<bool, bytes> bool_bytes_dict = 46;

  google.protobuf.BoolValue bool_value = 47;
  google.protobuf.BytesValue bytes_value = 48;
  google.protobuf.DoubleValue double_value = 49;
  google.protobuf.FloatValue float_value = 51;
  google.protobuf.Int32Value int32_value = 52;
  google.protobuf.Int64Value int64_value = 53;
  google.protobuf.StringValue string_value = 54;
  google.protobuf.UInt32Value uint32_value = 55;
  google.protobuf.UInt64Value uint64_value = 56;

  repeated google.protobuf.Int32Value repeated_int32_value = 57;
  map<string, google.protobuf.Int32Value> map_int32_value = 58;
}