syntax = "proto3"; package sciobjsdb.api.notification.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 = "NotificationServiceModels"; import "sciobjsdb/api/storage/models/v1/common_models.proto"; import "google/protobuf/timestamp.proto"; message CreateEventStreamingGroupRequest { EventResources resource = 1; string resource_id = 2; bool include_subresource = 3; oneof stream_type { StreamAll stream_all = 4; StreamFromDate stream_from_date = 5; StreamFromSequence stream_from_sequence = 6; }; enum EventResources { EVENT_RESOURCES_UNSPECIFIED = 0; EVENT_RESOURCES_PROJECT_RESOURCE = 1; EVENT_RESOURCES_DATASET_RESOURCE = 2; EVENT_RESOURCES_DATASET_VERSION_RESOURCE = 3; EVENT_RESOURCES_OBJECT_GROUP_RESOURCE = 4; EVENT_RESOURCES_ALL_RESOURCE = 5; } string stream_group_id = 7; } message CreateEventStreamingGroupResponse { string stream_group_id = 1; } message NotificationStreamGroupRequest { oneof stream_action { NotificationStreamInit init = 1; NotficationStreamAck ack = 2; } bool close = 3; } message NotificationStreamInit { string stream_group_id = 1; } message NotficationStreamAck { repeated string ack_chunk_id = 1; } message NotificationStreamGroupResponse { repeated NotificationStreamResponse notification = 1; string ack_chunk_id = 2; } message StreamFromSequence { uint64 sequence = 1; } message StreamFromDate { google.protobuf.Timestamp timestamp = 1; } message StreamAll {} message NotificationStreamResponse { EventNotificationMessage message = 1; uint64 sequence = 2; google.protobuf.Timestamp timestamp = 3; } message EventNotificationMessage { sciobjsdb.api.storage.models.v1.Resource resource = 1; string resource_id = 2; UpdateType updated_type = 3; enum UpdateType { UPDATE_TYPE_UNSPECIFIED = 0; UPDATE_TYPE_CREATED = 1; UPDATE_TYPE_AVAILABLE = 2; UPDATE_TYPE_UPDATED = 3; UPDATE_TYPE_METADATA_UPDATED = 4; UPDATE_TYPE_DELETED = 5; } }