syntax = "proto2";

package Test.Scalar@PB_PACKAGE@;

message Empty
{
}

message Simple
{
    optional string value = 100;
}

message OptInt8
{
    //[[ field.type = "int8" ]]
    optional int32 value = 1;
}
message ReqInt8
{
    //[[ field.type = "int8" ]]
    required int32 value = 1;
}
message RepInt8
{
    //[[ field.type = "int8" ]]
    repeated int32 value = 1;
}
message RepPackInt8
{
    //[[ field.type = "int8" ]]
    repeated int32 value = 1 [ packed = true ];
}

message OptInt16
{
    //[[ field.type = "int16" ]]
    optional int32 value = 1;
}
message ReqInt16
{
    //[[ field.type = "int16" ]]
    required int32 value = 1;
}
message RepInt16
{
    //[[ field.type = "int16" ]]
    repeated int32 value = 1;
}
message RepPackInt16
{
    //[[ field.type = "int16" ]]
    repeated int32 value = 1 [ packed = true ];
}

message OptInt32
{
    optional int32 value = 1;
}
message ReqInt32
{
    required int32 value = 1;
}
message RepInt32
{
    repeated int32 value = 1;
}
message RepPackInt32
{
    repeated int32 value = 1 [ packed = true ];
}

message OptInt64
{
    optional int64 value = 1;
}
message ReqInt64
{
    required int64 value = 1;
}
message RepInt64
{
    repeated int64 value = 1;
}
message RepPackInt64
{
    repeated int64 value = 1 [ packed = true ];
}

message OptUint8
{
    //[[ field.type = "uint8" ]]
    optional uint32 value = 1;
}
message ReqUint8
{
    //[[ field.type = "uint8" ]]
    required uint32 value = 1;
}
message RepUint8
{
    //[[ field.type = "uint8" ]]
    repeated uint32 value = 1;
}
message RepPackUint8
{
    //[[ field.type = "uint8" ]]
    repeated uint32 value = 1 [ packed = true ];
}

message OptUint16
{
    //[[ field.type = "uint16" ]]
    optional uint32 value = 1;
}
message ReqUint16
{
    //[[ field.type = "uint16" ]]
    required uint32 value = 1;
}
message RepUint16
{
    //[[ field.type = "uint16" ]]
    repeated uint32 value = 1;
}
message RepPackUint16
{
    //[[ field.type = "uint16" ]]
    repeated uint32 value = 1 [ packed = true ];
}

message OptUint32
{
    optional uint32 value = 1;
}
message ReqUint32
{
    required uint32 value = 1;
}
message RepUint32
{
    repeated uint32 value = 1;
}
message RepPackUint32
{
    repeated uint32 value = 1 [ packed = true ];
}

message OptUint64
{
    optional uint64 value = 1;
}
message ReqUint64
{
    required uint64 value = 1;
}
message RepUint64
{
    repeated uint64 value = 1;
}
message RepPackUint64
{
    repeated uint64 value = 1 [ packed = true ];
}

message OptSint8
{
    //[[ field.type = "int8" ]]
    optional sint32 value = 1;
}
message ReqSint8
{
    //[[ field.type = "int8" ]]
    required sint32 value = 1;
}
message RepSint8
{
    //[[ field.type = "int8" ]]
    repeated sint32 value = 1;
}
message RepPackSint8
{
    //[[ field.type = "int8" ]]
    repeated sint32 value = 1 [ packed = true ];
}

message OptSint16
{
    //[[ field.type = "int16" ]]
    optional sint32 value = 1;
}
message ReqSint16
{
    //[[ field.type = "int16" ]]
    required sint32 value = 1;
}
message RepSint16
{
    //[[ field.type = "int16" ]]
    repeated sint32 value = 1;
}
message RepPackSint16
{
    //[[ field.type = "int16" ]]
    repeated sint32 value = 1 [ packed = true ];
}

message OptSint32
{
    optional sint32 value = 1;
}
message ReqSint32
{
    required sint32 value = 1;
}
message RepSint32
{
    repeated sint32 value = 1;
}
message RepPackSint32
{
    repeated sint32 value = 1 [ packed = true ];
}

