Skip to content

Commit b58a2ef

Browse files
authored
STG 81 GA API View Comments (Azure#27388)
1 parent b17df4a commit b58a2ef

23 files changed

+406
-243
lines changed

sdk/storage/Azure.Storage.Blobs.ChangeFeed/api/Azure.Storage.Blobs.ChangeFeed.netstandard2.0.cs

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ internal BlobChangeFeedEvent() { }
3232
public partial class BlobChangeFeedEventData
3333
{
3434
internal BlobChangeFeedEventData() { }
35-
public Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventAsyncOperationInfo AsyncOperationInfo { get { throw null; } }
35+
public Azure.Storage.Blobs.ChangeFeed.BlobOperationResult AsyncOperationInfo { get { throw null; } }
3636
public Azure.Storage.Blobs.Models.AccessTier? BlobAccessTier { get { throw null; } }
3737
public Azure.Storage.Blobs.ChangeFeed.BlobOperationName BlobOperationName { get { throw null; } }
3838
public Azure.Storage.Blobs.Models.BlobType BlobType { get { throw null; } }
@@ -44,14 +44,14 @@ internal BlobChangeFeedEventData() { }
4444
public string ContentType { get { throw null; } }
4545
public System.Uri DestinationUri { get { throw null; } }
4646
public Azure.ETag ETag { get { throw null; } }
47-
public Azure.Storage.Blobs.ChangeFeed.Models.ChangeFeedEventPreviousInfo PreviousInfo { get { throw null; } }
47+
public Azure.Storage.Blobs.ChangeFeed.ChangeFeedEventPreviousInfo PreviousInfo { get { throw null; } }
4848
public bool? Recursive { get { throw null; } }
4949
public System.Guid RequestId { get { throw null; } }
5050
public string Sequencer { get { throw null; } }
5151
public string Snapshot { get { throw null; } }
5252
public System.Uri SourceUri { get { throw null; } }
53-
public System.Collections.Generic.Dictionary<string, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventUpdatedBlobProperty> UpdatedBlobProperties { get { throw null; } }
54-
public Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventUpdatedBlobTags UpdatedBlobTags { get { throw null; } }
53+
public System.Collections.Generic.Dictionary<string, Azure.Storage.Blobs.ChangeFeed.BlobPropertyChange> UpdatedBlobProperties { get { throw null; } }
54+
public Azure.Storage.Blobs.ChangeFeed.BlobTagsChange UpdatedBlobTags { get { throw null; } }
5555
public System.Uri Uri { get { throw null; } }
5656
}
5757
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
@@ -86,11 +86,11 @@ public static partial class BlobChangeFeedExtensions
8686
public static partial class BlobChangeFeedModelFactory
8787
{
8888
public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEvent BlobChangeFeedEvent(string topic, string subject, Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType eventType, System.DateTimeOffset eventTime, System.Guid id, Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventData eventData, long dataVersion, string metadataVersion) { throw null; }
89-
public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventAsyncOperationInfo BlobChangeFeedEventAsyncOperationInfo(Azure.Storage.Blobs.Models.AccessTier? destinationAccessTier, bool wasAsyncOperation, string copyId) { throw null; }
90-
public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventData BlobChangeFeedEventData(string blobOperationName, string clientRequestId, System.Guid requestId, Azure.ETag eTag, string contentType, long contentLength, Azure.Storage.Blobs.Models.BlobType blobType, string blobVersion, string containerVersion, Azure.Storage.Blobs.Models.AccessTier? blobAccessTier, long contentOffset, System.Uri destinationUri, System.Uri sourceUri, System.Uri uri, bool recursive, string sequencer, Azure.Storage.Blobs.ChangeFeed.Models.ChangeFeedEventPreviousInfo previousInfo, string snapshot, System.Collections.Generic.Dictionary<string, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventUpdatedBlobProperty> updatedBlobProperties, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventAsyncOperationInfo asyncOperationInfo, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventUpdatedBlobTags updatedBlobTags) { throw null; }
91-
public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventUpdatedBlobProperty BlobChangeFeedEventUpdatedBlobProperty(string propertyName, string previousValue, string newValue) { throw null; }
92-
public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventUpdatedBlobTags BlobChangeFeedEventUpdatedBlobTags(System.Collections.Generic.Dictionary<string, string> previousTags, System.Collections.Generic.Dictionary<string, string> newTags) { throw null; }
93-
public static Azure.Storage.Blobs.ChangeFeed.Models.ChangeFeedEventPreviousInfo ChangeFeedEventPreviousInfo(string softDeleteSnapshot, bool wasBlobSoftDeleted, string blobVersion, string lastVersion, Azure.Storage.Blobs.Models.AccessTier? previousTier) { throw null; }
89+
public static Azure.Storage.Blobs.ChangeFeed.BlobOperationResult BlobChangeFeedEventAsyncOperationInfo(Azure.Storage.Blobs.Models.AccessTier? destinationAccessTier, bool wasAsyncOperation, string copyId) { throw null; }
90+
public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventData BlobChangeFeedEventData(string blobOperationName, string clientRequestId, System.Guid requestId, Azure.ETag eTag, string contentType, long contentLength, Azure.Storage.Blobs.Models.BlobType blobType, string blobVersion, string containerVersion, Azure.Storage.Blobs.Models.AccessTier? blobAccessTier, long contentOffset, System.Uri destinationUri, System.Uri sourceUri, System.Uri uri, bool recursive, string sequencer, Azure.Storage.Blobs.ChangeFeed.ChangeFeedEventPreviousInfo previousInfo, string snapshot, System.Collections.Generic.Dictionary<string, Azure.Storage.Blobs.ChangeFeed.BlobPropertyChange> updatedBlobProperties, Azure.Storage.Blobs.ChangeFeed.BlobOperationResult asyncOperationInfo, Azure.Storage.Blobs.ChangeFeed.BlobTagsChange updatedBlobTags) { throw null; }
91+
public static Azure.Storage.Blobs.ChangeFeed.BlobPropertyChange BlobChangeFeedEventUpdatedBlobProperty(string propertyName, string previousValue, string newValue) { throw null; }
92+
public static Azure.Storage.Blobs.ChangeFeed.BlobTagsChange BlobChangeFeedEventUpdatedBlobTags(System.Collections.Generic.Dictionary<string, string> previousTags, System.Collections.Generic.Dictionary<string, string> newTags) { throw null; }
93+
public static Azure.Storage.Blobs.ChangeFeed.ChangeFeedEventPreviousInfo ChangeFeedEventPreviousInfo(string softDeleteSnapshot, bool wasBlobSoftDeleted, string blobVersion, string lastVersion, Azure.Storage.Blobs.Models.AccessTier? previousTier) { throw null; }
9494
}
9595
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
9696
public readonly partial struct BlobOperationName : System.IEquatable<Azure.Storage.Blobs.ChangeFeed.BlobOperationName>
@@ -122,34 +122,31 @@ public static partial class BlobChangeFeedModelFactory
122122
public static bool operator !=(Azure.Storage.Blobs.ChangeFeed.BlobOperationName left, Azure.Storage.Blobs.ChangeFeed.BlobOperationName right) { throw null; }
123123
public override string ToString() { throw null; }
124124
}
125-
}
126-
namespace Azure.Storage.Blobs.ChangeFeed.Models
127-
{
128-
public partial class BlobChangeFeedEventAsyncOperationInfo
125+
public partial class BlobOperationResult
129126
{
130-
internal BlobChangeFeedEventAsyncOperationInfo() { }
127+
internal BlobOperationResult() { }
131128
public string CopyId { get { throw null; } }
132129
public Azure.Storage.Blobs.Models.AccessTier? DestinationAccessTier { get { throw null; } }
133-
public bool WasAsyncOperation { get { throw null; } }
130+
public bool IsAsync { get { throw null; } }
134131
}
135-
public partial class BlobChangeFeedEventUpdatedBlobProperty
132+
public partial class BlobPropertyChange
136133
{
137-
internal BlobChangeFeedEventUpdatedBlobProperty() { }
134+
internal BlobPropertyChange() { }
138135
public string NewValue { get { throw null; } }
139-
public string PreviousValue { get { throw null; } }
136+
public string OldValue { get { throw null; } }
140137
public string PropertyName { get { throw null; } }
141138
}
142-
public partial class BlobChangeFeedEventUpdatedBlobTags
139+
public partial class BlobTagsChange
143140
{
144-
internal BlobChangeFeedEventUpdatedBlobTags() { }
141+
internal BlobTagsChange() { }
145142
public System.Collections.Generic.Dictionary<string, string> NewTags { get { throw null; } }
146-
public System.Collections.Generic.Dictionary<string, string> PreviousTags { get { throw null; } }
143+
public System.Collections.Generic.Dictionary<string, string> OldTags { get { throw null; } }
147144
}
148145
public partial class ChangeFeedEventPreviousInfo
149146
{
150147
internal ChangeFeedEventPreviousInfo() { }
151-
public string BlobVersion { get { throw null; } }
152-
public string LastVersion { get { throw null; } }
148+
public string NewBlobVersion { get { throw null; } }
149+
public string OldBlobVersion { get { throw null; } }
153150
public Azure.Storage.Blobs.Models.AccessTier? PreviousTier { get { throw null; } }
154151
public string SoftDeleteSnapshot { get { throw null; } }
155152
public bool WasBlobSoftDeleted { get { throw null; } }

sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventData.cs

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using System.ComponentModel;
7-
using Azure.Storage.Blobs.ChangeFeed.Models;
86
using Azure.Storage.Blobs.Models;
97

108
namespace Azure.Storage.Blobs.ChangeFeed
@@ -172,17 +170,17 @@ internal BlobChangeFeedEventData(Dictionary<string, object> record)
172170
/// <summary>
173171
/// Blob properties that were updated during this event.
174172
/// </summary>
175-
public Dictionary<string, BlobChangeFeedEventUpdatedBlobProperty> UpdatedBlobProperties { get; internal set; }
173+
public Dictionary<string, BlobPropertyChange> UpdatedBlobProperties { get; internal set; }
176174

177175
/// <summary>
178176
/// AsyncOperationInfo.
179177
/// </summary>
180-
public BlobChangeFeedEventAsyncOperationInfo AsyncOperationInfo { get; internal set; }
178+
public BlobOperationResult AsyncOperationInfo { get; internal set; }
181179

182180
/// <summary>
183181
/// Blob tags that were updated during this event.
184182
/// </summary>
185-
public BlobChangeFeedEventUpdatedBlobTags UpdatedBlobTags { get; internal set; }
183+
public BlobTagsChange UpdatedBlobTags { get; internal set; }
186184

187185
private static ChangeFeedEventPreviousInfo ExtractPreviousInfo(Dictionary<string, object> recordDictionary)
188186
{
@@ -208,10 +206,10 @@ private static ChangeFeedEventPreviousInfo ExtractPreviousInfo(Dictionary<string
208206
}
209207

210208
previousInfoDictionary.TryGetValue(Constants.ChangeFeed.EventData.BlobVersion, out object blobVersionObject);
211-
previousInfo.BlobVersion = (string)blobVersionObject;
209+
previousInfo.NewBlobVersion = (string)blobVersionObject;
212210

213211
previousInfoDictionary.TryGetValue(Constants.ChangeFeed.EventData.LastVersion, out object lastVersionObject);
214-
previousInfo.LastVersion = (string)lastVersionObject;
212+
previousInfo.OldBlobVersion = (string)lastVersionObject;
215213

216214
previousInfoDictionary.TryGetValue(Constants.ChangeFeed.EventData.PreviousTier, out object previousTierObject);
217215
if (previousTierObject != null)
@@ -222,7 +220,7 @@ private static ChangeFeedEventPreviousInfo ExtractPreviousInfo(Dictionary<string
222220
return previousInfo;
223221
}
224222

225-
private static Dictionary<string, BlobChangeFeedEventUpdatedBlobProperty> ExtractBlobProperties(
223+
private static Dictionary<string, BlobPropertyChange> ExtractBlobProperties(
226224
Dictionary<string, object> recordDictionary)
227225
{
228226
// Note that these property keys may be present in the dictionary, but with a value of null.
@@ -235,25 +233,25 @@ private static Dictionary<string, BlobChangeFeedEventUpdatedBlobProperty> Extrac
235233

236234
Dictionary<string, object> updatedPropertiesDictionary = (Dictionary<string, object>)blobPropertiesUpdatedObject;
237235

238-
Dictionary<string, BlobChangeFeedEventUpdatedBlobProperty> result = new Dictionary<string, BlobChangeFeedEventUpdatedBlobProperty>();
236+
Dictionary<string, BlobPropertyChange> result = new Dictionary<string, BlobPropertyChange>();
239237

240238
foreach (KeyValuePair<string, object> kvp in updatedPropertiesDictionary)
241239
{
242240
Dictionary<string, object> propertyMap = (Dictionary<string, object>)kvp.Value;
243241
result.Add(
244242
kvp.Key,
245-
new BlobChangeFeedEventUpdatedBlobProperty
243+
new BlobPropertyChange
246244
{
247245
PropertyName = kvp.Key,
248-
PreviousValue = (string)propertyMap[Constants.ChangeFeed.EventData.Previous],
246+
OldValue = (string)propertyMap[Constants.ChangeFeed.EventData.Previous],
249247
NewValue = (string)propertyMap[Constants.ChangeFeed.EventData.Current]
250248
});
251249
}
252250

253251
return result;
254252
}
255253

256-
private static BlobChangeFeedEventAsyncOperationInfo ExtractAsyncOperationInfo(Dictionary<string, object> recordDictionary)
254+
private static BlobOperationResult ExtractAsyncOperationInfo(Dictionary<string, object> recordDictionary)
257255
{
258256
// Note that these property keys may be present in the dictionary, but with a value of null.
259257
// This is why we need to do the null check, instead of if(Dictionary.TryGetValue()).
@@ -265,7 +263,7 @@ private static BlobChangeFeedEventAsyncOperationInfo ExtractAsyncOperationInfo(D
265263

266264
Dictionary<string, object> asyncOperationInfoDictionary = (Dictionary<string, object>)asyncOperationInfoObject;
267265

268-
BlobChangeFeedEventAsyncOperationInfo asyncOperationInfo = new BlobChangeFeedEventAsyncOperationInfo();
266+
BlobOperationResult asyncOperationInfo = new BlobOperationResult();
269267

270268
asyncOperationInfoDictionary.TryGetValue(Constants.ChangeFeed.EventData.DestinationTier, out object destinationTierObject);
271269
if (destinationTierObject != null)
@@ -276,7 +274,7 @@ private static BlobChangeFeedEventAsyncOperationInfo ExtractAsyncOperationInfo(D
276274
asyncOperationInfoDictionary.TryGetValue(Constants.ChangeFeed.EventData.WasAsyncOperation, out object wasAsyncOperationObject);
277275
if (wasAsyncOperationObject != null)
278276
{
279-
asyncOperationInfo.WasAsyncOperation = (bool)wasAsyncOperationObject;
277+
asyncOperationInfo.IsAsync = (bool)wasAsyncOperationObject;
280278
}
281279

282280
asyncOperationInfoDictionary.TryGetValue(Constants.ChangeFeed.EventData.CopyId, out object copyIdObject);
@@ -285,7 +283,7 @@ private static BlobChangeFeedEventAsyncOperationInfo ExtractAsyncOperationInfo(D
285283
return asyncOperationInfo;
286284
}
287285

288-
private static BlobChangeFeedEventUpdatedBlobTags ExtractUpdatedBlobTags(Dictionary<string, object> recordDictionary)
286+
private static BlobTagsChange ExtractUpdatedBlobTags(Dictionary<string, object> recordDictionary)
289287
{
290288
// Note that these property keys may be present in the dictionary, but with a value of null.
291289
// This is why we need to do the null check, instead of if(Dictionary.TryGetValue()).
@@ -302,14 +300,14 @@ Dictionary<string, object> previousTags
302300
Dictionary<string, object> newTags
303301
= (Dictionary<string, object>)blobTagsUpdatedDictionary[Constants.ChangeFeed.EventData.Current];
304302

305-
BlobChangeFeedEventUpdatedBlobTags updatedBlobTags = new BlobChangeFeedEventUpdatedBlobTags();
303+
BlobTagsChange updatedBlobTags = new BlobTagsChange();
306304

307-
updatedBlobTags.PreviousTags = new Dictionary<string, string>();
305+
updatedBlobTags.OldTags = new Dictionary<string, string>();
308306
updatedBlobTags.NewTags = new Dictionary<string, string>();
309307

310308
foreach (KeyValuePair<string, object> kv in previousTags)
311309
{
312-
updatedBlobTags.PreviousTags.Add(kv.Key, (string)kv.Value);
310+
updatedBlobTags.OldTags.Add(kv.Key, (string)kv.Value);
313311
}
314312

315313
foreach (KeyValuePair <string, object> kv in newTags)

sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedModelFactory.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using Azure.Storage.Blobs.ChangeFeed.Models;
76
using Azure.Storage.Blobs.Models;
87

98
namespace Azure.Storage.Blobs.ChangeFeed
@@ -59,9 +58,9 @@ public static BlobChangeFeedEventData BlobChangeFeedEventData(
5958
string sequencer,
6059
ChangeFeedEventPreviousInfo previousInfo,
6160
string snapshot,
62-
Dictionary<string, BlobChangeFeedEventUpdatedBlobProperty> updatedBlobProperties,
63-
BlobChangeFeedEventAsyncOperationInfo asyncOperationInfo,
64-
BlobChangeFeedEventUpdatedBlobTags updatedBlobTags)
61+
Dictionary<string, BlobPropertyChange> updatedBlobProperties,
62+
BlobOperationResult asyncOperationInfo,
63+
BlobTagsChange updatedBlobTags)
6564
=> new BlobChangeFeedEventData
6665
{
6766
BlobOperationName = blobOperationName,
@@ -100,48 +99,48 @@ public static ChangeFeedEventPreviousInfo ChangeFeedEventPreviousInfo(
10099
{
101100
SoftDeleteSnapshot = softDeleteSnapshot,
102101
WasBlobSoftDeleted = wasBlobSoftDeleted,
103-
BlobVersion = blobVersion,
104-
LastVersion = lastVersion,
102+
NewBlobVersion = blobVersion,
103+
OldBlobVersion = lastVersion,
105104
PreviousTier = previousTier
106105
};
107106

108107
/// <summary>
109108
/// Creates a BlobChangeFeedEventUpdatedBlobProperty for mocking.
110109
/// </summary>
111-
public static BlobChangeFeedEventUpdatedBlobProperty BlobChangeFeedEventUpdatedBlobProperty(
110+
public static BlobPropertyChange BlobChangeFeedEventUpdatedBlobProperty(
112111
string propertyName,
113112
string previousValue,
114113
string newValue)
115-
=> new BlobChangeFeedEventUpdatedBlobProperty
114+
=> new BlobPropertyChange
116115
{
117116
PropertyName = propertyName,
118-
PreviousValue = previousValue,
117+
OldValue = previousValue,
119118
NewValue = newValue
120119
};
121120

122121
/// <summary>
123122
/// Creates a BlobChangeFeedEventAsyncOperationInfo for mocking.
124123
/// </summary>
125-
public static BlobChangeFeedEventAsyncOperationInfo BlobChangeFeedEventAsyncOperationInfo(
124+
public static BlobOperationResult BlobChangeFeedEventAsyncOperationInfo(
126125
AccessTier? destinationAccessTier,
127126
bool wasAsyncOperation,
128127
string copyId)
129-
=> new BlobChangeFeedEventAsyncOperationInfo
128+
=> new BlobOperationResult
130129
{
131130
DestinationAccessTier = destinationAccessTier,
132-
WasAsyncOperation = wasAsyncOperation,
131+
IsAsync = wasAsyncOperation,
133132
CopyId = copyId
134133
};
135134

136135
/// <summary>
137136
/// Creates a BlobChangeFeedEventUpdatedBlobTags for mocking.
138137
/// </summary>
139-
public static BlobChangeFeedEventUpdatedBlobTags BlobChangeFeedEventUpdatedBlobTags(
138+
public static BlobTagsChange BlobChangeFeedEventUpdatedBlobTags(
140139
Dictionary<string, string> previousTags,
141140
Dictionary<string, string> newTags)
142-
=> new BlobChangeFeedEventUpdatedBlobTags
141+
=> new BlobTagsChange
143142
{
144-
PreviousTags = previousTags,
143+
OldTags = previousTags,
145144
NewTags = newTags
146145
};
147146
}

0 commit comments

Comments
 (0)