import "library/cpp/getoptpb/proto/confoption.proto";

package NRepack;

enum EOutputFormat {
    TSKV = 0 [(NGetoptPb.Val) = "TSKV"];
    TSV_WITH_HEADER = 1 [(NGetoptPb.Val) = "TSV_WITH_HEADER"];
    TSV = 2 [(NGetoptPb.Val) = "TSV"];
}

message TParams {
    optional bool Verbose = 1 [(NGetoptPb.Conf).Descr = "print debug info"];
    optional uint32 TestReadDocs = 2 [
        default = 1000,
        (NGetoptPb.Conf).Descr = "measure read latency by reading |test-read-docs| random documents from the output archive, can be 0"
    ];
    optional bool SkipRepacking = 3 [(NGetoptPb.Conf).Descr = "skip repacking if output archive exists. Do time measuring only"];
    optional string Delimiter = 4 [
        default = ",",
        (NGetoptPb.Conf).Descr = "delimiter used for splitting dimension values"
    ];
    optional EOutputFormat StatFormat = 5 [
        default = TSKV,
        (NGetoptPb.Conf).Descr = "output format for statistics"
    ];

    optional string InputDir = 10 [(NGetoptPb.Conf).Descr = "path to input archive directory"];
    optional string InputPrefix = 11 [
        default = "indexfullarc.full",
        (NGetoptPb.Conf).Descr = "input archive name prefix"
    ];
    optional string InputCompression = 12 [
        default = "COMPRESSED",
        (NGetoptPb.Conf).Descr = "input archive compression (RAW, COMPRESSED, COMPRESSED_EXT)"
    ];
    optional string InputAlgorithm = 13 [
        default = "LZ4",
        (NGetoptPb.Conf).Descr = "input compression algorithm (LZ4, LZMA) for COMPRESSED archive"
    ];

    optional uint32 InputMaxDocs = 14 [(NGetoptPb.Conf).Descr = "repack only |input-max-docs| documents from the input archive"];

    optional string OutputDir = 20 [(NGetoptPb.Conf).Descr = "path to output archive directory"];
    optional string OutputPrefix = 21 [
        default = "indexfullarc.full",
        (NGetoptPb.Conf).Descr = "output archive name prefix"
    ];
    optional string OutputCompression = 22 [
        default = "COMPRESSED",
        (NGetoptPb.Conf).Descr = "[SPLIT] output archive compression (RAW, COMPRESSED, COMPRESSED_EXT)"
    ];

    optional string OutputAlgorithm = 23 [
        default = "LZ4",
        (NGetoptPb.Conf).Descr = "[SPLIT] output compression algorithm (LZ4, LZMA) for COMPRESSED archive"
    ];
    optional string OutputLevel = 24 [
        default = "4294967295",
        (NGetoptPb.Conf).Descr = "[SPLIT] output compression level for COMPRESSED archive"
    ];
    optional string OutputCodecName = 25 [
        default = "lz4",
        (NGetoptPb.Conf).Descr = "[SPLIT] output codec name for COMPRESSED_EXT archive"
    ];
    optional string OutputBlockSize = 26 [
        default = "32768",
        (NGetoptPb.Conf).Descr = "[SPLIT] output block size for COMPRESSED_EXT archive"
    ];
    optional string OutputLearnSize = 27 [
        default = "261144",
        (NGetoptPb.Conf).Descr = "[SPLIT] output learn sample size for COMPRESSED_EXT archive, works only for trainable codecs"
    ];
    optional string OutputPartSizeLimit = 28 [
        default = "67108864",
        (NGetoptPb.Conf).Descr = "[SPLIT] output part size limit"
    ];
}
