syntax = "proto3";

package nnext;

import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";

service Snapshots {
  /*
 Create collection snapshot
  */
  rpc Create (CreateSnapshotRequest) returns (CreateSnapshotResponse) {}
  /*
  List collection snapshots
   */
  rpc List (ListSnapshotsRequest) returns (ListSnapshotsResponse) {}
  /*
  Create full storage snapshot
  */
  rpc CreateFull (CreateFullSnapshotRequest) returns (CreateSnapshotResponse) {}
  /*
  List full storage snapshots
   */
  rpc ListFull (ListFullSnapshotsRequest) returns (ListSnapshotsResponse) {}

}

message CreateFullSnapshotRequest {}

message ListFullSnapshotsRequest {}

message CreateSnapshotRequest {
  string collection_name = 1; // Name of the collection
}

message ListSnapshotsRequest {
  string collection_name = 1; // Name of the collection
}


message SnapshotDescription {
  string name = 1; // Name of the snapshot
  google.protobuf.Timestamp creation_time = 2; // Creation time of the snapshot
  int64 size = 3; // Size of the snapshot in bytes
}

message CreateSnapshotResponse {
  SnapshotDescription snapshot_description = 1;
  double time = 2; // Time spent to process
}

message ListSnapshotsResponse {
  repeated SnapshotDescription snapshot_descriptions = 1;
  double time = 2; // Time spent to process
}
