syntax = "proto3";
option java_package = "org.opennms.features.kafka.consumer.events";
option java_outer_classname = "EventsProto";

// The values differ from the standard codes in OpenNMS
// since proto3 enforces us to start at 0
enum Severity {
    INDETERMINATE = 0;
    CLEARED = 1;
    NORMAL = 2;
    WARNING = 3;
    MINOR = 4;
    MAJOR = 5;
    CRITICAL = 6;
}

message EventParameter {
    string name = 1;
    string value = 2;
}

message Event {
    string uei = 1; // required field
    string source = 2; // required field
    Severity severity = 3; // required field
    string host = 4;
    uint32 node_id = 5;
    string ip_address = 6;
    string service_name = 7;
    uint32 if_index = 8;
    string description = 9;
    string dist_poller = 10;
    string log_dest = 11;
    string log_content = 12;
    repeated EventParameter parameter = 13;
}