syntax = "proto3";

package graphs;

import "graph.proto";
import "shared_messages.proto";

option cc_enable_arenas = true;

enum AttributeType {
    UNKNOWN_ATTRIBUTE_TYPE = 0;
    VERTEX = 1;
    EDGE = 2;
};

message IntAttributes {
    repeated sint64 attributes = 1;
    AttributeType type = 2;
};

message DoubleAttributes {
    repeated double attributes = 1;
    AttributeType type = 2;
};

message GenericRequest {
    Graph graph = 1;

    repeated VertexCoordinates vertexCoordinates = 2;
    repeated double edgeCosts = 3;
    repeated double vertexCosts = 4;

    map<string, IntAttributes> intAttributes = 5;
    map<string, DoubleAttributes> doubleAttributes = 6;
    map<string, string> graphAttributes = 7;

    // These are static, just copied from request to response
    map<string, string> staticAttributes = 8;
};

message GenericResponse {
    Graph graph = 1;

    repeated VertexCoordinates vertexCoordinates = 2;
    repeated double edgeCosts = 3;
    repeated double vertexCosts = 4;

    map<string, IntAttributes> intAttributes = 5;
    map<string, DoubleAttributes> doubleAttributes = 6;
    map<string, string> graphAttributes = 7;

    // These are static, just copied from request to response
    map<string, string> staticAttributes = 8;
};
