syntax = "proto3";

// 'index.proto' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

option java_package = "com.ara.protobuf";
option java_multiple_files = true;
option java_outer_classname = "CFSNetProtobuf";
option objc_class_prefix = "CFSPB";
option csharp_namespace = "Ara.CFSNet.Protobuf";

// 'cfsnet' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

package ara.cfsnet;

// 'cfsnet/AccessFile' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message AccessFile {
  string path = 1;
  FileMode mode = 2;
}

// 'cfsnet/FileMode' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

enum FileMode {
  F_OK = 0;
  X_OK = 1;
  W_OK = 2;
  R_OK = 4;
}

// 'cfsnet/Boolean' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Boolean {
  bool value = 1;
}

// 'cfsnet/Buffer' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Buffer {
  bytes value = 1;
  uint64 length = 2;
}

// 'cfsnet/Close' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Close {
  uint32 fileDescriptor = 1;
}

// 'cfsnet/DownloadDirectory' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message DownloadDirectory {
  string path = 1;
}

// 'cfsnet/DownloadFile' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message DownloadFile {
  string path = 1;
}

// 'cfsnet/Drive' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Drive {
  bytes id = 1;
  bytes key = 2;
  bytes secretKey = 3;
}

// 'cfsnet/ErrorCode' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

enum ErrorCode {
  NoError = 0;
  BadRequestError = 400;
  AccessDeniedError = 403;
  NotFoundError = 404;
  NotSupportedError = 405;
  NotOpenedError = 410;
  InternalError = 500;
  NotImplementedError = 501;
}

// 'cfsnet/Handshake' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Handshake {
  bytes nonce = 1;
  bytes key = 2;
  bool ack = 3;
}

// 'cfsnet/KeyPair' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message KeyPair {
  bytes seed = 1;
  bytes publicKey = 2;
  bytes secretKey = 3;
}

// 'cfsnet/List' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message List {
  repeated bytes values = 1;
  uint64 length = 2;
}

// 'cfsnet/ListDirectory' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message ListDirectory {
  string path = 1;
}

// 'cfsnet/MakeDirectory' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message MakeDirectory {
  string path = 1;
}

// 'cfsnet/MakeDirectoryPath' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message MakeDirectoryPath {
  string path = 1;
}

// 'cfsnet/Number' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Number {
  double value = 1;
}

// 'cfsnet/Open' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Open {
  string path = 1;
  string flags = 2;
}

// 'cfsnet/Operation' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

enum Operation {
  NoOperation = 0;
  ResolveOperation = 1;
  KeyPairOperation = 2;
  OpenOperation = 10;
  CloseOperation = 11;
  ReadOperation = 12;
  WriteOperation = 13;
  ReadFileOperation = 20;
  WriteFileOperation = 21;
  StatFileOperation = 22;
  UnlinkFileOperation = 23;
  AccessFileOperation = 24;
  TouchFileOperation = 25;
  DownloadFileOperation = 26;
  DownloadDirectoryOperation = 30;
  MakeDirectoryOperation = 31;
  MakeDirectoryPathOperation = 32;
  RemoveDirectoryOperation = 33;
  RemoveDirectoryPathOperation = 34;
  ListDirectoryOperation = 35;
}

// 'cfsnet/Read' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Read {
  uint32 fileDescriptor = 1;
  uint32 start = 2;
  uint32 end = 3;
}

// 'cfsnet/ReadFile' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message ReadFile {
  string path = 1;
  uint32 start = 2;
  uint32 end = 3;
}

// 'cfsnet/RemoveDirectory' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message RemoveDirectory {
  string path = 1;
}

// 'cfsnet/RemoveDirectoryPath' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message RemoveDirectoryPath {
  string path = 1;
}

// 'cfsnet/Request' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Request {
  bytes nonce = 1;
  Drive drive = 2;
  Operation operation = 3;
  bytes buffer = 4;
}

// 'cfsnet/Resolve' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Resolve {
  string path = 1;
}

// 'cfsnet/Response' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Response {
  bytes nonce = 1;
  Drive drive = 2;
  Operation operation = 3;
  Request request = 4;
  ErrorCode errorCode = 5;
  bytes buffer = 6;
}

// 'cfsnet/Stat' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message Stat {
  uint32 uid = 1;
  uint32 gid = 2;
  uint32 mode = 3;
  uint64 size = 4;
  uint64 atime = 5;
  uint64 ctime = 6;
  uint64 mtime = 7;
  uint64 blocks = 8;
}

// 'cfsnet/StatFile' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message StatFile {
  string path = 1;
}

// 'cfsnet/String' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message String {
  string value = 1;
}

// 'cfsnet/TouchFile' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message TouchFile {
  string path = 1;
}

// 'cfsnet/UnlinkFile' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message UnlinkFile {
  string path = 1;
}

// 'cfsnet/WriteFile' generated on Tue Nov 27 2018 13:24:58 GMT-0500 (Eastern Standard Time)syntax = "proto3";

message WriteFile {
  string path = 1;
  bytes buffer = 2;
  uint32 start = 3;
  uint32 end = 4;
}
