syntax = "proto2"; package biomaj.download; message File { // Name of the file required string name = 1; // Location on remote server, defaults to root directory optional string root = 2; // Save file under different name optional string save_as = 3; // Specific file url optional string url = 4; message MetaData { optional string permissions = 1; optional string group = 2; optional int64 size = 3; optional string hash = 4; optional int32 year = 5; optional int32 month = 6; optional int32 day = 7; optional string format = 8; optional string md5 = 9; optional int64 download_time = 10; } optional MetaData metadata = 5; } message FileList { repeated File files = 1; } message Operation { enum OPERATION { LIST = 0; DOWNLOAD = 1; PROCESS = 2; } required OPERATION type = 1; optional DownloadFile download = 2; optional Process process = 3; message Trace { required string trace_id = 1; required string span_id = 2; } optional Trace trace = 4; } message Process { required string exec = 1; } message DownloadFile { required string bank = 1; required string session = 2; required string local_dir = 3; optional int32 timeout_download = 4; enum Protocol { FTP = 0; FTPS = 1; HTTP = 2; HTTPS = 3; DIRECTFTP = 4; DIRECTHTTP = 5; DIRECTHTTPS = 6; LOCAL = 7; RSYNC = 8; IRODS = 9; DIRECTFTPS = 10; } message Param { required string name = 1; required string value = 2; } message HttpParse { required string dir_line = 1 [default = '[\\s]*.*([\\d]{2}-[\\w\\d]{2,5}-[\\d]{4}\\s[\\d]{2}:[\\d]{2})']; required string file_line = 2 [default = '[\\s] options = 9; }