syntax = "proto3"; package sciobjsdb.api.storage.models.v1; option go_package = "github.com/ScienceObjectsDB/go-api/sciobjsdb/api/storage/models/v1"; option java_multiple_files = true; option java_package = "com.github.ScienceObjectsDB.java_api.sciobjsdb.api.storage.models.v1"; option java_outer_classname = "CommonModels"; enum Status { STATUS_UNSPECIFIED = 0; STATUS_INITIATING = 1; STATUS_AVAILABLE = 2; STATUS_UPDATING = 3; STATUS_ARCHIVED = 4; STATUS_DELETING = 5; STATUS_STAGING = 6; } enum Right { RIGHT_UNSPECIFIED = 0; RIGHT_READ = 1; RIGHT_WRITE = 2; } enum Resource { RESOURCE_UNSPECIFIED = 0; RESOURCE_PROJECT = 1; RESOURCE_DATASET = 2; RESOURCE_DATASET_VERSION = 3; RESOURCE_OBJECT = 4; RESOURCE_OBJECT_GROUP = 5; RESOURCE_OBJECT_GROUP_REVISION = 6; } message Location { ObjectLocation object_location = 1; } // A location in S3 message ObjectLocation { string id = 1; string bucket = 2; string key = 3; string url = 4; // Object storage endpoint Status status = 5; string upload_id = 6; } message Index { int64 start_byte = 1; int64 end_byte = 2; } message Origin { string link = 1; oneof location { ObjectLocation object_location = 2; }; OriginType origin_type = 3; enum OriginType { ORIGIN_TYPE_UNSPECIFIED = 0; ORIGIN_TYPE_OBJECT_STORAGE = 1; ORIGIN_TYPE_ORIGIN_LINK = 2; } } message Version { int32 major = 1; int32 minor = 2; int32 patch = 3; int32 revision = 4; VersionStage stage = 5; enum VersionStage { VERSION_STAGE_UNSPECIFIED = 0; VERSION_STAGE_STABLE = 1; VERSION_STAGE_RC = 2; VERSION_STAGE_BETA = 3; VERSION_STAGE_ALPHA = 4; } } message Label { string key = 1; string value = 2; } message Annotation { string key = 1; string value = 2; } message ID { string id = 1; // An arbitrary ID } message UpdateFieldsRequest { string id = 1; map updated_string_fields = 2; } message User { string user_id = 1; repeated Right rights = 2; Resource resource = 3; } message VersionTag { string name = 1; string version_id = 2; } message APIToken { string id = 1; string token = 2; repeated Right rights = 3; string project_id = 4; } message Empty{} // Request for paginated result retrival // If the page size is zero, the backends default page size will be used // If the page size exceeds the backends maximum, an error will be returned // Consistency of results will only be guaranteed for DatasetVersions // For the initial request leave last_uuid empty message PageRequest { string last_uuid = 1; uint64 page_size = 2; } message LabelFilter { repeated Label labels = 1; }