/* This .proto file contains Result message definitions for reply-style messaging */
syntax = "proto3";

import "protobunny/commons.proto";
import "google/protobuf/any.proto";

package results;


enum ReturnCode {
    MSG_FAILURE = 0;
    FAILURE = 1;
    IN_PROGRESS = 2;
    SUCCESS = 3;
    PENDING = 4;
}

message Result {
    /** The source message. It is transparently deserialized by the `source` property
    ex.
    >>> msg = ml.mypackage.MyMessage(content="test")
    >>> result = msg.make_result()
    >>> assert msg == result.source
    **/
    google.protobuf.Any source_message=1;
    ReturnCode return_code=2;
    optional string error=3;
    optional commons.JsonContent return_value=4;
}