message OptSint64
{
    optional sint64 value = 1;
}
message ReqSint64
{
    required sint64 value = 1;
}
message RepSint64
{
    repeated sint64 value = 1;
}
message RepPackSint64
{
    repeated sint64 value = 1 [ packed = true ];
}

message OptFixed32_8
{
    //[[ field.type = "uint8" ]]
    optional fixed32 value = 1;
}
message ReqFixed32_8
{
    //[[ field.type = "uint8" ]]
    required fixed32 value = 1;
}
message RepFixed32_8
{
    //[[ field.type = "uint8" ]]
    repeated fixed32 value = 1;
}
message RepPackFixed32_8
{
    //[[ field.type = "uint8" ]]
    repeated fixed32 value = 1 [ packed = true ];
}

message OptFixed32_16
{
    //[[ field.type = "uint16" ]]
    optional fixed32 value = 1;
}
message ReqFixed32_16
{
    //[[ field.type = "uint16" ]]
    required fixed32 value = 1;
}
message RepFixed32_16
{
    //[[ field.type = "uint16" ]]
    repeated fixed32 value = 1;
}
message RepPackFixed32_16
{
    //[[ field.type = "uint16" ]]
    repeated fixed32 value = 1 [ packed = true ];
}

message OptFixed32
{
    optional fixed32 value = 1;
}
message ReqFixed32
{
    required fixed32 value = 1;
}
message RepFixed32
{
    repeated fixed32 value = 1;
}
message RepPackFixed32
{
    repeated fixed32 value = 1 [ packed = true ];
}

message OptFixed64
{
    optional fixed64 value = 1;
}
message ReqFixed64
{
    required fixed64 value = 1;
}
message RepFixed64
{
    repeated fixed64 value = 1;
}
message RepPackFixed64
{
    repeated fixed64 value = 1 [ packed = true ];
}

message OptFixed64_8
{
    //[[ field.type = "uint8" ]]
    optional fixed64 value = 1;
}
message ReqFixed64_8
{
    //[[ field.type = "uint8" ]]
    required fixed64 value = 1;
}
message RepFixed64_8
{
    //[[ field.type = "uint8" ]]
    repeated fixed64 value = 1;
}

message RepPackFixed64_8
{
    //[[ field.type = "uint8" ]]
    repeated fixed64 value = 1 [ packed = true ];
}

message OptFixed64_16
{
    //[[ field.type = "uint16" ]]
    optional fixed64 value = 1;
}
message ReqFixed64_16
{
    //[[ field.type = "uint16" ]]
    required fixed64 value = 1;
}
message RepFixed64_16
{
    //[[ field.type = "uint16" ]]
    repeated fixed64 value = 1;
}
message RepPackFixed64_16
{
    //[[ field.type = "uint16" ]]
    repeated fixed64 value = 1 [ packed = true ];
}

message OptFixed64_32
{
    //[[ field.type = "uint32" ]]
    optional fixed64 value = 1;
}
message ReqFixed64_32
{
    //[[ field.type = "uint32" ]]
    required fixed64 value = 1;
}
message RepFixed64_32
{
    //[[ field.type = "uint32" ]]
    repeated fixed64 value = 1;
}
message RepPackFixed64_32
{
    //[[ field.type = "uint32" ]]
    repeated fixed64 value = 1 [ packed = true ];
}

message OptSfixed32_8
{
    //[[ field.type = "int8" ]]
    optional sfixed32 value = 1;
}
message ReqSfixed32_8
{
    //[[ field.type = "int8" ]]
    required sfixed32 value = 1;
}
message RepSfixed32_8
{
    //[[ field.type = "int8" ]]
    repeated sfixed32 value = 1;
}
message RepPackSfixed32_8
{
    //[[ field.type = "int8" ]]
    repeated sfixed32 value = 1 [ packed = true ];
}

message OptSfixed32_16
{
    //[[ field.type = "int16" ]]
    optional sfixed32 value = 1;
}
message ReqSfixed32_16
{
    //[[ field.type = "int16" ]]
    required sfixed32 value = 1;
}
message RepSfixed32_16
{
    //[[ field.type = "int16" ]]
    repeated sfixed32 value = 1;
}
message RepPackSfixed32_16
{
    //[[ field.type = "int16" ]]
    repeated sfixed32 value = 1 [ packed = true ];
}

