Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3272a17
SDK changes for swagger update to support AutomaticRepairsPolicy for …
hapandar Oct 22, 2019
7baae3d
Storage: Rename date properties to *On naming convention (#8284)
tg-msft Oct 22, 2019
d3a4cff
Refreshing SQL ManagedDatabase SDK. (#7808)
misosic-msft Oct 22, 2019
f898f46
[Event Hubs Client] Track Two: Fifth Preview (Remove Track One)
jsquire Oct 21, 2019
b5791d3
allowed ClientSecretCredential to query token without throwing errors
Oct 22, 2019
36a7abc
Fixed comment indentation
Oct 22, 2019
f944d62
[Azure Search] Branding changes to Azure Cognitive Search (#8316)
bleroy Oct 22, 2019
640488d
Storage: Use RequestConditions and return exploding responses (#8275)
tg-msft Oct 22, 2019
060a525
Return ValueTask from GetTokenAsync (#8324)
pakrym Oct 22, 2019
4b2bf70
Make internal implementation detail ProcessAsync method private (#8327)
pakrym Oct 22, 2019
af7a687
Renaming Blob namespaces to Blobs.
vbenedichuk Oct 22, 2019
fc86824
Projects renamed
vbenedichuk Oct 22, 2019
83924f9
Paths updated.
vbenedichuk Oct 22, 2019
0bd6e12
Azure.Messaging.EventHubs.CheckpointStore.Blobs.sln updated.
vbenedichuk Oct 22, 2019
24aa68f
[Storage] Rename LeaseClient to BlobLeaseClient (#8328)
ShivangiReja Oct 22, 2019
6cf81cc
Update KeyVault(Keys,Certificates) README (#8087)
tzhanl Oct 22, 2019
66e4ec6
Fix #8334: Throw ArgumentNullException if SettingSelector passed in t…
AlexanderSher Oct 23, 2019
f5bdb49
Fix #8335: Make ConfigurationClientOptions.Version property internal.…
AlexanderSher Oct 23, 2019
14ec9ed
Update privatedns sdk to version 1.0.0 (#8333)
pranavpradeepnair Oct 23, 2019
4bee048
[Databox] SDK refresh to support new API version (2019-09-01) (#8219)
sashanm Oct 23, 2019
60ccc8c
[Wei] Update per laster swagger, and update test/version (#8320)
blueww Oct 23, 2019
9f50442
Re-generate Network based on October release (#8315)
anton-evseev Oct 23, 2019
b931932
Update Storage CODEOWNERS (#8325)
JoshLove-msft Oct 23, 2019
9f52d0d
Fix #8295: Validate offline cache and add automated test for deserial…
AlexanderSher Oct 23, 2019
9a26f72
[Compute] 2019-07-01 API version update (#8319)
hyonholee Oct 23, 2019
ebefc35
[Event Hubs Blobs Checkpoint Store] Preview 5 (Fix Storage Use)
jsquire Oct 23, 2019
7d7ffcb
Update swagger_to_sdk_config.json
Sep 30, 2019
6175274
[AutoPR Microsoft.Azure.Management.ContainerService] Aro 2019-09-30 p…
openapi-sdkautomation[bot] Oct 7, 2019
16b6fbd
[AutoPR Microsoft.Azure.Management.CostManagement] Supporting Managem…
openapi-sdkautomation[bot] Oct 8, 2019
011872f
[AutoPR Microsoft.Azure.Management.Subscription] [Hub Generated] Revi…
openapi-sdkautomation[bot] Oct 8, 2019
96905c8
[AutoPR Microsoft.Azure.Management.ApiManagement] [DO NOT MERGE] Comp…
openapi-sdkautomation[bot] Oct 20, 2019
7deb9a2
Generated from 458d27229157e306c716253a135b8189549fd66c
Oct 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/sdk/search/ @brjohnstmsft
/sdk/servicebus/ @nemakam @jsquire
/sdk/storage/ @seanmcc-msft @amnguye @tg-msft
/sdk/storage/ @seanmcc-msft @amnguye @tg-msft @JoshLove-msft
# Management Plane
/**/*Management*/ @erich-wang

Expand Down
6 changes: 3 additions & 3 deletions eng/mgmt/mgmtmetadata/compute_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\hylee-sdk\avset\sdk
2019-08-30 19:41:37 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\hylee-sdk\october\sdk
2019-10-21 18:53:15 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 6359c5dac93947b24007afd9c569e23e92848ea5
Commit: 9fcf995a147b389702f020d0d3c153cba0fdc0c2
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
14 changes: 14 additions & 0 deletions eng/mgmt/mgmtmetadata/databox_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installing AutoRest version: latest
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/databox/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2019-09 --csharp-sdks-folder=D:\god\azure_sdk_net\azure-sdk-for-net\sdk
2019-10-17 06:34:11 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 59998f796f05580bc1d43ba39f0170204113fa91
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
4 changes: 2 additions & 2 deletions eng/mgmt/mgmtmetadata/network_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\Projects\azure-sdk-for-net\sdk
2019-10-02 23:14:50 UTC
2019-10-22 02:09:10 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: be57615271c318b48a5d9a619878a18697378277
Commit: 6405fdd6023e04e54fb5c834c6f658ee10d59ca4
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installing AutoRest version: 2.0.4302
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Data/readme.md --csharp --version=2.0.4302 --reflect-api-versions --tag=track1-package-2019-05 --csharp-sdks-folder=C:\Projects\azure-sdk-for-net\sdk
2019-10-22 17:22:47 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 282efa7dd8301ba615d8741f740f1ed7f500fed1
AutoRest information
Requested version: 2.0.4302
Bootstrapper version: autorest@2.0.4302
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\src\azure-sdk-for-net\sdk
2019-08-21 17:09:45 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --tag=track1-package-2019-05 --csharp-sdks-folder=C:\Projects\azure-sdk-for-net\sdk
2019-10-22 17:07:06 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 156dd2a4a7549e9d443d7e262129e037846ead1a
Commit: 282efa7dd8301ba615d8741f740f1ed7f500fed1
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
10 changes: 5 additions & 5 deletions eng/mgmt/mgmtmetadata/sql_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/sql/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=.
2019-09-16 14:19:04 UTC
cmd.exe /c autorest.cmd https://github.com/misosic-msft/azure-rest-api-specs/blob/sqlManagedDatabases/specification/sql/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\azure-sdk-for-net\sdk
2019-09-20 14:01:21 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: e0d9ceb1ca85e76a31b8496201499a7312824c09
GitHub fork: misosic-msft
Branch: sqlManagedDatabases
Commit: 65fd128060b3b1db7aceb7a684f5e2bf9b647626
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
4 changes: 2 additions & 2 deletions eng/mgmt/mgmtmetadata/storage_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=C:\code\srpsdk\sdk\storage\Microsoft.Azure.Management.Storage\src\Generated
2019-10-16 06:38:05 UTC
2019-10-22 03:30:43 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 2c079a493e904166c7ecc4d1c4dbf2a01ea8059d
Commit: 5265b9205331da0a55f2d17eb6b436b7d67d1f09
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,10 @@ public AuthenticationSettingsContract()
/// </summary>
/// <param name="oAuth2">OAuth2 Authentication settings</param>
/// <param name="openid">OpenID Connect Authentication Settings</param>
/// <param name="subscriptionKeyRequired">Specifies whether
/// subscription key is required during call to this API, true - API is
/// included into closed products only, false - API is included into
/// open products alone, null - there is a mix of products.</param>
public AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2 = default(OAuth2AuthenticationSettingsContract), OpenIdAuthenticationSettingsContract openid = default(OpenIdAuthenticationSettingsContract), bool? subscriptionKeyRequired = default(bool?))
public AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2 = default(OAuth2AuthenticationSettingsContract), OpenIdAuthenticationSettingsContract openid = default(OpenIdAuthenticationSettingsContract))
{
OAuth2 = oAuth2;
Openid = openid;
SubscriptionKeyRequired = subscriptionKeyRequired;
CustomInit();
}

Expand All @@ -62,14 +57,5 @@ public AuthenticationSettingsContract()
[JsonProperty(PropertyName = "openid")]
public OpenIdAuthenticationSettingsContract Openid { get; set; }

/// <summary>
/// Gets or sets specifies whether subscription key is required during
/// call to this API, true - API is included into closed products only,
/// false - API is included into open products alone, null - there is a
/// mix of products.
/// </summary>
[JsonProperty(PropertyName = "subscriptionKeyRequired")]
public bool? SubscriptionKeyRequired { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private Request CreateAddRequest(ConfigurationSetting setting)

Request request = _pipeline.CreateRequest();

ReadOnlyMemory<byte> content = Serialize(setting);
ReadOnlyMemory<byte> content = ConfigurationServiceSerializer.SerializeRequestBody(setting);

request.Method = RequestMethod.Put;

Expand Down Expand Up @@ -321,7 +321,7 @@ private Request CreateSetRequest(ConfigurationSetting setting, MatchConditions r
Argument.AssertNotNullOrEmpty(setting.Key, $"{nameof(setting)}.{nameof(setting.Key)}");

Request request = _pipeline.CreateRequest();
ReadOnlyMemory<byte> content = Serialize(setting);
ReadOnlyMemory<byte> content = ConfigurationServiceSerializer.SerializeRequestBody(setting);

request.Method = RequestMethod.Put;
BuildUriForKvRoute(request.Uri, setting);
Expand Down Expand Up @@ -626,6 +626,7 @@ internal virtual Response<ConfigurationSetting> Get(string key, string label, Da
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
public virtual AsyncPageable<ConfigurationSetting> GetSettingsAsync(SettingSelector selector, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(selector, nameof(selector));
return PageResponseEnumerator.CreateAsyncEnumerable(nextLink => GetSettingsPageAsync(selector, nextLink, cancellationToken));
}

Expand All @@ -636,6 +637,7 @@ public virtual AsyncPageable<ConfigurationSetting> GetSettingsAsync(SettingSelec
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
public virtual Pageable<ConfigurationSetting> GetSettings(SettingSelector selector, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(selector, nameof(selector));
return PageResponseEnumerator.CreateEnumerable(nextLink => GetSettingsPage(selector, nextLink, cancellationToken));
}

Expand All @@ -646,6 +648,7 @@ public virtual Pageable<ConfigurationSetting> GetSettings(SettingSelector select
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
public virtual AsyncPageable<ConfigurationSetting> GetRevisionsAsync(SettingSelector selector, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(selector, nameof(selector));
return PageResponseEnumerator.CreateAsyncEnumerable(nextLink => GetRevisionsPageAsync(selector, nextLink, cancellationToken));
}

Expand All @@ -656,6 +659,7 @@ public virtual AsyncPageable<ConfigurationSetting> GetRevisionsAsync(SettingSele
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
public virtual Pageable<ConfigurationSetting> GetRevisions(SettingSelector selector, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(selector, nameof(selector));
return PageResponseEnumerator.CreateEnumerable(nextLink => GetRevisionsPage(selector, nextLink, cancellationToken));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public enum ServiceVersion
/// Gets the <see cref="ServiceVersion"/> of the service API used when
/// making requests.
/// </summary>
public ServiceVersion Version { get; }
internal ServiceVersion Version { get; }

/// <summary>
/// Initializes a new instance of the <see cref="ConfigurationClientOptions"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,6 @@ private void BuildUriForRevisions(RequestUriBuilder builder, SettingSelector sel
BuildBatchQuery(builder, selector, pageLink);
}

private static ReadOnlyMemory<byte> Serialize(ConfigurationSetting setting)
{
var writer = new ArrayBufferWriter<byte>();
ConfigurationServiceSerializer.Serialize(setting, writer);
return writer.WrittenMemory;
}

#region nobody wants to see these
/// <summary>
/// Check if two ConfigurationSetting instances are equal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,74 +13,127 @@ namespace Azure.Data.AppConfiguration
{
internal static class ConfigurationServiceSerializer
{
public static void Serialize(ConfigurationSetting setting, IBufferWriter<byte> writer)
public static void WriteSetting(Utf8JsonWriter writer, ConfigurationSetting setting)
{
var json = new Utf8JsonWriter(writer);
writer.WriteStartObject();
writer.WriteString("key", setting.Key);
writer.WriteString("label", setting.Label);

if (setting.ReadOnly != default)
{
writer.WriteBoolean("locked", setting.ReadOnly.Value);
}

if (setting.LastModified != default)
{
writer.WriteString("last_modified", setting.LastModified.Value.ToString(CultureInfo.InvariantCulture));
}

WriteRequestBody(writer, setting);
writer.WriteEndObject();
}

public static ReadOnlyMemory<byte> SerializeRequestBody(ConfigurationSetting setting)
{
var writer = new Core.ArrayBufferWriter<byte>();
using var json = new Utf8JsonWriter(writer);
json.WriteStartObject();
json.WriteString("value", setting.Value);
json.WriteString("content_type", setting.ContentType);
WriteRequestBody(json, setting);
json.WriteEndObject();
json.Flush();
return writer.WrittenMemory;
}

private static void WriteRequestBody(Utf8JsonWriter writer, ConfigurationSetting setting)
{
writer.WriteString("value", setting.Value);
writer.WriteString("content_type", setting.ContentType);
if (setting.Tags != null)
{
json.WriteStartObject("tags");
writer.WriteStartObject("tags");
foreach (System.Collections.Generic.KeyValuePair<string, string> tag in setting.Tags)
{
json.WriteString(tag.Key, tag.Value);
writer.WriteString(tag.Key, tag.Value);
}
json.WriteEndObject();

writer.WriteEndObject();
}

if (setting.ETag != default)
{
json.WriteString("etag", setting.ETag.ToString());
writer.WriteString("etag", setting.ETag.ToString());
}
json.WriteEndObject();
json.Flush();
}

public static ConfigurationSetting ReadSetting(ref Utf8JsonReader reader)
{
using JsonDocument json = JsonDocument.ParseValue(ref reader);
JsonElement root = json.RootElement;
return ReadSetting(root);
}

private static ConfigurationSetting ReadSetting(JsonElement root)
{
// TODO (pri 2): make the deserializer version resilient
var setting = new ConfigurationSetting();
if (root.TryGetProperty("key", out JsonElement keyValue))
setting.Key = keyValue.GetString();
if (root.TryGetProperty("value", out JsonElement value))
setting.Value = value.GetString();
if (root.TryGetProperty("label", out JsonElement labelValue))
setting.Label = labelValue.GetString();
if (root.TryGetProperty("content_type", out JsonElement contentValue))
setting.ContentType = contentValue.GetString();
if (root.TryGetProperty("etag", out JsonElement eTagValue))
setting.ETag = new ETag(eTagValue.GetString());
if (root.TryGetProperty("last_modified", out JsonElement lastModified))
{
if (lastModified.ValueKind == JsonValueKind.Null)
foreach (JsonProperty property in root.EnumerateObject())
{
ReadPropertyValue(setting, property);
}
return setting;
}

private static void ReadPropertyValue(ConfigurationSetting setting, JsonProperty property)
{
if (property.NameEquals("content_type"))
{
setting.ContentType = property.Value.GetString();
}
else if (property.NameEquals("etag"))
{
setting.ETag = new ETag(property.Value.GetString());
}
else if (property.NameEquals("key"))
{
setting.Key = property.Value.GetString();
}
else if (property.NameEquals("label"))
{
setting.Label = property.Value.GetString();
}
else if (property.NameEquals("last_modified"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
setting.LastModified = null;
}
else
{
setting.LastModified = DateTimeOffset.Parse(lastModified.GetString(), CultureInfo.InvariantCulture);
setting.LastModified = DateTimeOffset.Parse(property.Value.GetString(), CultureInfo.InvariantCulture);
}
}
if (root.TryGetProperty("locked", out JsonElement readOnlyValue))
else if (property.NameEquals("locked"))
{
if (readOnlyValue.ValueKind == JsonValueKind.Null)
if (property.Value.ValueKind == JsonValueKind.Null)
{
setting.ReadOnly = null;
}
else
{
setting.ReadOnly = readOnlyValue.GetBoolean();
setting.ReadOnly = property.Value.GetBoolean();
}
}
if (root.TryGetProperty("tags", out JsonElement tagsValue))
else if (property.NameEquals("tags"))
{
foreach (JsonProperty element in tagsValue.EnumerateObject())
foreach (JsonProperty element in property.Value.EnumerateObject())
{
setting.Tags.Add(element.Name, element.Value.GetString());
}
}

return setting;
else if (property.NameEquals("value"))
{
setting.Value = property.Value.GetString();
}
}

public static async Task<ConfigurationSetting> DeserializeSettingAsync(Stream content, CancellationToken cancellation)
Expand All @@ -94,11 +147,9 @@ public static async Task<ConfigurationSetting> DeserializeSettingAsync(Stream co

public static ConfigurationSetting DeserializeSetting(Stream content)
{
using (JsonDocument json = JsonDocument.Parse(content, default))
{
JsonElement root = json.RootElement;
return ReadSetting(root);
}
using JsonDocument json = JsonDocument.Parse(content, default);
JsonElement root = json.RootElement;
return ReadSetting(root);
}

public static async Task<SettingBatch> ParseBatchAsync(Response response, CancellationToken cancellation)
Expand Down
Loading