syntax="proto2";

package brpc.policy;
option java_package = "com.brpc.policy";
option java_outer_classname = "PublicPbrpcProto";

message PublicPbrpcRequest{
    optional RequestHead requestHead = 1;
    repeated RequestBody requestBody = 2;
}
message RequestHead{
    optional string from_host = 1;
    optional uint32 content_type = 2;
    optional bool connection = 3;
    optional string charset = 4;
    optional string accept_charset = 5;
    optional string create_time = 6;
    optional uint64 log_id = 7;
    optional uint32 compress_type = 8;
}
message RequestBody{
    optional string version = 1;
    optional string charset = 2;
    required string service = 3;
    required uint32 method_id = 4;
    required uint64 id = 5;
    optional bytes serialized_request = 6;
}
message PublicPbrpcResponse {
    optional ResponseHead responseHead = 1;
    repeated ResponseBody responseBody = 2;
}
message ResponseHead{
    required sint32 code = 1;
    optional string text = 2;
    optional string from_host = 3;
    optional uint32 compress_type = 4;
}
message ResponseBody{
    optional bytes serialized_response = 1;
    optional string version = 2;
    optional int32 error = 3;
    required uint64 id = 4;
}