message OptSfixed32
{
    optional sfixed32 value = 1;
}
message ReqSfixed32
{
    required sfixed32 value = 1;
}
message RepSfixed32
{
    repeated sfixed32 value = 1;
}
message RepPackSfixed32
{
    repeated sfixed32 value = 1 [ packed = true ];
}

message OptSfixed64_8
{
    //[[ field.type = "int8" ]]
    optional sfixed64 value = 1;
}
message ReqSfixed64_8
{
    //[[ field.type = "int8" ]]
    required sfixed64 value = 1;
}
message RepSfixed64_8
{
    //[[ field.type = "int8" ]]
    repeated sfixed64 value = 1;
}
message RepPackSfixed64_8
{
    //[[ field.type = "int8" ]]
    repeated sfixed64 value = 1 [ packed = true ];
}

message OptSfixed64_16
{
    //[[ field.type = "int16" ]]
    optional sfixed64 value = 1;
}
message ReqSfixed64_16
{
    //[[ field.type = "int16" ]]
    required sfixed64 value = 1;
}
message RepSfixed64_16
{
    //[[ field.type = "int16" ]]
    repeated sfixed64 value = 1;
}
message RepPackSfixed64_16
{
    //[[ field.type = "int16" ]]
    repeated sfixed64 value = 1 [ packed = true ];
}

message OptSfixed64_32
{
    //[[ field.type = "int32" ]]
    optional sfixed64 value = 1;
}
message ReqSfixed64_32
{
    //[[ field.type = "int32" ]]
    required sfixed64 value = 1;
}
message RepSfixed64_32
{
    //[[ field.type = "int32" ]]
    repeated sfixed64 value = 1;
}
message RepPackSfixed64_32
{
    //[[ field.type = "int32" ]]
    repeated sfixed64 value = 1 [ packed = true ];
}

message OptSfixed64
{
    optional sfixed64 value = 1;
}
message ReqSfixed64
{
    required sfixed64 value = 1;
}
message RepSfixed64
{
    repeated sfixed64 value = 1;
}
message RepPackSfixed64
{
    repeated sfixed64 value = 1 [ packed = true ];
}

message OptBool
{
    optional bool value = 1;
}
message ReqBool
{
    required bool value = 1;
}
message RepBool
{
    repeated bool value = 1;
}

message RepPackBool
{
    repeated bool value = 1 [ packed = true ];
}

message OptFloat
{
    optional float value = 1;
}
message ReqFloat
{
    required float value = 1;
}
message RepFloat
{
    repeated float value = 1;
}

message OptDouble
{
    optional double value = 1;
}
message ReqDouble
{
    required double value = 1;
}
message RepDouble
{
    repeated double value = 1;
}

message OptString
{
    optional string value = 1;
}
message ReqString
{
    required string value = 1;
}
message RepString
{
    repeated string value = 1;
}

message OptStringView
{
    optional string value = 1 [ctype = STRING_PIECE];
}
message ReqStringView
{
    required string value = 1 [ctype = STRING_PIECE];
}
message RepStringView
{
    repeated string value = 1 [ctype = STRING_PIECE];
}

message OptStringFixed {
    //[[ string.type = "std::array<$, 6>"]]
    //[[ string.include = "<array>"]]
    optional string value = 1;
}

message ReqStringFixed {
    //[[ string.type = "std::array<$, 6>"]]
    required string value = 1;
}

message RepStringFixed {
    //[[ string.type = "std::array<$, 6>"]]
    repeated string value = 1;
}

message OptBytesFixed {
    //[[ bytes.type = "std::array<$, 8>"]]
    //[[ bytes.include = "<array>"]]
    optional bytes value = 1;
}

message ReqBytesFixed {
    //[[ bytes.type = "std::array<$, 8>"]]
    required bytes value = 1;
}

message RepBytesFixed {
    //[[ bytes.type = "std::array<$, 8>"]]
    repeated bytes value = 1;
}

