import "mapreduce/yt/interface/protos/extension.proto";

package NWebmaster.NAcceptance.NProto;

message TTopHost {
    optional string Host        = 1 [(NYT.column_name) = "Host"];
    optional uint64 Clicks      = 2 [(NYT.column_name) = "Clicks"];
}

message THostMirror {
    optional string Host        = 1 [(NYT.column_name) = "Host"];
    optional string MainHost    = 2 [(NYT.column_name) = "MainHost"];
}

message TAntiallThreatSrc {
    optional string Host            = 1 [(NYT.column_name) = "host"];
    optional string Threat          = 2 [(NYT.column_name) = "threat"];
}

message TAntiallThreat {
    optional string Host            = 1 [(NYT.column_name) = "Host"];
    optional string Threat          = 2 [(NYT.column_name) = "Threat"];
    optional bool FromPrevSnapshot  = 3 [(NYT.column_name) = "FromPrevSnapshot"];
}

message TStatisticsAnti {
    optional int64 FullHostCount    = 1 [(NYT.column_name) = "FullHostCount"];
    optional int64 DiffHostCount    = 2 [(NYT.column_name) = "DiffHostCount"];
    optional double ChangesShare    = 3 [(NYT.column_name) = "ChangesShare"];
    optional string Timestamp       = 4 [(NYT.column_name) = "Timestamp"];
}

message TStatisticsMirrors {
    optional string CurrentTableState= 1 [(NYT.column_name) = "CurrentTableState"];
    optional string NextTableState   = 2 [(NYT.column_name) = "NextTableState"];
    optional int64 FullHostCount    = 3 [(NYT.column_name) = "FullHostCount"];
    optional int64 DiffHostCount    = 4 [(NYT.column_name) = "DiffHostCount"];
    optional double ChangesShare    = 5 [(NYT.column_name) = "ChangesShare"];
    optional string Timestamp       = 6 [(NYT.column_name) = "Timestamp"];
    optional int64 HttpToHttps      = 7 [(NYT.column_name) = "HttpToHttps"];
    optional int64 HttpsToHttp      = 8 [(NYT.column_name) = "HttpsToHttp"];
    optional int64 AddChangesWWW       = 9 [(NYT.column_name) = "AddChangesWWW"];
    optional int64 DeleteChangesWWW       = 10 [(NYT.column_name) = "DeleteChangesWWW"];
}

message THostStatisticsDiff {
    optional string Host                                = 1 [(NYT.key_column_name) = "Host"];
    optional int64 Timestamp                            = 2 [(NYT.key_column_name) = "Timestamp"];
    optional double DiffCount                           = 3 [(NYT.column_name) = "DiffCount"];
    optional double DiffAverageFetchTime                = 4 [(NYT.column_name) = "DiffAverageFetchTime"];
    optional double DiffNumOfDocs                       = 5 [(NYT.column_name) = "DiffNumOfDocs"];
    optional double DiffNumOfDocsEmptyMetaDescr         = 6 [(NYT.column_name) = "DiffNumOfDocsEmptyMetaDescr"];
    optional double DiffNumOfDocsEmptyTitle             = 7 [(NYT.column_name) = "DiffNumOfDocsEmptyTitle"];
    optional double DiffNumOfDocsEncodingUnknown        = 8 [(NYT.column_name) = "DiffNumOfDocsEncodingUnknown"];
    optional double DiffNumOfDocsEncodingUnsupported    = 9 [(NYT.column_name) = "DiffNumOfDocsEncodingUnsupported"];
    optional double DiffNumOfDocsHtml                   = 10 [(NYT.column_name) = "DiffNumOfDocsHtml"];
    optional double DiffNumOfDocsOnSearch               = 11 [(NYT.column_name) = "DiffNumOfDocsOnSearch"];
}

message THostStatusDiff {
    optional string Host                                = 1 [(NYT.key_column_name) = "Host"];
    optional int64 Timestamp                            = 2 [(NYT.key_column_name) = "Timestamp"];
    optional double DiffLastAccess                      = 3 [(NYT.column_name) = "DiffLastAccess"];
    optional double DiffHostStatus                      = 4 [(NYT.column_name) = "DiffHostStatus"];
    optional double DiffHasSslCertErrors                = 5 [(NYT.column_name) = "DiffHasSslCertErrors"];
}

message THostFaceProblemDiff {
    optional string Host                                = 1 [(NYT.key_column_name) = "Host"];
    optional int64 Timestamp                            = 2 [(NYT.key_column_name) = "Timestamp"];
    optional double DiffLastAccess                      = 3 [(NYT.column_name) = "DiffLastAccess"];
    optional double DiffHttpCode                        = 4 [(NYT.column_name) = "DiffHttpCode"];
    optional double DiffFetchTime                       = 5 [(NYT.column_name) = "DiffFetchTime"];
}

