package NWebmaster.proto;
option java_package = "ru.yandex.webmaster3.proto";

message UrlSample {
    required uint64 update_timestamp    = 1;
    required string url                 = 2;
    repeated string infection_chain     = 3;
}

message VerdictInfo {
    required string verdict     = 1;
    repeated UrlSample samples  = 2;
}

enum LockMode {
    TIMED           = 0;
    UNTIL_UPDATE    = 1;
}

enum DisplayMode {
    NONE    = 0;
    URLS    = 1;
    URLS_CHAINS = 2;
    URLS_NO_DATE = 3;
}

enum PropagationMode {
    OWNER        = 0;
    SUBDOMAINS   = 1;
}

message ThreatInfo {
    required string threat              = 1;
    required string sanction            = 2;
    required string threat_source_host  = 3;
    required bool allowed_to_recheck    = 4;
    required LockMode lock_mode         = 5;
    required DisplayMode display_mode    = 6;
    optional uint64 last_recheck        = 7;
    optional uint64 next_recheck        = 8;
    optional uint64 recheck_interval_s  = 9;
    optional uint64 confirmation_date   = 10;
    repeated VerdictInfo verdicts       = 11;
    optional PropagationMode propagation_mode = 12;
    optional string display_name = 13;
}

message HostThreats {
    repeated ThreatInfo threats = 1;
}