message OptBytes
{
    optional bytes value = 1;
}
message ReqBytes
{
    required bytes value = 1;
}
message RepBytes
{
    repeated bytes value = 1;
}

message OptBytesView
{
    optional bytes value = 1 [ctype = STRING_PIECE];
}
message ReqBytesView
{
    required bytes value = 1 [ctype = STRING_PIECE];
}
message RepBytesView
{
    repeated bytes value = 1 [ctype = STRING_PIECE];
}

message OptEnum
{
    enum Enum {
        Enum_min = -2147483648;
        Enum_max = 2147483647;
        Enum_value = 1;
        Enum_value2 = 2;
        Enum_value3 = 3;
    }
    
    optional Enum value = 1;
}

message ReqEnum
{
    enum Enum {
        Enum_min = -2147483648;
        Enum_max = 2147483647;
        Enum_value = 1;
        Enum_value2 = 2;
        Enum_value3 = 3;
    }
    
    required Enum value = 1;
}

message RepEnum
{
    enum Enum {
        Enum_min = -2147483648;
        Enum_max = 2147483647;
        Enum_value = 1;
        Enum_value2 = 2;
        Enum_value3 = 3;
    }
    
    repeated Enum value = 1;
}

message RepPackEnum
{
    enum Enum {
        Enum_min = -2147483648;
        Enum_max = 2147483647;
        Enum_value = 1;
        Enum_value2 = 2;
        Enum_value3 = 3;
    }
    
    repeated Enum value = 1 [packed = true];
}

message OptEnumInt8
{
    //[[ enum.type = "int8" ]]
    enum Enum {
        Enum_min = -128;
        Enum_max = 127;
        Enum_value = 1;
    }
    
    optional Enum value = 1;
}

message ReqEnumInt8
{
    //[[ enum.type = "int8" ]]
    enum Enum {
        Enum_min = -128;
        Enum_max = 127;
        Enum_value = 1;
    }
    
    required Enum value = 1;
}

message RepEnumInt8
{
    //[[ enum.type = "int8" ]]
    enum Enum {
        Enum_min = -128;
        Enum_max = 127;
        Enum_value = 1;
    }
    
    repeated Enum value = 1;
}

message OptEnumUint8
{
    //[[ enum.type = "uint8" ]]
    enum Enum {
        Enum_min = 0;
        Enum_max = 255;
        Enum_value = 1;
    }
    
    optional Enum value = 1;
}

message ReqEnumUint8
{
    //[[ enum.type = "uint8" ]]
    enum Enum {
        Enum_min = 0;
        Enum_max = 255;
        Enum_value = 1;
    }
    
    required Enum value = 1;
}

message RepEnumUint8
{
    //[[ enum.type = "uint8" ]]
    enum Enum {
        Enum_min = 0;
        Enum_max = 255;
        Enum_value = 1;
    }
    
    repeated Enum value = 1;
}

message OptEnumInt16
{
    //[[ enum.type = "int16" ]]
    enum Enum {
        Enum_min = -32768;
        Enum_max = 32767;
        Enum_value = 1;
    }
    
    optional Enum value = 1;
}

message ReqEnumInt16
{
    //[[ enum.type = "int16" ]]
    enum Enum {
        Enum_min = -32768;
        Enum_max = 32767;
        Enum_value = 1;
    }
    
    required Enum value = 1;
}

message RepEnumInt16
{
    //[[ enum.type = "int16" ]]
    enum Enum {
        Enum_min = -32768;
        Enum_max = 32767;
        Enum_value = 1;
    }
    
    repeated Enum value = 1;
}

message OptEnumUint16
{
    //[[ enum.type = "uint16" ]]
    enum Enum {
        Enum_min = 0;
        Enum_max = 65535;
        Enum_value = 1;
    }
    
    optional Enum value = 1;
}

message ReqEnumUint16
{
    //[[ enum.type = "uint16" ]]
    enum Enum {
        Enum_min = 0;
        Enum_max = 65535;
        Enum_value = 1;
    }
    
    required Enum value = 1;
}

