syntax = "proto3"; package sciobjsdb.api.storage.services.v1; option go_package = "github.com/ScienceObjectsDB/go-api/sciobjsdb/api/storage/services/v1"; option java_multiple_files = true; option java_package = "com.github.ScienceObjectsDB.java_api.sciobjsdb.api.storage.services.v1"; option java_outer_classname = "DatasetServiceModels"; import "google/protobuf/timestamp.proto"; import "sciobjsdb/api/storage/models/v1/dataset.proto"; import "sciobjsdb/api/storage/models/v1/common_models.proto"; import "sciobjsdb/api/storage/models/v1/object_models.proto"; import "sciobjsdb/api/storage/services/v1/dataset_object_service_models.proto"; // Dataset related Models message CreateDatasetRequest { string name = 1; // Name of the dataset string description = 2; string project_id = 3; //ProjectID of the project the dataset is associated with repeated sciobjsdb.api.storage.models.v1.Label labels = 4; repeated sciobjsdb.api.storage.models.v1.Annotation annotations = 5; repeated CreateObjectRequest metadata_objects = 6; } message CreateDatasetResponse { string id = 1; } message GetDatasetRequest { string id = 1; } message GetDatasetResponse { sciobjsdb.api.storage.models.v1.Dataset dataset = 1; } // Returns all objects of a dataset, the label filter option can be used to find only objects that at least have a specific set of labels (but can have more) // For returning large numbers of objects the query can be paginated // There is no guarantee that paginated queries return consistent results, since they can reflect changes that were made between two different pagianted calls. message GetDatasetObjectsRequest { string id = 1; sciobjsdb.api.storage.models.v1.PageRequest page_request = 2; sciobjsdb.api.storage.models.v1.LabelFilter label_filter = 3; } message GetDatasetObjectsResponse { repeated sciobjsdb.api.storage.models.v1.Object objects = 1; } message GetDatasetVersionsRequest { string id = 1; } message GetDatasetVersionsResponse { repeated sciobjsdb.api.storage.models.v1.DatasetVersion dataset_versions = 1; } message GetDatasetObjectGroupsRequest { string id = 1; sciobjsdb.api.storage.models.v1.PageRequest page_request = 2; sciobjsdb.api.storage.models.v1.Label label_filter = 3; } message GetDatasetObjectGroupsResponse { repeated sciobjsdb.api.storage.models.v1.ObjectGroup object_groups = 1; } message GetObjectGroupRevisionsInDateRangeRequest { string id = 1; google.protobuf.Timestamp start = 2; google.protobuf.Timestamp end = 3; } message GetObjectGroupRevisionsInDateRangeResponse { repeated sciobjsdb.api.storage.models.v1.ObjectGroupRevision object_group_revisions = 1; } // GetObjectGroupsStreamLinkRequest a request for a get link to stream a set of object groups // The query defines what object groups should be part of the stream // The steam type defines how the individual objects are packed // ZIP and TARGZ will bundle objectgroups into subfolders message GetObjectGroupsStreamLinkRequest { StreamType stream_type = 3; oneof query { GroupIDsQuery group_ids = 4; DateRangeQuery date_range = 5; DatasetQuery dataset = 6; DatasetVersionQuery dataset_version = 7; } // Expiry time of the link // This is the maximum expiry time, implementations can set maximum durations that can be shorter than this google.protobuf.Timestamp expiry = 8; enum StreamType { STREAM_TYPE_UNSPECIFIED = 0; STREAM_TYPE_BASE64NEWLINE = 1; STREAM_TYPE_ZIP = 2; STREAM_TYPE_TARGZ = 3; } message DateRangeQuery { string dataset_id = 3; google.protobuf.Timestamp start = 1; google.protobuf.Timestamp end = 2; } message GroupIDsQuery { string dataset_id = 2; repeated string object_groups = 1; } message DatasetQuery { string dataset_id = 1; } message DatasetVersionQuery { string dataset_id = 1; string dataset_version_id = 2; } } message GetObjectGroupsStreamLinkResponse { string url = 1; } message UpdateDatasetFieldRequest { sciobjsdb.api.storage.models.v1.UpdateFieldsRequest update_request = 1; } message UpdateDatasetFieldResponse { } message DeleteDatasetRequest { string id = 1; } message DeleteDatasetResponse { } // DatasetVersion related models message ReleaseDatasetVersionRequest { string name = 1; string dataset_id = 2; sciobjsdb.api.storage.models.v1.Version version = 3; repeated sciobjsdb.api.storage.models.v1.Label labels = 4; repeated sciobjsdb.api.storage.models.v1.Annotation annotations = 5; repeated string object_group_revision_ids = 7; string description = 8; } message ReleaseDatasetVersionResponse { string id = 1; } message GetDatasetVersionRequest { string id = 1; } message GetDatasetVersionResponse { sciobjsdb.api.storage.models.v1.DatasetVersion dataset_version = 1; } message GetDatasetVersionObjectGroupsRequest { string id = 1; sciobjsdb.api.storage.models.v1.PageRequest page_request = 2; } message GetDatasetVersionObjectGroupsResponse { repeated sciobjsdb.api.storage.models.v1.ObjectGroupRevision object_group_revisions = 1; } message DeleteDatasetVersionRequest { string id = 1; } message DeleteDatasetVersionResponse { }