github.com/cloudwan/edgelq-sdk@v1.15.4/devices/proto/v1alpha2/device_change.proto (about) 1 syntax = "proto3"; 2 3 package ntt.devices.v1alpha2; 4 5 import "edgelq-sdk/devices/proto/v1alpha2/device.proto"; 6 import "google/api/resource.proto"; 7 import "google/protobuf/field_mask.proto"; 8 9 option go_package = "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha2/device;device"; 10 option java_multiple_files = false; 11 option java_outer_classname = "DeviceChangeProto"; 12 option java_package = "com.ntt.devices.pb.v1alpha2"; 13 14 // DeviceChange is used by Watch notifications Responses to describe change of 15 // single Device One of Added, Modified, Removed 16 message DeviceChange { 17 // Device 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 Device is deleted or leaves Query view 31 Removed removed = 3; 32 } 33 34 // Device has been added to query view 35 message Added { 36 Device device = 1; 37 38 // Integer describing index of added Device in resulting query view. 39 int32 view_index = 2; 40 } 41 42 // Device changed some of it's fields - contains either full document or 43 // masked change 44 message Modified { 45 // Name of modified Device 46 string name = 1; 47 48 // New version of Device or masked difference, depending on mask_changes 49 // instrumentation of issued [WatchDeviceRequest] or [WatchDevicesRequest] 50 Device device = 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 Device. 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 Device new index in resulting query view. 62 int32 view_index = 5; 63 } 64 65 // Device has been added or modified in a query view. Version used for 66 // stateless watching 67 message Current { Device device = 1; } 68 69 // Removed is returned when Device is deleted or leaves Query view 70 message Removed { 71 string name = 1; 72 73 // Integer specifying removed Device index. Not populated in stateless watch 74 // type. 75 int32 view_index = 2; 76 } 77 }