message RepEnumUint16
{
    //[[ enum.type = "uint16" ]]
    enum Enum {
        Enum_min = 0;
        Enum_max = 65535;
        Enum_value = 1;
    }
    
    repeated Enum value = 1;
}

message OptEnumInt32
{
    //[[ enum.type = "int32" ]]
    enum Enum {
        Enum_min = -2147483648;
        Enum_max = 2147483647;
        Enum_value = 1;
    }
    
    optional Enum value = 1;
}

message ReqEnumInt32
{
    //[[ enum.type = "int32" ]]
    enum Enum {
        Enum_min = -2147483648;
        Enum_max = 2147483647;
        Enum_value = 1;
    }
    
    required Enum value = 1;
}

message RepEnumInt32
{
    //[[ enum.type = "int32" ]]
    enum Enum {
        Enum_min = -2147483648;
        Enum_max = 2147483647;
        Enum_value = 1;
    }
    
    repeated Enum value = 1;
}

message LargeFieldNumber
{
    optional string value = 100;
}

message VeryLargeFieldNumber
{
    optional string value = 536870911; // 2^29 - 1
}

message ReqUint8_1
{
    //[[ field.type = "uint8:1" ]]
    required uint32 value = 1;
}

message ReqUint8_2
{
    //[[ field.type = "uint8:2" ]]
    required uint32 value = 1;
}

message ReqUint16_1
{
    //[[ field.type = "uint16:1" ]]
    required uint32 value = 1;
}

message ReqUint16_2
{
    //[[ field.type = "uint16:2" ]]
    required uint32 value = 1;
}

message ReqUint32_1
{
    //[[ field.type = "uint32:1" ]]
    required uint32 value = 1;
}

message ReqUint32_2
{
    //[[ field.type = "uint32:2" ]]
    required uint32 value = 1;
}

message ReqInt8_1
{
    //[[ field.type = "int8:1" ]]
    required int32 value = 1;
}

message ReqInt8_2
{
    //[[ field.type = "int8:2" ]]
    required int32 value = 1;
}

message ReqInt16_1
{
    //[[ field.type = "int16:1" ]]
    required int32 value = 1;
}

message ReqInt16_2
{
    //[[ field.type = "int16:2" ]]
    required int32 value = 1;
}

message ReqInt32_1
{
    //[[ field.type = "int32:1" ]]
    required int32 value = 1;
}

message ReqInt32_2
{
    //[[ field.type = "int32:2" ]]
    required int32 value = 1;
}

message ReqInt64_1
{
    //[[ field.type = "int64:1" ]]
    required int64 value = 1;
}

message ReqInt64_2
{
    //[[ field.type = "int64:2" ]]
    required int64 value = 1;
}

message ReqSint8_1
{
    //[[ field.type = "int8:1" ]]
    required sint32 value = 1;
}

message ReqSint8_2
{
    //[[ field.type = "int8:2" ]]
    required sint32 value = 1;
}

message ReqSint16_1
{
    //[[ field.type = "int16:1" ]]
    required sint32 value = 1;
}

message ReqSint16_2
{
    //[[ field.type = "int16:2" ]]
    required sint32 value = 1;
}

message ReqSint32_1
{
    //[[ field.type = "int32:1" ]]
    required sint32 value = 1;
}

message ReqSint32_2
{
    //[[ field.type = "int32:2" ]]
    required sint32 value = 1;
}

message ReqSint64_1
{
    //[[ field.type = "int64:1" ]]
    required sint64 value = 1;
}

message ReqSint64_2
{
    //[[ field.type = "int64:2" ]]
    required sint64 value = 1;
}

message ReqFixed32_8_1
{
    //[[ field.type = "uint8:1" ]]
    required fixed32 value = 1;
}

message ReqFixed32_8_2
{
    //[[ field.type = "uint8:2" ]]
    required fixed32 value = 1;
}

message ReqFixed32_16_1
{
    //[[ field.type = "uint16:1" ]]
    required fixed32 value = 1;
}

message ReqFixed32_16_2
{
    //[[ field.type = "uint16:2" ]]
    required fixed32 value = 1;
}

message ReqFixed32_32_1
{
    //[[ field.type = "uint32:1" ]]
    required fixed32 value = 1;
}

