syntax = "proto3";

package fetch.aea.TwoPartyNegotiation;

message TwoPartyNegotiationMessage{

    // Custom Types
    message DataModel{
        bytes data_model = 1;
    }

    message IOTApp7{
        bytes iot_app_7 = 1;
    }

    message Unit{
        bytes unit = 1;
    }


    // Performatives and contents
    message Cfp{
        DataModel query = 1;
    }

    message Propose{
        int32 number = 1;
        float price = 2;
        string description = 3;
        bool flag = 4;
        DataModel query = 5;
        map<string, IOTApp7> proposal = 6;
        repeated int32 rounds = 7;
        repeated Unit items = 8;
        string conditions_type_str = 9;
        map<string, int32> conditions_type_dict_of_str_int = 10;
        repeated DataModel conditions_type_set_of_DataModel = 11;
        map<string, float> conditions_type_dict_of_str_float = 12;
    }

    message Accept{}

    message Inform{
        repeated int32 inform_number = 1;
    }

    message Inform_Reply{
        map<int32, string> reply_message = 1;
    }

    message Decline{}

    message Match_Accept{}


    // Standard TwoPartyNegotiationMessage fields
    int32 message_id = 1;
    string dialogue_starter_reference = 2;
    string dialogue_responder_reference = 3;
    int32 target = 4;
    oneof performative{
        Accept accept = 5;
        Cfp cfp = 6;
        Decline decline = 7;
        Inform inform = 8;
        Inform_Reply inform_reply = 9;
        Match_Accept match_accept = 10;
        Propose propose = 11;
    }
}
