syntax = "proto3";

package repeated;

enum Enum {
    A = 0;
    B = 1;
}

message Message {
    // Packed by default.
    repeated int32 int32s = 1;

    // Can not be packed.
    repeated Message messages = 2;

    repeated string strings = 3;
    repeated bytes bytes = 4;
}

message MessageScalarValueTypes {
    repeated int32 int32s = 1;
    repeated int64 int64s = 2;
    repeated sint32 sint32s = 3;
    repeated sint64 sint64s = 4;
    repeated uint32 uint32s = 5;
    repeated uint64 uint64s = 6;
    repeated fixed32 fixed32s = 7;
    repeated fixed64 fixed64s = 8;
    repeated sfixed32 sfixed32s = 9;
    repeated sfixed64 sfixed64s = 10;
    repeated float floats = 11;
    repeated double doubles = 12;
    repeated bool bools = 13;
    repeated string strings = 14;
    repeated bytes bytess = 15;
}

message MessageScalarValueTypesPacked {
    repeated int32 int32s = 1 [packed=true];
    repeated int64 int64s = 2 [packed=true];
    repeated sint32 sint32s = 3 [packed=true];
    repeated sint64 sint64s = 4 [packed=true];
    repeated uint32 uint32s = 5 [packed=true];
    repeated uint64 uint64s = 6 [packed=true];
    repeated fixed32 fixed32s = 7 [packed=true];
    repeated fixed64 fixed64s = 8 [packed=true];
    repeated sfixed32 sfixed32s = 9 [packed=true];
    repeated sfixed64 sfixed64s = 10 [packed=true];
    repeated float floats = 11 [packed=true];
    repeated double doubles = 12 [packed=true];
    repeated bool bools = 13 [packed=true];
    repeated string strings = 14;
    repeated bytes bytess = 15;
}

message MessageScalarValueTypesNotPacked {
    repeated int32 int32s = 1 [packed=false];
    repeated int64 int64s = 2 [packed=false];
    repeated sint32 sint32s = 3 [packed=false];
    repeated sint64 sint64s = 4 [packed=false];
    repeated uint32 uint32s = 5 [packed=false];
    repeated uint64 uint64s = 6 [packed=false];
    repeated fixed32 fixed32s = 7 [packed=false];
    repeated fixed64 fixed64s = 8 [packed=false];
    repeated sfixed32 sfixed32s = 9 [packed=false];
    repeated sfixed64 sfixed64s = 10 [packed=false];
    repeated float floats = 11 [packed=false];
    repeated double doubles = 12 [packed=false];
    repeated bool bools = 13 [packed=false];
    repeated string strings = 14;
    repeated bytes bytess = 15;
}

message Foo {
    repeated Message messages = 1;
    repeated Enum enums = 2;
}

message Bar {
    message Fie {
        repeated Foo inner_foos = 1;
    }

    repeated Foo foos = 1;
    repeated Fie fies = 2;
}