message THostProblemsDiff {
    optional string Host                                = 1 [(NYT.key_column_name) = "Host"];
    optional int64 Timestamp                            = 2 [(NYT.key_column_name) = "Timestamp"];
    optional double DiffType                            = 3 [(NYT.column_name) = "DiffType"];
    optional double DiffActualSince                     = 4 [(NYT.column_name) = "DiffActualSince"];
    optional double DiffLastUpdate                      = 5 [(NYT.column_name) = "DiffLastUpdate"];
}

message THostRegionsDiff {
    optional string Host                                = 1 [(NYT.key_column_name) = "Host"];
    optional int64 Timestamp                            = 2 [(NYT.key_column_name) = "Timestamp"];
    optional double DiffMainHost                        = 3 [(NYT.column_name) = "DiffMainHost"];
    optional double DiffDictionaryRegions               = 4 [(NYT.column_name) = "DiffDictionaryRegions"];
    optional double DiffWebmasterRegions                = 5 [(NYT.column_name) = "DiffWebmasterRegions"];
}

message TRobotsDiff {
    optional string Host                    = 1 [(NYT.key_column_name) = "Host"];
    optional int64 Timestamp                = 2 [(NYT.key_column_name) = "Timestamp"];
    optional double DiffCount               = 3 [(NYT.column_name) = "DiffCount"];
    optional double DiffLevel2ndHost        = 4 [(NYT.column_name) = "DiffLevel2ndHost"];
    optional double DiffLevel2ndHostInDb    = 5 [(NYT.column_name) = "DiffLevel2ndHostInDb"];
    optional double DiffContentLength       = 6 [(NYT.column_name) = "DiffContentLength"];
    optional double DiffDisallowAll         = 7 [(NYT.column_name) = "DiffDisallowAll"];
    optional double DiffHostDirectiveLength = 8 [(NYT.column_name) = "DiffHostDirectiveLength"];
    optional double DiffHttpCode            = 9 [(NYT.column_name) = "DiffHttpCode"];
    optional double DiffNumOfAcceptedLines  = 10 [(NYT.column_name) = "DiffNumOfAcceptedLines"];
    optional double DiffNumOfCleanParams    = 11 [(NYT.column_name) = "DiffNumOfCleanParams"];
    optional double DiffNumOfErrors         = 12 [(NYT.column_name) = "DiffNumOfErrors"];
    optional double DiffNumOfSitemaps       = 13 [(NYT.column_name) = "DiffNumOfSitemaps"];
    optional double DiffNumOfWarnings       = 14 [(NYT.column_name) = "DiffNumOfWarnings"];
}

message TDisallowedUrlsDiff {
    optional string Host                = 1 [(NYT.key_column_name) = "Host"];
    optional string State               = 2 [(NYT.column_name) = "State"];
    optional double DiffSamplesSizes    = 3 [(NYT.column_name) = "DiffSamplesSizes"];
    optional double DiffAverageClicks   = 4 [(NYT.column_name) = "DiffAverageClicks"];
}

enum EAchievementDiffType {
    APPEARED = 0;
    DISAPPEARED = 1;
    CHANGED_NUMERIC_INCREASE = 2;
    CHANGED_NUMERIC_DECREASE = 3;
    CHANGED = 4;
}

enum EAchievementNumericChangeType {
    INCREASE = 0;
    DECREASE = 1;
}

message TAchievementsDiffTmp {
    optional string Achievement            = 1 [(NYT.key_column_name) = "Achievement"];
    optional int64 DiffCount               = 2 [(NYT.column_name) = "DiffCount"];
    optional int64 NotNull                 = 3 [(NYT.column_name) = "NotNull"];
    optional EAchievementDiffType DiffType = 4 [(NYT.column_name) = "DiffType", (NYT.flags) = SERIALIZATION_YT, (NYT.flags) = ENUM_INT];
}

message TAchievementsDiff {
    optional string Achievement            = 1 [(NYT.key_column_name) = "Achievement"];
    optional double ResultDiff             = 2 [(NYT.column_name) = "ResultDiff"];
    optional EAchievementDiffType DiffType = 3 [(NYT.column_name) = "DiffType", (NYT.flags) = SERIALIZATION_YT, (NYT.flags) = ENUM_INT];
}

message TAchievementsDiffArchive {
    optional string Achievement            = 1 [(NYT.key_column_name) = "Achievement"];
    optional double ResultDiff             = 2 [(NYT.column_name) = "ResultDiff"];
    optional EAchievementDiffType DiffType = 3 [(NYT.column_name) = "DiffType", (NYT.flags) = SERIALIZATION_YT, (NYT.flags) = ENUM_INT];
    optional int64  Timestamp              = 4 [(NYT.column_name) = "Timestamp"];
}