syntax = "proto2";

// Envelope wrapping every message on the wire.
message ProtoMessage {
    required uint32 payloadType = 1;
    optional bytes payload = 2;
    optional string clientMsgId = 3;
}

enum ProtoPayloadType {
    PROTO_MESSAGE   = 5;
    ERROR_RES       = 50;
    HEARTBEAT_EVENT = 51;
}

message ProtoErrorRes {
    required uint32 payloadType = 1;
    required string errorCode   = 2;
    optional string description = 3;
}

message ProtoHeartbeatEvent {
    optional uint32 payloadType = 1;
}
