github.com/cloudwan/edgelq-sdk@v1.15.4/alerting/proto/v1/alert_change.proto (about) 1 syntax = "proto3"; 2 3 package ntt.alerting.v1; 4 5 import "edgelq-sdk/alerting/proto/v1/alert.proto"; 6 import "google/api/resource.proto"; 7 import "google/protobuf/field_mask.proto"; 8 9 option go_package = "github.com/cloudwan/edgelq-sdk/alerting/resources/v1/alert;alert"; 10 option java_multiple_files = false; 11 option java_outer_classname = "AlertChangeProto"; 12 option java_package = "com.ntt.alerting.pb.v1"; 13 14 // AlertChange is used by Watch notifications Responses to describe change of 15 // single Alert One of Added, Modified, Removed 16 message AlertChange { 17 // Alert change 18 oneof change_type { 19 // Added is returned when watched document is added, either created or 20 // enters Query view 21 Added added = 1; 22 23 // Modified is returned when watched document is modified 24 Modified modified = 2; 25 26 // Current is returned in stateless watch when document enters query view or 27 // is modified within. 28 Current current = 4; 29 30 // Removed is returned when Alert is deleted or leaves Query view 31 Removed removed = 3; 32 } 33 34 // Alert has been added to query view 35 message Added { 36 Alert alert = 1; 37 38 // Integer describing index of added Alert in resulting query view. 39 int32 view_index = 2; 40 } 41 42 // Alert changed some of it's fields - contains either full document or masked 43 // change 44 message Modified { 45 // Name of modified Alert 46 string name = 1; 47 48 // New version of Alert or masked difference, depending on mask_changes 49 // instrumentation of issued [WatchAlertRequest] or [WatchAlertsRequest] 50 Alert alert = 2; 51 52 // Used when mask_changes is set, contains field paths of modified 53 // properties. 54 google.protobuf.FieldMask field_mask = 3; 55 56 // Previous view index specifies previous position of modified Alert. 57 // When modification doesn't affect sorted order, value will remain 58 // identical to [view_index]. 59 int32 previous_view_index = 4; 60 61 // Integer specifying Alert new index in resulting query view. 62 int32 view_index = 5; 63 } 64 65 // Alert has been added or modified in a query view. Version used for 66 // stateless watching 67 message Current { Alert alert = 1; } 68 69 // Removed is returned when Alert is deleted or leaves Query view 70 message Removed { 71 string name = 1; 72 73 // Integer specifying removed Alert index. Not populated in stateless watch 74 // type. 75 int32 view_index = 2; 76 } 77 }