blob: 8236376aa0f1d0f55b0c709f870c5805c9560b92 [file] [log] [blame]
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
syntax = "proto2";
package protobuf_unittest;
message TestMap {
message MessageValue {
optional int32 value = 1;
optional int32 second_value = 2 [default = 42];
}
enum EnumValue {
DEFAULT = 0;
BAR = 1;
BAZ = 2;
ZOP = 3;
}
map<int32, int32> int32_to_int32_field = 1;
map<int32, string> int32_to_string_field = 2;
map<int32, bytes> int32_to_bytes_field = 3;
map<int32, EnumValue> int32_to_enum_field = 4;
map<int32, MessageValue> int32_to_message_field = 5;
map<string, int32> string_to_int32_field = 6;
map<uint32, int32> uint32_to_int32_field = 7;
map<int64, int32> int64_to_int32_field = 8;
map<uint64, int32> uint64_to_int32_field = 9;
}
message Inner {
map<string, string> inner_map = 1;
}
message Outer {
optional Inner i = 1;
}
message Desugared {
message Int32ToString {
optional int32 key = 1;
optional string value = 2;
}
message StringToInt32 {
optional string key = 1;
optional int32 value = 2;
}
repeated Int32ToString int32_to_string_field = 2;
repeated StringToInt32 string_to_int32_field = 6;
}