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FileDescriptor [ ] { global ::Authzed . Api . V1 . CoreReflection . Descriptor , global ::Authzed . Api . V1 . PermissionServiceReflection . Descriptor , global ::Buf . Validate . ValidateReflection . Descriptor , global ::Google . Api . AnnotationsReflection . Descriptor , global ::Google . Protobuf . WellKnownTypes . StructReflection . Descriptor , global ::Grpc . Gateway . ProtocGenOpenapiv2 . Options . AnnotationsReflection . Descriptor , global ::Validate . ValidateReflection . Descriptor , } ,
6264 new pbr ::GeneratedClrTypeInfo ( new [ ] { typeof ( global ::Authzed . Api . V1 . WatchKind ) , } , null , new pbr ::GeneratedClrTypeInfo [ ] {
6365 new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Authzed . Api . V1 . WatchRequest ) , global ::Authzed . Api . V1 . WatchRequest . Parser , new [ ] { "OptionalObjectTypes" , "OptionalStartCursor" , "OptionalRelationshipFilters" , "OptionalUpdateKinds" } , null , null , null , null ) ,
64- new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Authzed . Api . V1 . WatchResponse ) , global ::Authzed . Api . V1 . WatchResponse . Parser , new [ ] { "Updates" , "ChangesThrough" , "OptionalTransactionMetadata" , "SchemaUpdated" , "IsCheckpoint" } , null , null , null , null )
66+ new pbr ::GeneratedClrTypeInfo ( typeof ( global ::Authzed . Api . V1 . WatchResponse ) , global ::Authzed . Api . V1 . WatchResponse . Parser , new [ ] { "Updates" , "ChangesThrough" , "OptionalTransactionMetadata" , "SchemaUpdated" , "IsCheckpoint" , "FullRevisionMetadata" } , null , null , null , null )
6567 } ) ) ;
6668 }
6769 #endregion
@@ -82,7 +84,7 @@ public enum WatchKind {
8284
8385 #region Messages
8486 /// <summary>
85- /// WatchRequest specifies what mutations to watch for, and an optional start snapshot for when to start
87+ /// WatchRequest specifies what mutations to watch for, and an optional start point for when to start
8688 /// watching.
8789 /// </summary>
8890 [ global ::System . Diagnostics . DebuggerDisplayAttribute ( "{ToString(),nq}" ) ]
@@ -155,9 +157,7 @@ public WatchRequest Clone() {
155157 /// <summary>
156158 /// optional_start_cursor is the ZedToken holding the point-in-time at
157159 /// which to start watching for changes.
158- /// If not specified, the watch will begin at the current head revision
159- /// of the datastore, returning any updates that occur after the caller
160- /// makes the request.
160+ /// If not specified, the watch will start from the current SpiceDB revision time of the request ("head revision").
161161 /// Note that if this cursor references a point-in-time containing data
162162 /// that has been garbage collected, an error will be returned.
163163 /// </summary>
@@ -195,6 +195,8 @@ public WatchRequest Clone() {
195195 private readonly pbc ::RepeatedField < global ::Authzed . Api . V1 . WatchKind > optionalUpdateKinds_ = new pbc ::RepeatedField < global ::Authzed . Api . V1 . WatchKind > ( ) ;
196196 /// <summary>
197197 /// optional_update_kinds, if specified, indicates what kinds of mutations to include.
198+ /// If your SpiceDB instance is running behind a proxy that aborts idle connections,
199+ /// we recommend including Checkpoints to keep the stream alive even when there are no changes.
198200 /// </summary>
199201 [ global ::System . Diagnostics . DebuggerNonUserCodeAttribute ]
200202 [ global ::System . CodeDom . Compiler . GeneratedCode ( "protoc" , null ) ]
@@ -397,10 +399,10 @@ public void MergeFrom(pb::CodedInputStream input) {
397399 }
398400
399401 /// <summary>
400- /// WatchResponse contains all mutation events in ascending timestamp order,
401- /// from the requested start snapshot to a snapshot
402- /// encoded in the watch response. The client can use the snapshot to resume
403- /// watching where the previous watch response left off .
402+ /// WatchResponse contains all mutation events in ascending timestamp order.
403+ /// This excludes relationships that were deleted because they expired.
404+ /// The response includes a field that can be used to resume
405+ /// watching from that point .
404406 /// </summary>
405407 [ global ::System . Diagnostics . DebuggerDisplayAttribute ( "{ToString(),nq}" ) ]
406408 public sealed partial class WatchResponse : pb ::IMessage < WatchResponse >
@@ -442,6 +444,7 @@ public WatchResponse(WatchResponse other) : this() {
442444 optionalTransactionMetadata_ = other . optionalTransactionMetadata_ != null ? other . optionalTransactionMetadata_ . Clone ( ) : null ;
443445 schemaUpdated_ = other . schemaUpdated_ ;
444446 isCheckpoint_ = other . isCheckpoint_ ;
447+ fullRevisionMetadata_ = other . fullRevisionMetadata_ . Clone ( ) ;
445448 _unknownFields = pb ::UnknownFieldSet . Clone ( other . _unknownFields ) ;
446449 }
447450
@@ -458,7 +461,7 @@ public WatchResponse Clone() {
458461 private readonly pbc ::RepeatedField < global ::Authzed . Api . V1 . RelationshipUpdate > updates_ = new pbc ::RepeatedField < global ::Authzed . Api . V1 . RelationshipUpdate > ( ) ;
459462 /// <summary>
460463 /// updates are the RelationshipUpdate events that have occurred since the
461- /// last watch response .
464+ /// call was made, or since the point in time specified by changes_through .
462465 /// </summary>
463466 [ global ::System . Diagnostics . DebuggerNonUserCodeAttribute ]
464467 [ global ::System . CodeDom . Compiler . GeneratedCode ( "protoc" , null ) ]
@@ -489,7 +492,8 @@ public WatchResponse Clone() {
489492 /// <summary>
490493 /// optional_transaction_metadata is an optional field that returns the transaction metadata
491494 /// given to SpiceDB during the transaction that produced the changes in this response.
492- /// This field may not exist if no transaction metadata was provided.
495+ /// This field may not exist if no transaction metadata was provided, or if multiple pieces
496+ /// of metadata were found during the transaction (in which case it is ambiguous which to return).
493497 /// </summary>
494498 [ global ::System . Diagnostics . DebuggerNonUserCodeAttribute ]
495499 [ global ::System . CodeDom . Compiler . GeneratedCode ( "protoc" , null ) ]
@@ -532,6 +536,23 @@ public bool IsCheckpoint {
532536 }
533537 }
534538
539+ /// <summary>Field number for the "full_revision_metadata" field.</summary>
540+ public const int FullRevisionMetadataFieldNumber = 6 ;
541+ private static readonly pb ::FieldCodec < global ::Google . Protobuf . WellKnownTypes . Struct > _repeated_fullRevisionMetadata_codec
542+ = pb ::FieldCodec . ForMessage ( 50 , global ::Google . Protobuf . WellKnownTypes . Struct . Parser ) ;
543+ private readonly pbc ::RepeatedField < global ::Google . Protobuf . WellKnownTypes . Struct > fullRevisionMetadata_ = new pbc ::RepeatedField < global ::Google . Protobuf . WellKnownTypes . Struct > ( ) ;
544+ /// <summary>
545+ /// full_revision_metadata contains all transaction metadata given to SpiceDB during the
546+ /// revision that produced the changes in this response. Some datastores (such as CockroachDB)
547+ /// can "merge" multiple transactions into a single revision (if the changes occurred concurrently),
548+ /// so this field is a list of all transaction metadata seen during the revision.
549+ /// </summary>
550+ [ global ::System . Diagnostics . DebuggerNonUserCodeAttribute ]
551+ [ global ::System . CodeDom . Compiler . GeneratedCode ( "protoc" , null ) ]
552+ public pbc ::RepeatedField < global ::Google . Protobuf . WellKnownTypes . Struct > FullRevisionMetadata {
553+ get { return fullRevisionMetadata_ ; }
554+ }
555+
535556 [ global ::System . Diagnostics . DebuggerNonUserCodeAttribute ]
536557 [ global ::System . CodeDom . Compiler . GeneratedCode ( "protoc" , null ) ]
537558 public override bool Equals ( object other ) {
@@ -552,6 +573,7 @@ public bool Equals(WatchResponse other) {
552573 if ( ! object . Equals ( OptionalTransactionMetadata , other . OptionalTransactionMetadata ) ) return false ;
553574 if ( SchemaUpdated != other . SchemaUpdated ) return false ;
554575 if ( IsCheckpoint != other . IsCheckpoint ) return false ;
576+ if ( ! fullRevisionMetadata_ . Equals ( other . fullRevisionMetadata_ ) ) return false ;
555577 return Equals ( _unknownFields , other . _unknownFields ) ;
556578 }
557579
@@ -564,6 +586,7 @@ public override int GetHashCode() {
564586 if ( optionalTransactionMetadata_ != null ) hash ^= OptionalTransactionMetadata . GetHashCode ( ) ;
565587 if ( SchemaUpdated != false ) hash ^= SchemaUpdated . GetHashCode ( ) ;
566588 if ( IsCheckpoint != false ) hash ^= IsCheckpoint . GetHashCode ( ) ;
589+ hash ^= fullRevisionMetadata_ . GetHashCode ( ) ;
567590 if ( _unknownFields != null ) {
568591 hash ^= _unknownFields . GetHashCode ( ) ;
569592 }
@@ -599,6 +622,7 @@ public void WriteTo(pb::CodedOutputStream output) {
599622 output . WriteRawTag ( 40 ) ;
600623 output . WriteBool ( IsCheckpoint ) ;
601624 }
625+ fullRevisionMetadata_ . WriteTo ( output , _repeated_fullRevisionMetadata_codec ) ;
602626 if ( _unknownFields != null ) {
603627 _unknownFields . WriteTo ( output ) ;
604628 }
@@ -626,6 +650,7 @@ public void WriteTo(pb::CodedOutputStream output) {
626650 output . WriteRawTag ( 40 ) ;
627651 output . WriteBool ( IsCheckpoint ) ;
628652 }
653+ fullRevisionMetadata_ . WriteTo ( ref output , _repeated_fullRevisionMetadata_codec ) ;
629654 if ( _unknownFields != null ) {
630655 _unknownFields . WriteTo ( ref output ) ;
631656 }
@@ -649,6 +674,7 @@ public int CalculateSize() {
649674 if ( IsCheckpoint != false ) {
650675 size += 1 + 1 ;
651676 }
677+ size += fullRevisionMetadata_ . CalculateSize ( _repeated_fullRevisionMetadata_codec ) ;
652678 if ( _unknownFields != null ) {
653679 size += _unknownFields . CalculateSize ( ) ;
654680 }
@@ -680,6 +706,7 @@ public void MergeFrom(WatchResponse other) {
680706 if ( other . IsCheckpoint != false ) {
681707 IsCheckpoint = other . IsCheckpoint ;
682708 }
709+ fullRevisionMetadata_ . Add ( other . fullRevisionMetadata_ ) ;
683710 _unknownFields = pb ::UnknownFieldSet . MergeFrom ( _unknownFields , other . _unknownFields ) ;
684711 }
685712
@@ -725,6 +752,10 @@ public void MergeFrom(pb::CodedInputStream input) {
725752 IsCheckpoint = input . ReadBool ( ) ;
726753 break ;
727754 }
755+ case 50 : {
756+ fullRevisionMetadata_ . AddEntriesFrom ( input , _repeated_fullRevisionMetadata_codec ) ;
757+ break ;
758+ }
728759 }
729760 }
730761 #endif
@@ -770,6 +801,10 @@ public void MergeFrom(pb::CodedInputStream input) {
770801 IsCheckpoint = input . ReadBool ( ) ;
771802 break ;
772803 }
804+ case 50 : {
805+ fullRevisionMetadata_ . AddEntriesFrom ( ref input , _repeated_fullRevisionMetadata_codec ) ;
806+ break ;
807+ }
773808 }
774809 }
775810 }
0 commit comments