From f5d5d84eee8d01282c5dd98c79e65f7c2ddb08f4 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 15 Jun 2020 14:27:12 -0700 Subject: [PATCH] Update AutoRest C# version (#12783) --- eng/CodeGeneration.targets | 3 +- .../CustomFormModelField.Serialization.cs | 4 -- .../FormRecognizerError.Serialization.cs | 8 --- .../ServiceAnalyzeLayoutAsyncHeaders.cs | 22 ++++++ .../ServiceAnalyzeReceiptAsyncHeaders.cs | 22 ++++++ .../ServiceAnalyzeWithCustomModelHeaders.cs | 22 ++++++ .../ServiceCopyCustomModelHeaders.cs | 22 ++++++ .../src/Generated/ServiceRestClient.cs | 70 +++++++++++-------- ...PrivateEndpointConnectionsDeleteHeaders.cs | 23 ++++++ ...rivateEndpointConnectionsRestOperations.cs | 10 +-- .../Generated/DeploymentsRestOperations.cs | 20 +++--- ...oymentsWhatIfAtSubscriptionScopeHeaders.cs | 23 ++++++ .../src/Generated/DeploymentsWhatIfHeaders.cs | 23 ++++++ .../AutocompleteOptions.Serialization.cs | 22 ++---- .../CommonGramTokenFilter.Serialization.cs | 6 +- .../Generated/Models/CommonGramTokenFilter.cs | 2 +- .../Models/ConditionalSkill.Serialization.cs | 12 +--- .../Models/CorsOptions.Serialization.cs | 6 +- .../src/Generated/Models/CorsOptions.cs | 2 +- ...ryDecompounderTokenFilter.Serialization.cs | 6 +- .../DictionaryDecompounderTokenFilter.cs | 2 +- .../EntityRecognitionSkill.Serialization.cs | 12 +--- .../ImageAnalysisSkill.Serialization.cs | 12 +--- .../Models/KeepTokenFilter.Serialization.cs | 6 +- .../src/Generated/Models/KeepTokenFilter.cs | 2 +- .../KeyPhraseExtractionSkill.Serialization.cs | 12 +--- .../KeywordMarkerTokenFilter.Serialization.cs | 6 +- .../Models/KeywordMarkerTokenFilter.cs | 2 +- .../LanguageDetectionSkill.Serialization.cs | 12 +--- .../Models/MappingCharFilter.Serialization.cs | 6 +- .../src/Generated/Models/MappingCharFilter.cs | 2 +- .../Models/MergeSkill.Serialization.cs | 12 +--- .../Models/OcrSkill.Serialization.cs | 12 +--- ...PatternCaptureTokenFilter.Serialization.cs | 6 +- .../Models/PatternCaptureTokenFilter.cs | 2 +- .../Models/SearchField.Serialization.cs | 15 +--- .../Models/SearchIndex.Serialization.cs | 21 +----- ...dexerDataSourceConnection.Serialization.cs | 15 +--- .../SearchIndexerSkill.Serialization.cs | 12 +--- .../SearchIndexerSkillset.Serialization.cs | 6 +- .../Generated/Models/SearchIndexerSkillset.cs | 2 +- ...archResourceEncryptionKey.Serialization.cs | 45 ++---------- .../Models/SearchSuggester.Serialization.cs | 21 +----- .../Models/SentimentSkill.Serialization.cs | 12 +--- .../Models/ShaperSkill.Serialization.cs | 12 +--- .../Models/SplitSkill.Serialization.cs | 12 +--- ...temmerOverrideTokenFilter.Serialization.cs | 6 +- .../Models/StemmerOverrideTokenFilter.cs | 2 +- .../Models/SuggestOptions.Serialization.cs | 22 ++---- .../Models/SynonymMap.Serialization.cs | 15 +--- .../SynonymTokenFilter.Serialization.cs | 6 +- .../Generated/Models/SynonymTokenFilter.cs | 2 +- .../TextTranslationSkill.Serialization.cs | 12 +--- .../Models/TextWeights.Serialization.cs | 6 +- .../Models/WebApiSkill.Serialization.cs | 12 +--- ...essionCreateDataFlowDebugSessionHeaders.cs | 22 ++++++ ...taFlowDebugSessionExecuteCommandHeaders.cs | 22 ++++++ .../DataFlowDebugSessionRestClient.cs | 20 +++--- 58 files changed, 348 insertions(+), 406 deletions(-) create mode 100644 sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeLayoutAsyncHeaders.cs create mode 100644 sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeReceiptAsyncHeaders.cs create mode 100644 sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeWithCustomModelHeaders.cs create mode 100644 sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceCopyCustomModelHeaders.cs create mode 100644 sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsDeleteHeaders.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfHeaders.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionCreateDataFlowDebugSessionHeaders.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionExecuteCommandHeaders.cs diff --git a/eng/CodeGeneration.targets b/eng/CodeGeneration.targets index 488f8014da8e..07da6209f898 100644 --- a/eng/CodeGeneration.targets +++ b/eng/CodeGeneration.targets @@ -3,7 +3,7 @@ <_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6223/autorest-3.0.6223.tgz <_AutoRestCoreVersion>3.0.6283 - <_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200612.2/autorest-csharp-v3-3.0.0-dev.20200612.2.tgz + <_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200615.2/autorest-csharp-v3-3.0.0-dev.20200615.2.tgz <_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true <_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md $(_DefaultInputName) @@ -52,3 +52,4 @@ + diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/CustomFormModelField.Serialization.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/CustomFormModelField.Serialization.cs index 5d02c65831f8..7c2cb41ddd6e 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/CustomFormModelField.Serialization.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/CustomFormModelField.Serialization.cs @@ -20,10 +20,6 @@ internal static CustomFormModelField DeserializeCustomFormModelField(JsonElement { if (property.NameEquals("fieldName")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } fieldName = property.Value.GetString(); continue; } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/FormRecognizerError.Serialization.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/FormRecognizerError.Serialization.cs index 06f11332b5d4..906142e33acc 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/FormRecognizerError.Serialization.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/FormRecognizerError.Serialization.cs @@ -20,19 +20,11 @@ internal static FormRecognizerError DeserializeFormRecognizerError(JsonElement e { if (property.NameEquals("code")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } code = property.Value.GetString(); continue; } if (property.NameEquals("message")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } message = property.Value.GetString(); continue; } diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeLayoutAsyncHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeLayoutAsyncHeaders.cs new file mode 100644 index 000000000000..8c3c43471ac1 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeLayoutAsyncHeaders.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.AI.FormRecognizer +{ + internal class ServiceAnalyzeLayoutAsyncHeaders + { + private readonly Response _response; + public ServiceAnalyzeLayoutAsyncHeaders(Response response) + { + _response = response; + } + public string OperationLocation => _response.Headers.TryGetValue("Operation-Location", out string value) ? value : null; + } +} diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeReceiptAsyncHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeReceiptAsyncHeaders.cs new file mode 100644 index 000000000000..a4c2b80fb638 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeReceiptAsyncHeaders.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.AI.FormRecognizer +{ + internal class ServiceAnalyzeReceiptAsyncHeaders + { + private readonly Response _response; + public ServiceAnalyzeReceiptAsyncHeaders(Response response) + { + _response = response; + } + public string OperationLocation => _response.Headers.TryGetValue("Operation-Location", out string value) ? value : null; + } +} diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeWithCustomModelHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeWithCustomModelHeaders.cs new file mode 100644 index 000000000000..4535dc70062a --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceAnalyzeWithCustomModelHeaders.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.AI.FormRecognizer +{ + internal class ServiceAnalyzeWithCustomModelHeaders + { + private readonly Response _response; + public ServiceAnalyzeWithCustomModelHeaders(Response response) + { + _response = response; + } + public string OperationLocation => _response.Headers.TryGetValue("Operation-Location", out string value) ? value : null; + } +} diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceCopyCustomModelHeaders.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceCopyCustomModelHeaders.cs new file mode 100644 index 000000000000..954faa762e00 --- /dev/null +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceCopyCustomModelHeaders.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.AI.FormRecognizer +{ + internal class ServiceCopyCustomModelHeaders + { + private readonly Response _response; + public ServiceCopyCustomModelHeaders(Response response) + { + _response = response; + } + public string OperationLocation => _response.Headers.TryGetValue("Operation-Location", out string value) ? value : null; + } +} diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceRestClient.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceRestClient.cs index 1036d85107a1..23d5c9c284ed 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceRestClient.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/ServiceRestClient.cs @@ -251,7 +251,7 @@ internal HttpMessage CreateAnalyzeWithCustomModelRequest(Guid modelId, FormConte /// .json, .pdf, .jpg, .png or .tiff type file stream. /// Include text lines and element references in the result. /// The cancellation token to use. - public async Task AnalyzeWithCustomModelAsync(Guid modelId, FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) + public async Task> AnalyzeWithCustomModelAsync(Guid modelId, FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -260,10 +260,11 @@ public async Task AnalyzeWithCustomModelAsync(Guid modelId, FormConten using var message = CreateAnalyzeWithCustomModelRequest(modelId, contentType, fileStream, includeTextDetails); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -275,7 +276,7 @@ public async Task AnalyzeWithCustomModelAsync(Guid modelId, FormConten /// .json, .pdf, .jpg, .png or .tiff type file stream. /// Include text lines and element references in the result. /// The cancellation token to use. - public Response AnalyzeWithCustomModel(Guid modelId, FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeWithCustomModel(Guid modelId, FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -284,10 +285,11 @@ public Response AnalyzeWithCustomModel(Guid modelId, FormContentType contentType using var message = CreateAnalyzeWithCustomModelRequest(modelId, contentType, fileStream, includeTextDetails); _pipeline.Send(message, cancellationToken); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -324,14 +326,15 @@ internal HttpMessage CreateAnalyzeWithCustomModelRequest(Guid modelId, bool? inc /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public async Task AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) + public async Task> AnalyzeWithCustomModelAsync(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var message = CreateAnalyzeWithCustomModelRequest(modelId, includeTextDetails, fileStream); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -342,14 +345,15 @@ public async Task AnalyzeWithCustomModelAsync(Guid modelId, bool? incl /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public Response AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeWithCustomModel(Guid modelId, bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var message = CreateAnalyzeWithCustomModelRequest(modelId, includeTextDetails, fileStream); _pipeline.Send(message, cancellationToken); + var headers = new ServiceAnalyzeWithCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -452,7 +456,7 @@ internal HttpMessage CreateCopyCustomModelRequest(Guid modelId, CopyRequest copy /// Model identifier. /// Copy request parameters. /// The cancellation token to use. - public async Task CopyCustomModelAsync(Guid modelId, CopyRequest copyRequest, CancellationToken cancellationToken = default) + public async Task> CopyCustomModelAsync(Guid modelId, CopyRequest copyRequest, CancellationToken cancellationToken = default) { if (copyRequest == null) { @@ -461,10 +465,11 @@ public async Task CopyCustomModelAsync(Guid modelId, CopyRequest copyR using var message = CreateCopyCustomModelRequest(modelId, copyRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new ServiceCopyCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -474,7 +479,7 @@ public async Task CopyCustomModelAsync(Guid modelId, CopyRequest copyR /// Model identifier. /// Copy request parameters. /// The cancellation token to use. - public Response CopyCustomModel(Guid modelId, CopyRequest copyRequest, CancellationToken cancellationToken = default) + public ResponseWithHeaders CopyCustomModel(Guid modelId, CopyRequest copyRequest, CancellationToken cancellationToken = default) { if (copyRequest == null) { @@ -483,10 +488,11 @@ public Response CopyCustomModel(Guid modelId, CopyRequest copyRequest, Cancellat using var message = CreateCopyCustomModelRequest(modelId, copyRequest); _pipeline.Send(message, cancellationToken); + var headers = new ServiceCopyCustomModelHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -659,7 +665,7 @@ internal HttpMessage CreateAnalyzeReceiptAsyncRequest(FormContentType contentTyp /// .json, .pdf, .jpg, .png or .tiff type file stream. /// Include text lines and element references in the result. /// The cancellation token to use. - public async Task AnalyzeReceiptAsyncAsync(FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) + public async Task> AnalyzeReceiptAsyncAsync(FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -668,10 +674,11 @@ public async Task AnalyzeReceiptAsyncAsync(FormContentType contentType using var message = CreateAnalyzeReceiptAsyncRequest(contentType, fileStream, includeTextDetails); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -682,7 +689,7 @@ public async Task AnalyzeReceiptAsyncAsync(FormContentType contentType /// .json, .pdf, .jpg, .png or .tiff type file stream. /// Include text lines and element references in the result. /// The cancellation token to use. - public Response AnalyzeReceiptAsync(FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeReceiptAsync(FormContentType contentType, Stream fileStream, bool? includeTextDetails = null, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -691,10 +698,11 @@ public Response AnalyzeReceiptAsync(FormContentType contentType, Stream fileStre using var message = CreateAnalyzeReceiptAsyncRequest(contentType, fileStream, includeTextDetails); _pipeline.Send(message, cancellationToken); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -728,14 +736,15 @@ internal HttpMessage CreateAnalyzeReceiptAsyncRequest(bool? includeTextDetails, /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public async Task AnalyzeReceiptAsyncAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) + public async Task> AnalyzeReceiptAsyncAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var message = CreateAnalyzeReceiptAsyncRequest(includeTextDetails, fileStream); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -745,14 +754,15 @@ public async Task AnalyzeReceiptAsyncAsync(bool? includeTextDetails = /// Include text lines and element references in the result. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public Response AnalyzeReceiptAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeReceiptAsync(bool? includeTextDetails = null, SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var message = CreateAnalyzeReceiptAsyncRequest(includeTextDetails, fileStream); _pipeline.Send(message, cancellationToken); + var headers = new ServiceAnalyzeReceiptAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -847,7 +857,7 @@ internal HttpMessage CreateAnalyzeLayoutAsyncRequest(FormContentType contentType /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public async Task AnalyzeLayoutAsyncAsync(FormContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public async Task> AnalyzeLayoutAsyncAsync(FormContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -856,10 +866,11 @@ public async Task AnalyzeLayoutAsyncAsync(FormContentType contentType, using var message = CreateAnalyzeLayoutAsyncRequest(contentType, fileStream); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -869,7 +880,7 @@ public async Task AnalyzeLayoutAsyncAsync(FormContentType contentType, /// Upload file type. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public Response AnalyzeLayoutAsync(FormContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeLayoutAsync(FormContentType contentType, Stream fileStream, CancellationToken cancellationToken = default) { if (fileStream == null) { @@ -878,10 +889,11 @@ public Response AnalyzeLayoutAsync(FormContentType contentType, Stream fileStrea using var message = CreateAnalyzeLayoutAsyncRequest(contentType, fileStream); _pipeline.Send(message, cancellationToken); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -910,14 +922,15 @@ internal HttpMessage CreateAnalyzeLayoutAsyncRequest(SourcePath_internal fileStr /// Extract text and layout information from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public async Task AnalyzeLayoutAsyncAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) + public async Task> AnalyzeLayoutAsyncAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var message = CreateAnalyzeLayoutAsyncRequest(fileStream); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -926,14 +939,15 @@ public async Task AnalyzeLayoutAsyncAsync(SourcePath_internal fileStre /// Extract text and layout information from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed. /// .json, .pdf, .jpg, .png or .tiff type file stream. /// The cancellation token to use. - public Response AnalyzeLayoutAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders AnalyzeLayoutAsync(SourcePath_internal fileStream = null, CancellationToken cancellationToken = default) { using var message = CreateAnalyzeLayoutAsyncRequest(fileStream); _pipeline.Send(message, cancellationToken); + var headers = new ServiceAnalyzeLayoutAsyncHeaders(message.Response); switch (message.Response.Status) { case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsDeleteHeaders.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsDeleteHeaders.cs new file mode 100644 index 000000000000..ed1e5c6031d9 --- /dev/null +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsDeleteHeaders.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.KeyVault +{ + internal class PrivateEndpointConnectionsDeleteHeaders + { + private readonly Response _response; + public PrivateEndpointConnectionsDeleteHeaders(Response response) + { + _response = response; + } + public int? RetryAfter => _response.Headers.TryGetValue("Retry-After", out int? value) ? value : null; + public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; + } +} diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsRestOperations.cs index f065b4b423a6..a737d039b09e 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/PrivateEndpointConnectionsRestOperations.cs @@ -303,7 +303,7 @@ internal HttpMessage CreateDeleteRequest(string resourceGroupName, string vaultN /// The name of the key vault. /// Name of the private endpoint connection associated with the key vault. /// The cancellation token to use. - public async Task DeleteAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -320,12 +320,13 @@ public async Task DeleteAsync(string resourceGroupName, string vaultNa using var message = CreateDeleteRequest(resourceGroupName, vaultName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new PrivateEndpointConnectionsDeleteHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: case 204: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -336,7 +337,7 @@ public async Task DeleteAsync(string resourceGroupName, string vaultNa /// The name of the key vault. /// Name of the private endpoint connection associated with the key vault. /// The cancellation token to use. - public Response Delete(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public ResponseWithHeaders Delete(string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -353,12 +354,13 @@ public Response Delete(string resourceGroupName, string vaultName, string privat using var message = CreateDeleteRequest(resourceGroupName, vaultName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); + var headers = new PrivateEndpointConnectionsDeleteHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: case 204: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsRestOperations.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsRestOperations.cs index d574fc080c13..f0a8e003fb3b 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsRestOperations.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsRestOperations.cs @@ -2356,7 +2356,7 @@ internal Core.HttpMessage CreateWhatIfAtSubscriptionScopeRequest(string deployme /// The name of the deployment. /// Parameters to What If. /// The cancellation token to use. - public async Task WhatIfAtSubscriptionScopeAsync(string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) + public async Task> WhatIfAtSubscriptionScopeAsync(string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) { if (deploymentName == null) { @@ -2369,11 +2369,12 @@ public async Task WhatIfAtSubscriptionScopeAsync(string deploymentName using var message = CreateWhatIfAtSubscriptionScopeRequest(deploymentName, parameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new DeploymentsWhatIfAtSubscriptionScopeHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -2383,7 +2384,7 @@ public async Task WhatIfAtSubscriptionScopeAsync(string deploymentName /// The name of the deployment. /// Parameters to What If. /// The cancellation token to use. - public Response WhatIfAtSubscriptionScope(string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) + public ResponseWithHeaders WhatIfAtSubscriptionScope(string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) { if (deploymentName == null) { @@ -2396,11 +2397,12 @@ public Response WhatIfAtSubscriptionScope(string deploymentName, DeploymentWhatI using var message = CreateWhatIfAtSubscriptionScopeRequest(deploymentName, parameters); _pipeline.Send(message, cancellationToken); + var headers = new DeploymentsWhatIfAtSubscriptionScopeHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -3082,7 +3084,7 @@ internal Core.HttpMessage CreateWhatIfRequest(string resourceGroupName, string d /// The name of the deployment. /// Parameters to validate. /// The cancellation token to use. - public async Task WhatIfAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) + public async Task> WhatIfAsync(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -3099,11 +3101,12 @@ public async Task WhatIfAsync(string resourceGroupName, string deploym using var message = CreateWhatIfRequest(resourceGroupName, deploymentName, parameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new DeploymentsWhatIfHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -3114,7 +3117,7 @@ public async Task WhatIfAsync(string resourceGroupName, string deploym /// The name of the deployment. /// Parameters to validate. /// The cancellation token to use. - public Response WhatIf(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) + public ResponseWithHeaders WhatIf(string resourceGroupName, string deploymentName, DeploymentWhatIf parameters, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { @@ -3131,11 +3134,12 @@ public Response WhatIf(string resourceGroupName, string deploymentName, Deployme using var message = CreateWhatIfRequest(resourceGroupName, deploymentName, parameters); _pipeline.Send(message, cancellationToken); + var headers = new DeploymentsWhatIfHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs new file mode 100644 index 000000000000..8733c6b799df --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfAtSubscriptionScopeHeaders.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.Resources +{ + internal class DeploymentsWhatIfAtSubscriptionScopeHeaders + { + private readonly Response _response; + public DeploymentsWhatIfAtSubscriptionScopeHeaders(Response response) + { + _response = response; + } + public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; + public string RetryAfter => _response.Headers.TryGetValue("Retry-After", out string value) ? value : null; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfHeaders.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfHeaders.cs new file mode 100644 index 000000000000..849c1233f585 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentsWhatIfHeaders.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.Resources +{ + internal class DeploymentsWhatIfHeaders + { + private readonly Response _response; + public DeploymentsWhatIfHeaders(Response response) + { + _response = response; + } + public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; + public string RetryAfter => _response.Headers.TryGetValue("Retry-After", out string value) ? value : null; + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteOptions.Serialization.cs index 354ac24ae1a7..9b54291098c9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteOptions.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteOptions.Serialization.cs @@ -16,15 +16,8 @@ public partial class AutocompleteOptions : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (SearchText != null) - { - writer.WritePropertyName("search"); - writer.WriteStringValue(SearchText); - } - else - { - writer.WriteNull("search"); - } + writer.WritePropertyName("search"); + writer.WriteStringValue(SearchText); if (Mode != null) { writer.WritePropertyName("autocompleteMode"); @@ -60,15 +53,8 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("searchFields"); writer.WriteStringValue(SearchFieldsRaw); } - if (SuggesterName != null) - { - writer.WritePropertyName("suggesterName"); - writer.WriteStringValue(SuggesterName); - } - else - { - writer.WriteNull("suggesterName"); - } + writer.WritePropertyName("suggesterName"); + writer.WriteStringValue(SuggesterName); if (Size != null) { writer.WritePropertyName("top"); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.Serialization.cs index ce166fbb5792..62b470e03c9e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class CommonGramTokenFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (CommonWords != null && CommonWords.Any()) + if (CommonWords.Any()) { writer.WritePropertyName("commonWords"); writer.WriteStartArray(); @@ -59,10 +59,6 @@ internal static CommonGramTokenFilter DeserializeCommonGramTokenFilter(JsonEleme { if (property.NameEquals("commonWords")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.cs index 8a9b7a07141b..33e3b6cad5fe 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonGramTokenFilter.cs @@ -28,7 +28,7 @@ public CommonGramTokenFilter(string name, IEnumerable commonWords) : bas throw new ArgumentNullException(nameof(commonWords)); } - CommonWords = commonWords?.ToArray(); + CommonWords = commonWords.ToArray(); ODataType = "#Microsoft.Azure.Search.CommonGramTokenFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ConditionalSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ConditionalSkill.Serialization.cs index 1e34103abd62..b77019e9e875 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ConditionalSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ConditionalSkill.Serialization.cs @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -48,7 +48,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -109,10 +109,6 @@ internal static ConditionalSkill DeserializeConditionalSkill(JsonElement element } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -130,10 +126,6 @@ internal static ConditionalSkill DeserializeConditionalSkill(JsonElement element } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.Serialization.cs index 2a3029af4424..d3307014b4e8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.Serialization.cs @@ -17,7 +17,7 @@ public partial class CorsOptions : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (AllowedOrigins != null && AllowedOrigins.Any()) + if (AllowedOrigins.Any()) { writer.WritePropertyName("allowedOrigins"); writer.WriteStartArray(); @@ -47,10 +47,6 @@ internal static CorsOptions DeserializeCorsOptions(JsonElement element) { if (property.NameEquals("allowedOrigins")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.cs index e304b4b8cebb..bfb37bff104a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CorsOptions.cs @@ -23,7 +23,7 @@ public CorsOptions(IEnumerable allowedOrigins) throw new ArgumentNullException(nameof(allowedOrigins)); } - AllowedOrigins = allowedOrigins?.ToArray(); + AllowedOrigins = allowedOrigins.ToArray(); } /// Initializes a new instance of CorsOptions. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.Serialization.cs index 21c5f06b4e19..55b333d672be 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class DictionaryDecompounderTokenFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (WordList != null && WordList.Any()) + if (WordList.Any()) { writer.WritePropertyName("wordList"); writer.WriteStartArray(); @@ -71,10 +71,6 @@ internal static DictionaryDecompounderTokenFilter DeserializeDictionaryDecompoun { if (property.NameEquals("wordList")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.cs index 489a48109a00..1ebea33973fb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DictionaryDecompounderTokenFilter.cs @@ -28,7 +28,7 @@ public DictionaryDecompounderTokenFilter(string name, IEnumerable wordLi throw new ArgumentNullException(nameof(wordList)); } - WordList = wordList?.ToArray(); + WordList = wordList.ToArray(); ODataType = "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/EntityRecognitionSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/EntityRecognitionSkill.Serialization.cs index d16a66c0937f..81f7cd8c6481 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/EntityRecognitionSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/EntityRecognitionSkill.Serialization.cs @@ -59,7 +59,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -73,7 +73,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -179,10 +179,6 @@ internal static EntityRecognitionSkill DeserializeEntityRecognitionSkill(JsonEle } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -200,10 +196,6 @@ internal static EntityRecognitionSkill DeserializeEntityRecognitionSkill(JsonEle } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ImageAnalysisSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ImageAnalysisSkill.Serialization.cs index cf13802c2ae2..bef7418defc3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ImageAnalysisSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ImageAnalysisSkill.Serialization.cs @@ -59,7 +59,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -73,7 +73,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -174,10 +174,6 @@ internal static ImageAnalysisSkill DeserializeImageAnalysisSkill(JsonElement ele } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -195,10 +191,6 @@ internal static ImageAnalysisSkill DeserializeImageAnalysisSkill(JsonElement ele } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.Serialization.cs index 933a7b30d8c5..538ee41eaf93 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class KeepTokenFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (KeepWords != null && KeepWords.Any()) + if (KeepWords.Any()) { writer.WritePropertyName("keepWords"); writer.WriteStartArray(); @@ -53,10 +53,6 @@ internal static KeepTokenFilter DeserializeKeepTokenFilter(JsonElement element) { if (property.NameEquals("keepWords")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.cs index c2ce7ae648f7..c10700e42849 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeepTokenFilter.cs @@ -28,7 +28,7 @@ public KeepTokenFilter(string name, IEnumerable keepWords) : base(name) throw new ArgumentNullException(nameof(keepWords)); } - KeepWords = keepWords?.ToArray(); + KeepWords = keepWords.ToArray(); ODataType = "#Microsoft.Azure.Search.KeepTokenFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeyPhraseExtractionSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeyPhraseExtractionSkill.Serialization.cs index af5af0cb3826..55f90a36f5d9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeyPhraseExtractionSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeyPhraseExtractionSkill.Serialization.cs @@ -44,7 +44,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -58,7 +58,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -139,10 +139,6 @@ internal static KeyPhraseExtractionSkill DeserializeKeyPhraseExtractionSkill(Jso } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -160,10 +156,6 @@ internal static KeyPhraseExtractionSkill DeserializeKeyPhraseExtractionSkill(Jso } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.Serialization.cs index 7bd6a54b3d0c..f2581ecec56d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class KeywordMarkerTokenFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Keywords != null && Keywords.Any()) + if (Keywords.Any()) { writer.WritePropertyName("keywords"); writer.WriteStartArray(); @@ -53,10 +53,6 @@ internal static KeywordMarkerTokenFilter DeserializeKeywordMarkerTokenFilter(Jso { if (property.NameEquals("keywords")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.cs index f0bad3a3721b..8734c8ef5ea3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KeywordMarkerTokenFilter.cs @@ -28,7 +28,7 @@ public KeywordMarkerTokenFilter(string name, IEnumerable keywords) : bas throw new ArgumentNullException(nameof(keywords)); } - Keywords = keywords?.ToArray(); + Keywords = keywords.ToArray(); ODataType = "#Microsoft.Azure.Search.KeywordMarkerTokenFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LanguageDetectionSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LanguageDetectionSkill.Serialization.cs index 1283e23bc195..7d748fcc311e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LanguageDetectionSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/LanguageDetectionSkill.Serialization.cs @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -48,7 +48,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -109,10 +109,6 @@ internal static LanguageDetectionSkill DeserializeLanguageDetectionSkill(JsonEle } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -130,10 +126,6 @@ internal static LanguageDetectionSkill DeserializeLanguageDetectionSkill(JsonEle } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.Serialization.cs index 24d39f24787d..ec100d983c56 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class MappingCharFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Mappings != null && Mappings.Any()) + if (Mappings.Any()) { writer.WritePropertyName("mappings"); writer.WriteStartArray(); @@ -47,10 +47,6 @@ internal static MappingCharFilter DeserializeMappingCharFilter(JsonElement eleme { if (property.NameEquals("mappings")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.cs index 27d6661c9874..cabd7fb0fa77 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/MappingCharFilter.cs @@ -28,7 +28,7 @@ public MappingCharFilter(string name, IEnumerable mappings) : base(name) throw new ArgumentNullException(nameof(mappings)); } - Mappings = mappings?.ToArray(); + Mappings = mappings.ToArray(); ODataType = "#Microsoft.Azure.Search.MappingCharFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/MergeSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/MergeSkill.Serialization.cs index 2dff5674ea60..29c9950f2a65 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/MergeSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/MergeSkill.Serialization.cs @@ -44,7 +44,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -58,7 +58,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -139,10 +139,6 @@ internal static MergeSkill DeserializeMergeSkill(JsonElement element) } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -160,10 +156,6 @@ internal static MergeSkill DeserializeMergeSkill(JsonElement element) } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs index 8bde254e5900..6a159a1694e5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs @@ -44,7 +44,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -58,7 +58,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -139,10 +139,6 @@ internal static OcrSkill DeserializeOcrSkill(JsonElement element) } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -160,10 +156,6 @@ internal static OcrSkill DeserializeOcrSkill(JsonElement element) } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.Serialization.cs index c4d53f366fd1..7810912a3ee8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class PatternCaptureTokenFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Patterns != null && Patterns.Any()) + if (Patterns.Any()) { writer.WritePropertyName("patterns"); writer.WriteStartArray(); @@ -53,10 +53,6 @@ internal static PatternCaptureTokenFilter DeserializePatternCaptureTokenFilter(J { if (property.NameEquals("patterns")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.cs index ef049154b9e5..be3034acd171 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/PatternCaptureTokenFilter.cs @@ -28,7 +28,7 @@ public PatternCaptureTokenFilter(string name, IEnumerable patterns) : ba throw new ArgumentNullException(nameof(patterns)); } - Patterns = patterns?.ToArray(); + Patterns = patterns.ToArray(); ODataType = "#Microsoft.Azure.Search.PatternCaptureTokenFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs index f81bb145b123..0a2fe6a4dbcd 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs @@ -17,15 +17,8 @@ public partial class SearchField : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Name != null) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); writer.WritePropertyName("type"); writer.WriteStringValue(Type.ToString()); if (IsKey != null) @@ -115,10 +108,6 @@ internal static SearchField DeserializeSearchField(JsonElement element) { if (property.NameEquals("name")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } name = property.Value.GetString(); continue; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs index 673e1b727d51..b52ed71e70a7 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs @@ -17,16 +17,9 @@ public partial class SearchIndex : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Name != null) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } - if (Fields != null && Fields.Any()) + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (Fields.Any()) { writer.WritePropertyName("fields"); writer.WriteStartArray(); @@ -147,19 +140,11 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) { if (property.NameEquals("name")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } name = property.Value.GetString(); continue; } if (property.NameEquals("fields")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs index 4f33234545eb..3063e826c84c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs @@ -24,15 +24,8 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("type"); writer.WriteStringValue(Type.ToString()); - if (CredentialsInternal != null) - { - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(CredentialsInternal); - } - else - { - writer.WriteNull("credentials"); - } + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(CredentialsInternal); writer.WritePropertyName("container"); writer.WriteObjectValue(Container); if (DataChangeDetectionPolicy != null) @@ -86,10 +79,6 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo } if (property.NameEquals("credentials")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } credentials = DataSourceCredentials.DeserializeDataSourceCredentials(property.Value); continue; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs index 217400dee138..e77998ae0563 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -48,7 +48,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -127,10 +127,6 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -148,10 +144,6 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs index 48835f5e6098..3f146ee964e2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs @@ -24,7 +24,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"); writer.WriteStringValue(Description); } - if (Skills != null && Skills.Any()) + if (Skills.Any()) { writer.WritePropertyName("skills"); writer.WriteStartArray(); @@ -76,10 +76,6 @@ internal static SearchIndexerSkillset DeserializeSearchIndexerSkillset(JsonEleme } if (property.NameEquals("skills")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs index 20a2097ea495..ebd2e51ff773 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs @@ -29,7 +29,7 @@ public SearchIndexerSkillset(string name, IEnumerable skills } Name = name; - Skills = skills?.ToArray(); + Skills = skills.ToArray(); } /// Initializes a new instance of SearchIndexerSkillset. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs index 91becccfea49..c7522df25442 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs @@ -15,33 +15,12 @@ public partial class SearchResourceEncryptionKey : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (KeyName != null) - { - writer.WritePropertyName("keyVaultKeyName"); - writer.WriteStringValue(KeyName); - } - else - { - writer.WriteNull("keyVaultKeyName"); - } - if (KeyVersion != null) - { - writer.WritePropertyName("keyVaultKeyVersion"); - writer.WriteStringValue(KeyVersion); - } - else - { - writer.WriteNull("keyVaultKeyVersion"); - } - if (_vaultUri != null) - { - writer.WritePropertyName("keyVaultUri"); - writer.WriteStringValue(_vaultUri); - } - else - { - writer.WriteNull("keyVaultUri"); - } + writer.WritePropertyName("keyVaultKeyName"); + writer.WriteStringValue(KeyName); + writer.WritePropertyName("keyVaultKeyVersion"); + writer.WriteStringValue(KeyVersion); + writer.WritePropertyName("keyVaultUri"); + writer.WriteStringValue(_vaultUri); if (AccessCredentialsInternal != null) { writer.WritePropertyName("accessCredentials"); @@ -60,28 +39,16 @@ internal static SearchResourceEncryptionKey DeserializeSearchResourceEncryptionK { if (property.NameEquals("keyVaultKeyName")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } keyVaultKeyName = property.Value.GetString(); continue; } if (property.NameEquals("keyVaultKeyVersion")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } keyVaultKeyVersion = property.Value.GetString(); continue; } if (property.NameEquals("keyVaultUri")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } keyVaultUri = property.Value.GetString(); continue; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchSuggester.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchSuggester.Serialization.cs index ac489318beea..aa54a472a7b5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchSuggester.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchSuggester.Serialization.cs @@ -19,16 +19,9 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("name"); writer.WriteStringValue(Name); - if (SearchMode != null) - { - writer.WritePropertyName("searchMode"); - writer.WriteStringValue(SearchMode); - } - else - { - writer.WriteNull("searchMode"); - } - if (SourceFields != null && SourceFields.Any()) + writer.WritePropertyName("searchMode"); + writer.WriteStringValue(SearchMode); + if (SourceFields.Any()) { writer.WritePropertyName("sourceFields"); writer.WriteStartArray(); @@ -59,19 +52,11 @@ internal static SearchSuggester DeserializeSearchSuggester(JsonElement element) } if (property.NameEquals("searchMode")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } searchMode = property.Value.GetString(); continue; } if (property.NameEquals("sourceFields")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SentimentSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SentimentSkill.Serialization.cs index a68b8387ebf0..68a79b291e38 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SentimentSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SentimentSkill.Serialization.cs @@ -39,7 +39,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -53,7 +53,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -124,10 +124,6 @@ internal static SentimentSkill DeserializeSentimentSkill(JsonElement element) } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -145,10 +141,6 @@ internal static SentimentSkill DeserializeSentimentSkill(JsonElement element) } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ShaperSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ShaperSkill.Serialization.cs index 82cd189f48c2..b06104c5aad2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ShaperSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ShaperSkill.Serialization.cs @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -48,7 +48,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -109,10 +109,6 @@ internal static ShaperSkill DeserializeShaperSkill(JsonElement element) } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -130,10 +126,6 @@ internal static ShaperSkill DeserializeShaperSkill(JsonElement element) } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SplitSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SplitSkill.Serialization.cs index cdca99837eea..4e427de66b2d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SplitSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SplitSkill.Serialization.cs @@ -49,7 +49,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -63,7 +63,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -154,10 +154,6 @@ internal static SplitSkill DeserializeSplitSkill(JsonElement element) } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -175,10 +171,6 @@ internal static SplitSkill DeserializeSplitSkill(JsonElement element) } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.Serialization.cs index 9021f9370552..a7ca7fcf3321 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class StemmerOverrideTokenFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Rules != null && Rules.Any()) + if (Rules.Any()) { writer.WritePropertyName("rules"); writer.WriteStartArray(); @@ -47,10 +47,6 @@ internal static StemmerOverrideTokenFilter DeserializeStemmerOverrideTokenFilter { if (property.NameEquals("rules")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.cs index 04e5d96e3af8..067520821780 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/StemmerOverrideTokenFilter.cs @@ -28,7 +28,7 @@ public StemmerOverrideTokenFilter(string name, IEnumerable rules) : base throw new ArgumentNullException(nameof(rules)); } - Rules = rules?.ToArray(); + Rules = rules.ToArray(); ODataType = "#Microsoft.Azure.Search.StemmerOverrideTokenFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SuggestOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SuggestOptions.Serialization.cs index 403c6351551b..271760f970c8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SuggestOptions.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SuggestOptions.Serialization.cs @@ -45,15 +45,8 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("orderby"); writer.WriteStringValue(OrderByRaw); } - if (SearchText != null) - { - writer.WritePropertyName("search"); - writer.WriteStringValue(SearchText); - } - else - { - writer.WriteNull("search"); - } + writer.WritePropertyName("search"); + writer.WriteStringValue(SearchText); if (SearchFieldsRaw != null) { writer.WritePropertyName("searchFields"); @@ -64,15 +57,8 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("select"); writer.WriteStringValue(SelectRaw); } - if (SuggesterName != null) - { - writer.WritePropertyName("suggesterName"); - writer.WriteStringValue(SuggesterName); - } - else - { - writer.WriteNull("suggesterName"); - } + writer.WritePropertyName("suggesterName"); + writer.WriteStringValue(SuggesterName); if (Size != null) { writer.WritePropertyName("top"); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymMap.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymMap.Serialization.cs index 9f46f5e3cada..980f61fc67ad 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymMap.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymMap.Serialization.cs @@ -17,15 +17,8 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("name"); writer.WriteStringValue(Name); - if (Format != null) - { - writer.WritePropertyName("format"); - writer.WriteStringValue(Format); - } - else - { - writer.WriteNull("format"); - } + writer.WritePropertyName("format"); + writer.WriteStringValue(Format); writer.WritePropertyName("synonyms"); writer.WriteStringValue(Synonyms); if (EncryptionKey != null) @@ -57,10 +50,6 @@ internal static SynonymMap DeserializeSynonymMap(JsonElement element) } if (property.NameEquals("format")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } format = property.Value.GetString(); continue; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.Serialization.cs index 09e174dfad2a..b66fa2576d82 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.Serialization.cs @@ -17,7 +17,7 @@ public partial class SynonymTokenFilter : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Synonyms != null && Synonyms.Any()) + if (Synonyms.Any()) { writer.WritePropertyName("synonyms"); writer.WriteStartArray(); @@ -59,10 +59,6 @@ internal static SynonymTokenFilter DeserializeSynonymTokenFilter(JsonElement ele { if (property.NameEquals("synonyms")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.cs index 34fd6bf5453d..e9b7cf6cbd7e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SynonymTokenFilter.cs @@ -28,7 +28,7 @@ public SynonymTokenFilter(string name, IEnumerable synonyms) : base(name throw new ArgumentNullException(nameof(synonyms)); } - Synonyms = synonyms?.ToArray(); + Synonyms = synonyms.ToArray(); ODataType = "#Microsoft.Azure.Search.SynonymTokenFilter"; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/TextTranslationSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/TextTranslationSkill.Serialization.cs index 79b2349e7307..0b43eee84857 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/TextTranslationSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/TextTranslationSkill.Serialization.cs @@ -46,7 +46,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -60,7 +60,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -147,10 +147,6 @@ internal static TextTranslationSkill DeserializeTextTranslationSkill(JsonElement } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -168,10 +164,6 @@ internal static TextTranslationSkill DeserializeTextTranslationSkill(JsonElement } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/TextWeights.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/TextWeights.Serialization.cs index 7f4f91ada472..9e3287aff6a0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/TextWeights.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/TextWeights.Serialization.cs @@ -17,7 +17,7 @@ public partial class TextWeights : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Weights != null && Weights.Any()) + if (Weights.Any()) { writer.WritePropertyName("weights"); writer.WriteStartObject(); @@ -42,10 +42,6 @@ internal static TextWeights DeserializeTextWeights(JsonElement element) { if (property.NameEquals("weights")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs index 68b1080ce5b2..739882cfb6e6 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs @@ -68,7 +68,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("context"); writer.WriteStringValue(Context); } - if (Inputs != null && Inputs.Any()) + if (Inputs.Any()) { writer.WritePropertyName("inputs"); writer.WriteStartArray(); @@ -82,7 +82,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteNull("inputs"); } - if (Outputs != null && Outputs.Any()) + if (Outputs.Any()) { writer.WritePropertyName("outputs"); writer.WriteStartArray(); @@ -211,10 +211,6 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) } if (property.NameEquals("inputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -232,10 +228,6 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) } if (property.NameEquals("outputs")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionCreateDataFlowDebugSessionHeaders.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionCreateDataFlowDebugSessionHeaders.cs new file mode 100644 index 000000000000..1fbb0d199e2a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionCreateDataFlowDebugSessionHeaders.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal class DataFlowDebugSessionCreateDataFlowDebugSessionHeaders + { + private readonly Response _response; + public DataFlowDebugSessionCreateDataFlowDebugSessionHeaders(Response response) + { + _response = response; + } + public string Location => _response.Headers.TryGetValue("location", out string value) ? value : null; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionExecuteCommandHeaders.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionExecuteCommandHeaders.cs new file mode 100644 index 000000000000..06178a689313 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionExecuteCommandHeaders.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal class DataFlowDebugSessionExecuteCommandHeaders + { + private readonly Response _response; + public DataFlowDebugSessionExecuteCommandHeaders(Response response) + { + _response = response; + } + public string Location => _response.Headers.TryGetValue("location", out string value) ? value : null; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionRestClient.cs index 051c8298c49a..22d270a412c0 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionRestClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionRestClient.cs @@ -66,7 +66,7 @@ internal HttpMessage CreateCreateDataFlowDebugSessionRequest(CreateDataFlowDebug /// Creates a data flow debug session. /// Data flow debug session definition. /// The cancellation token to use. - public async Task CreateDataFlowDebugSessionAsync(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + public async Task> CreateDataFlowDebugSessionAsync(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) { if (request == null) { @@ -75,11 +75,12 @@ public async Task CreateDataFlowDebugSessionAsync(CreateDataFlowDebugS using var message = CreateCreateDataFlowDebugSessionRequest(request); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new DataFlowDebugSessionCreateDataFlowDebugSessionHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -88,7 +89,7 @@ public async Task CreateDataFlowDebugSessionAsync(CreateDataFlowDebugS /// Creates a data flow debug session. /// Data flow debug session definition. /// The cancellation token to use. - public Response CreateDataFlowDebugSession(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) + public ResponseWithHeaders CreateDataFlowDebugSession(CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default) { if (request == null) { @@ -97,11 +98,12 @@ public Response CreateDataFlowDebugSession(CreateDataFlowDebugSessionRequest req using var message = CreateCreateDataFlowDebugSessionRequest(request); _pipeline.Send(message, cancellationToken); + var headers = new DataFlowDebugSessionCreateDataFlowDebugSessionHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } @@ -336,7 +338,7 @@ internal HttpMessage CreateExecuteCommandRequest(DataFlowDebugCommandRequest req /// Execute a data flow debug command. /// Data flow debug command definition. /// The cancellation token to use. - public async Task ExecuteCommandAsync(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) + public async Task> ExecuteCommandAsync(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) { if (request == null) { @@ -345,11 +347,12 @@ public async Task ExecuteCommandAsync(DataFlowDebugCommandRequest requ using var message = CreateExecuteCommandRequest(request); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new DataFlowDebugSessionExecuteCommandHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -358,7 +361,7 @@ public async Task ExecuteCommandAsync(DataFlowDebugCommandRequest requ /// Execute a data flow debug command. /// Data flow debug command definition. /// The cancellation token to use. - public Response ExecuteCommand(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) + public ResponseWithHeaders ExecuteCommand(DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default) { if (request == null) { @@ -367,11 +370,12 @@ public Response ExecuteCommand(DataFlowDebugCommandRequest request, Cancellation using var message = CreateExecuteCommandRequest(request); _pipeline.Send(message, cancellationToken); + var headers = new DataFlowDebugSessionExecuteCommandHeaders(message.Response); switch (message.Response.Status) { case 200: case 202: - return message.Response; + return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); }