@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Cosmos
1616 /// The metadata of a change feed resource with <see cref="ChangeFeedMode"/> is initialized to <see cref="ChangeFeedMode.AllVersionsAndDeletes"/>.
1717 /// </summary>
1818 [ System . Text . Json . Serialization . JsonConverter ( typeof ( ChangeFeedMetadataConverter ) ) ]
19- [ JsonConverter ( typeof ( ChangeFeedMetadataNewtonSoftConverter ) ) ]
2019#if PREVIEW
2120 public
2221#else
@@ -27,38 +26,48 @@ class ChangeFeedMetadata
2726 /// <summary>
2827 /// The change's conflict resolution timestamp.
2928 /// </summary>
29+ [ JsonProperty ( PropertyName = ChangeFeedMetadataFields . ConflictResolutionTimestamp , NullValueHandling = NullValueHandling . Ignore ) ]
30+ [ JsonConverter ( typeof ( UnixDateTimeConverter ) ) ]
3031 public DateTime ConflictResolutionTimestamp { get ; internal set ; }
3132
3233 /// <summary>
3334 /// The current change's logical sequence number.
3435 /// </summary>
36+ [ JsonProperty ( PropertyName = ChangeFeedMetadataFields . Lsn , NullValueHandling = NullValueHandling . Ignore ) ]
3537 public long Lsn { get ; internal set ; }
3638
3739 /// <summary>
3840 /// The change's feed operation type <see cref="ChangeFeedOperationType"/>.
3941 /// </summary>
42+ [ JsonProperty ( PropertyName = ChangeFeedMetadataFields . OperationType , NullValueHandling = NullValueHandling . Ignore ) ]
43+ [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
4044 public ChangeFeedOperationType OperationType { get ; internal set ; }
4145
4246 /// <summary>
4347 /// The previous change's logical sequence number.
4448 /// </summary>
49+ [ JsonProperty ( PropertyName = ChangeFeedMetadataFields . PreviousImageLSN , NullValueHandling = NullValueHandling . Ignore ) ]
4550 public long PreviousLsn { get ; internal set ; }
4651
4752 /// <summary>
4853 /// Used to distinguish explicit deletes (e.g. via DeleteItem) from deletes caused by TTL expiration (a collection may define time-to-live policy for documents).
4954 /// </summary>
55+ [ JsonProperty ( PropertyName = ChangeFeedMetadataFields . TimeToLiveExpired , NullValueHandling = NullValueHandling . Ignore ) ]
5056 public bool IsTimeToLiveExpired { get ; internal set ; }
5157
5258 /// <summary>
5359 /// Applicable for delete operations only, otherwise null.
5460 /// The id of the previous item version.
5561 /// </summary>
62+ [ JsonProperty ( PropertyName = ChangeFeedMetadataFields . Id , NullValueHandling = NullValueHandling . Ignore ) ]
5663 public string Id { get ; internal set ; }
5764
5865 /// <summary>
59- /// Applicable for delete operations only, otherwise null.
66+ /// Applicable for delete operations only, otherwise null.
6067 /// The partition key of the previous item version. string is the partition key property name and object is the partition key property value. All levels of hierarchy will be represented in order if a HPK is used.
6168 /// </summary>
69+ [ JsonProperty ( PropertyName = ChangeFeedMetadataFields . PartitionKey , NullValueHandling = NullValueHandling . Ignore ) ]
70+ [ JsonConverter ( typeof ( ListNewtonSoftConverter ) ) ]
6271 public List < ( string , object ) > PartitionKey { get ; internal set ; }
6372 }
6473}
0 commit comments