message ReqFixed32_32_2
{
    //[[ field.type = "uint32:2" ]]
    required fixed32 value = 1;
}

message ReqSfixed32_8_1
{
    //[[ field.type = "int8:1" ]]
    required sfixed32 value = 1;
}

message ReqSfixed32_8_2
{
    //[[ field.type = "int8:2" ]]
    required sfixed32 value = 1;
}

message ReqSfixed32_16_1
{
    //[[ field.type = "int16:1" ]]
    required sfixed32 value = 1;
}

message ReqSfixed32_16_2
{
    //[[ field.type = "int16:2" ]]
    required sfixed32 value = 1;
}

message ReqSfixed32_32_1
{
    //[[ field.type = "int32:1" ]]
    required sfixed32 value = 1;
}

message ReqSfixed32_32_2
{
    //[[ field.type = "int32:2" ]]
    required sfixed32 value = 1;
}

message ReqFixed64_8_1
{
    //[[ field.type = "uint8:1" ]]
    required fixed64 value = 1;
}

message ReqFixed64_8_2
{
    //[[ field.type = "uint8:2" ]]
    required fixed64 value = 1;
}

message ReqFixed64_16_1
{
    //[[ field.type = "uint16:1" ]]
    required fixed64 value = 1;
}

message ReqFixed64_16_2
{
    //[[ field.type = "uint16:2" ]]
    required fixed64 value = 1;
}

message ReqFixed64_32_1
{
    //[[ field.type = "uint32:1" ]]
    required fixed64 value = 1;
}

message ReqFixed64_32_2
{
    //[[ field.type = "uint32:2" ]]
    required fixed64 value = 1;
}

message ReqFixed64_64_1
{
    //[[ field.type = "uint64:1" ]]
    required fixed64 value = 1;
}

message ReqFixed64_64_2
{
    //[[ field.type = "uint64:2" ]]
    required fixed64 value = 1;
}

message ReqSfixed64_8_1
{
    //[[ field.type = "int8:1" ]]
    required sfixed64 value = 1;
}

message ReqSfixed64_8_2
{
    //[[ field.type = "int8:2" ]]
    required sfixed64 value = 1;
}

message ReqSfixed64_16_1
{
    //[[ field.type = "int16:1" ]]
    required sfixed64 value = 1;
}

message ReqSfixed64_16_2
{
    //[[ field.type = "int16:2" ]]
    required sfixed64 value = 1;
}

message ReqSfixed64_32_1
{
    //[[ field.type = "int32:1" ]]
    required sfixed64 value = 1;
}

message ReqSfixed64_32_2
{
    //[[ field.type = "int32:2" ]]
    required sfixed64 value = 1;
}

message ReqSfixed64_64_1
{
    //[[ field.type = "int64:1" ]]
    required sfixed64 value = 1;
}

message ReqSfixed64_64_2
{
    //[[ field.type = "int64:2" ]]
    required sfixed64 value = 1;
}

message OptEnumAlias
{
    enum Enum
    {
        option allow_alias = true;
        EAA_UNSPECIFIED = 0;
        EAA_STARTED = 1;
        EAA_RUNNING = 1;
        EAA_FINISHED = 2;
    }

    optional Enum value = 1;
}
message ReqEnumAlias
{
    enum Enum
    {
        option allow_alias = true;
        EAA_UNSPECIFIED = 0;
        EAA_STARTED = 1;
        EAA_RUNNING = 1;
        EAA_FINISHED = 2;
    }

    required Enum value = 1;
}

message RepEnumAlias
{
    enum Enum
    {
        option allow_alias = true;
        EAA_UNSPECIFIED = 0;
        EAA_STARTED = 1;
        EAA_RUNNING = 1;
        EAA_FINISHED = 2;
    }
    repeated Enum value = 1;
}

message RepPackEnumAlias
{
    enum Enum
    {
        option allow_alias = true;
        EAA_UNSPECIFIED = 0;
        EAA_STARTED = 1;
        EAA_RUNNING = 1;
        EAA_FINISHED = 2;
    }

    repeated Enum value = 1 [ packed = true ];
}
